Printer's /dev/usb/lpx file is not shown on ubuntu mate 20.04
Hello all linux user!
On ubuntu mate 18.04 I used to send data in hexadecimal representation into a usb thermal printer with this command: cat cmds.txt > /dev/usb/lp0 I used as well sending the printing esc/p commands to this file from my program. I upgraded to ubuntu mate 20.04 and realized, that the lpx file (belonging to the printer) does not appear in the /dev/usb folder, like on ubuntu mate 18.04. I have googled a little bit and found, that dmesg | grep usblp command should provide some useful information about connection of the printer. I am not skilled at this area, therefore I do not use proper terms at this point. With its usage I realized, that: On Ubuntu 20.04 the output is : $ dmesg | grep usblp [ 17.634888] usblp 3-3:1.0: usblp1: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04F9 pid 0x209D [ 17.634950] usbcore: registered new interface driver usblp [ 35.318303] usblp1: removed while on Ubuntu 18.04 the log does not end with removed keyword and the lpx file shows in the expected path. The printer shows in output of lsusb on both systems: $ lsusb Bus 003 Device 003: ID 04f9:209d Brother Industries, Ltd QL-820NWB P-touch Label Printer I suspect that on ubuntu 20.04 there is some process removing the usblp. Since the usblp should be responsible for creation of lpx files, they do not show up. My question is, how to get usblp working to show lpx files on ubuntu mate 20.04? Thank you. |
It's worth checking if the usblp module itself has been unloaded. Most people nowadays use cups for printing with a libusb backend and that's supposed to be incompatible with usblp, so maybe that's why your new Ubuntu removes it. It could well be blacklisted in one of the files in /etc/modprobe.d.
You can easily check if the module is loaded by using Code:
lsmod|grep usblp Code:
sudo modprobe usblp |
Hi hazel,
thank you for your reply. I apologize for the delay. Somehow, I did not get the info email about your reply. Quote:
Code:
lsmod | grep 'usblp' usblp 28672 0 So, I expect it to be loaded. Quote:
Meanwhile, I think I found the core of the problem. On Ubuntu 18.04, when i run Code:
usb-devices Code:
usb-devices T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=04f9 ProdID=209d Rev=01.00 S: Manufacturer=Brother S: Product=QL-820NWB S: SerialNumber=000M0Z803274 C: #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=0mA I: If#=0x0 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=04 Driver=usbfs I: If#=0x1 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=04 Driver=usbfs |
Hello hazel,
thank you for you reply. I checked everything according to your suggestions. usblp is loaded and is no blacklisted. But I found, that a wrong driver is assigned to the printer. When I run Code:
usb-devices How can I fix that? |
Quote:
Sorry but I'm not sure where you go from here. |
My point is,
that on ubuntu 18.04 the lpx files appear in the /dev/usb/, where the printer's driver is usblp. On ubuntu 20.04, the driver is usbfs. If i managed to switch the driver in ubuntu 20.04 to usblp, the lpx files would be created in /dev/usb/. But this prehaps cannot be done directly: Quote:
https://unix.stackexchange.com/quest...iver-to-device It seems, I will have to switch to libusb to establish communication with my printer on newer OSs. Quote:
Thanks |
All times are GMT -5. The time now is 09:54 PM. |