p910nd allow multiple printers through a socket connection to port 910n (where n=1, 2, 3 …). So, we can share more than one printer to OpenWrt. In default, port number when you unplug and plug in different printers. The following configuration uses the Hotplug script to pair printers to designed ports. This allows multiple printers to be recognized, assigned ports based on the product ID, same ports assigned will resume when printers are connected/turned on. Works on both usb printer and parallel printer using serial to USB adapter.
1. Make sure the printer has usb essentials or support for the parallel port
2. Install support for printers.
1 | opkg update |
3. Plug in the printer, record VID and PID.
SSH to the printer and run:
1 | lsusb -v |
or
1 | dmesg grep printer |
Mark down the vid and pid for the printer. Repeat this process for all printers.
4. Add this to /etc/hotplug.d/usb/11-multi-printers
The following code is a demo configuration for a Brother HL2140 on port 9100, a Zebra Eltron LP 2442 Label Thermal Printer on port 9101, and a Brother QL570 on port 9102. Note: $PRODUCT” = “4f9/27/100” represents your printer’s VendorId/ProductId/BcdVersion(1.00 = 100). VID=04f9, PID=0027
1 | #!/bin/sh |
5. Log in to OpenWrt -> service -> p910nd -> Printer server. Finish the configuration
Device = “/dev/Device name from the code above” Port = Assigned port from the code above
Comments