The wireless printing module is built on the ARM-based AT91RM9200 processor, with the Android operating system serving as its software foundation. By integrating with the Linux kernel’s CUPS (Common UNIX Printing System), the mobile device can directly print files from the Android platform. This integration enables a seamless printing experience, bridging the gap between mobile devices and traditional USB printers.
Android, an open-source OS based on the Linux kernel, offers robust support for mobile and embedded applications. However, it lacks native USB printing capabilities, and there are no dedicated drivers for Android devices to handle direct printing. To address this, this paper introduces a novel wireless printing module that leverages open-source Linux drivers and CUPS to enable USB printing on Android. This approach opens new possibilities by allowing USB printer drivers to be accessed from the application layer down to the kernel.
The overall system design involves an embedded printing module that receives files via WiFi, displays print queue information on an LCD screen, and sends the file to a connected USB printer through the USB interface. The system block diagram and data flow are illustrated in Figures 1 and 2, respectively.
In terms of hardware, the system features a core processor (AT91RM9200), a WiFi module (G-SKY with RTL8187 chip), a USB host controller (ISP1161A1), and a color LCD module (LFUBK909XA) with a touch screen. The hardware architecture is shown in Figure 3, highlighting the key components involved in communication and control.
On the software side, the system runs on a streamlined version of the Android platform, with Java used for the user interface and JNI for accessing low-level printing libraries. These libraries communicate with a background print service, following the CUPS standard. This allows for flexible printing support across different printer models, using appropriate CUPS drivers.
The CUPS printer driver design supports various printer languages such as PostScript, PCL, and ESC/P. It includes backend filters that convert print data into formats compatible with specific printers, ensuring compatibility and reliability. The USB interface is managed by the AT91RM9200, which handles initialization, enumeration, and communication with the connected printer.
The driver implementation involves initializing the I/O buffer and USB host chip, followed by device detection and enumeration. Once the printer is recognized, status checks are performed, and if the printer is ready, the print job is executed. After printing, the printer is reset to prepare for the next task.
Experimental results show that the system successfully prints text files from an HTC smartphone to an HP laser printer via the USB interface. Screenshots of the print settings and operation interface are provided in Figures 9 and 10.
In conclusion, this project demonstrates how an ARM-based Android platform can be used to implement a wireless printing module. By leveraging open-source Linux drivers and CUPS, it overcomes the limitations of Android’s lack of native USB printing support, offering users a convenient and efficient way to print files from their mobile devices.
Cixi Xinke Electronic Technology Co., Ltd. , https://www.cxxinke.com