Usblp0 removed almost immediately

Hi, I am attempting to connect printer HP P1102 through p910nd.

  1. HP Smart Install has been disabled using SIUtility in HP driver package
  2. The following packages have been installed: kmod-usb-printer p910nd luci-app-p910nd

root@GL-MT300N-V2:/dev# ubus call system board
{
“kernel”: “4.14.221”,
“hostname”: “GL-MT300N-V2”,
“system”: “MediaTek MT7628AN ver:1 eco:2”,
“model”: “GL-MT300N-V2”,
“board_name”: “gl-mt300n-v2”,
“release”: {
“distribution”: “OpenWrt”,
“version”: “19.07.7”,
“revision”: “r11306-c4a6851c72”,
“target”: “ramips/mt76x8”,
“description”: “OpenWrt 19.07.7 r11306-c4a6851c72”
}
}

Problem is I cannot see /dev/usb/lp0

root@GL-MT300N-V2:/# ls /dev/usb/
root@GL-MT300N-V2:/#

Attempts to connect and reboot etc. have generally failed.

root@GL-MT300N-V2:/# dmesg | grep usb
[ 4.923139] usbcore: registered new interface driver usbfs
[ 4.928882] usbcore: registered new interface driver hub
[ 4.934407] usbcore: registered new device driver usb
[ 5.027431] phy phy-10120000.usbphy.0: remote usb device wakeup disabled
[ 5.034266] phy phy-10120000.usbphy.0: UTMI 16bit 30MHz
[ 5.234801] usbcore: registered new interface driver usb-storage
[ 5.244136] usbcore: registered new interface driver uas
[ 20.618718] usbcore: registered new interface driver cdc_acm
[ 20.685398] usbcore: registered new interface driver cdc_wdm
[ 20.805670] usbcore: registered new interface driver ipheth
[ 21.617430] usbcore: registered new interface driver usblp
[ 21.697974] usbcore: registered new interface driver usbserial
[ 21.704069] usbcore: registered new interface driver usbserial_generic
[ 21.710771] usbserial: USB Serial support registered for generic
[ 22.046864] usbcore: registered new interface driver cdc_ether
[ 22.068778] usbcore: registered new interface driver cdc_ncm
[ 22.084900] usbcore: registered new interface driver cp210x
[ 22.090636] usbserial: USB Serial support registered for cp210x
[ 22.115193] usbcore: registered new interface driver huawei_cdc_ncm
[ 22.206047] usbcore: registered new interface driver qmi_wwan
[ 22.216748] usbcore: registered new interface driver rndis_host
[ 22.227263] usbcore: registered new interface driver sierra
[ 22.232999] usbserial: USB Serial support registered for Sierra USB modem
[ 22.244106] usbcore: registered new interface driver sierra_net
[ 22.260164] usbcore: registered new interface driver option
[ 22.266000] usbserial: USB Serial support registered for GSM modem (1-port)
[ 96.042264] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 96.269156] usblp 1-1:1.0: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x002A
[ 97.860667] usblp0: removed

Even after removing the USB cable and reconnecting it, usblp0 gets removed almost immediately.

[25728.647106] usb 1-1: new high-speed USB device number 3 using ehci-platform
[25728.853539] usblp 1-1:1.0: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x03F0 pid 0x002A
[25729.302197] usblp0: removed

The device appears in lsusb:

root@GL-MT300N-V2:/# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 03f0:002a HP, Inc LaserJet P1102
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@GL-MT300N-V2:/#

Not sure if this comparison makes sense, but I have been able to see lp0 on a Raspberry Pi and a Debian-based laptop. Just not this Mango router.

What else can I do / look for to troubleshoot this?

Can you check this thread

Pls try using cups.

When I Google usblp0: removed, some people also said install cups and not the driver you use.

The interesting part could happen between there two timestamps, but your grep usb will eat them.
Does the GL.iNet is using udev? Than it could be interesting if the VID:PID is listed

I have purposely avoided CUPS as this solution:

  1. uses more space to install (which the MT-300v2 may not have)
  2. much harder to manage, more config to fiddle around with
  3. I am not interested in printing from a linux desktop, just want to share the P1102 over network
  4. no guarantee it will work either, seeing that the lp0 is not detected

I have previously gotten this p910nd solution + HP P1102 to work on debian, and looking to emulate the same using GL.inet platform. When it comes to having solution, I’d rather ditch GL.inet and go back to the working platform, rather than fiddle with CUPS.

I have double checked, there is nothing in between the two timestamps… it just connects and then disconnects with no reason provided.

I’ll look into this udev you mentioned, maybe it can lead to something new.

Cups is a little heavy, but on general it is the solution to choose.
Since the driver tries to provide cheap implemented functions to communicate between Linux and the printer, cups using (often, there are more ways) the PPD from Windows, where the cheap programmers have more experience in crappy implementation.

Printers are pain. Don’t try to outsmart it with ‘best practice’. You’ll lose this game.

1 Like

My bad. I misunderstood, that p910nd is not the driver for HP P1102.
p910nd is a printserver, that is doing something similar, like CUPS. But the Printer driver seems to be missing.
Even kmod-usb-printer sounds for me more generic, than a HP printer would work. I’m missing something like ‘hplip’.

In the old days, the printers spoke PS (Postscript). It was easy to make a printer interface (LPT:, lpr, IPP, …) But the newer printer needs to translate ‘their language’ to postscript, before they can be used.
Many windows ppd files are available in CUPS. I don’t know how p910nd is build, but as I can read it only will translate TCP/IP to ‘local print service’.

So if the driver is not installed, the USB ID (vid 0x03F0 pid 0x002A) is tried to assign to usblp0, but no driver available and it is released immediately. The system is reacting as designed, it is not a bug.

Your task is now: find a OpenWRT capable driver for your printer.

1 Like

According to the last post in this thread, the issue seems to be that the HP P1102 is a host-based printer that requires processing by the host (e.g., Windows, Linux) that basic p910nd does not provide:

Other people have reported that it will work with CUPS.

I have an oldie, but goodie Canon printer that I also could not get to work through p910nd on OpenWRT.

I do not work for and I do not have formal association with GL.iNet

thanks for this pointer, I had a look in HP website and found the driver page https://developers.hp.com/hp-laserjet-professional-p1102-printer , though the issue now is how to run the 30 MB app in the tiny mango router. I suppose I should have suspected there is a little bit extra software required other than just kmod-usb-printer and the p910nd, the reason why debian-based laptop worked but the router did not.

I’ll post more if I can find something else of value or if I manage to get it to work somehow.

thanks, I’ll report back here if I ever get around to, and can make it work with cups.