![]() ![]() Inhibit on Linux Device Drivers In Only A Few Years.Posted in Peripherals Hacks, Raspberry Pi Tagged printer, raspberry pi, tslp, zlp Post navigation Here at Hackaday, we’re no stranger to seeing folks take apart printers to peel back the software and physical layers that make them up. With the addition of a wireless barcode scanner, it’s satisfying to see the print station up and running. But a different language wouldn’t make the printer any faster. Could it be faster in a different language? Sure. The converter is in Javascript as it runs as part of the webserver that manages the print station. Next, he wrote a converter to take a PNG and convert them into the bitmap format the TSPL has. So the next test was to save the raw TSPL output from a filer and cat directly to the serial port. Initially, he tried to use some sample code that he found, and while he got something to come out of the printer, it was blank. Currently, it does seem like there’s a TSPL to ZPL converter out there for use, so rather than write his own, he took a shortcut and wrote a rasterizer instead. This presented a problem as the shipping service that provided the labels that was using offered labels in three formats: PNG, PDF, and ZPL. Instead, the HPRT series support TSPL, another printer language developed by TSC. So this little printer must be a clone of a printer in that family. In the ShortNickName field, it identifies itself as HPRT N41, which is a popular HP printer. The PPD file for the little printer gave the first clue. On Linux, printer drivers also have a PPD file that describes what a printer can handle in paper size and other settings. So while the printer showed up as an endpoint, it wasn’t working as the filters (the part of the driver that knows how to convert from a PNG to ZPL) was x86 only. ZPL, at its core, is just a language describing ASCII commands transmitted over a serial connection. Not quite content to leave it there, he began to chip away at the layers until he had a working driver. Unfortunately, had big dreams for creating a Raspberry Pi-based print station and found the drivers packaged for this particular printer were not ARM compatible. However, was looking around online and found a small label printer on everyone’s favorite online warehouse for a great price that suggested it supported ZPL. When you think of the small machines that print the sticky labels on packages, you might not expect to find a complex printer with its own programming language (ZPL). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |