I successfully setup Kubuntu 12.10, and Windows 7 to use HP 1020 via Oleg WL500gp V2:
Kubuntu 12.10:
Driver: HP LaserJet 1020 Foomatic/foo2zjs-z1 (recommended)
Connection: lpd://192.168.1.1/LPRServer
Windows 7:
Like Windows XP, BUT don't forget to uncheck two way communication in the printer properties unless it will continuously repeat the printing job.
...after 5 hours of strugling...
I've downloaded a modified version of the "foo2zjs" driver (tar.gz from linuxprinting.org). It contains the same firmware for the HP 1020 that Oleg mentioned (I think you actually copied it from there, didn't you.)
I booted up Suse 9.3 and compiled the foo2zjs package (specially made for HP1020), pushed the printer in the USB port of the machine (that is running Suse), Suse (I think via UDEV) recognized the device on the USB.Then I did a
....Code:cat hp1020.img > /dev/usb/lp0
The printer started to init itself again as if it were switched on. Cool...
then
and voila, the new firmware was on the printer, saying FWVER:200411xxCode:usb_printerid /dev/usb/lp0
Then with the new firmware I could print a test page in SuSe 9.3 using Cups, then pulling the plug and inserting it into the Windows machine, tried to print....worked also flawlessly.
Than (WITHOUT switching the printer off) I put the USB plug into the router. The same symptom remained:
the error messages are the same as before, even with the new firmware.Code:Jan 1 01:00:06 kernel: usb.c: new USB bus registered, assigned bus number 1 Jan 1 01:00:06 kernel: hub.c: USB hub found Jan 1 01:00:06 kernel: hub.c: 2 ports detected Jan 1 01:00:07 kernel: hub.c: new USB device 00:04.0-1, assigned address 2 Jan 1 01:00:07 kernel: usb.c: USB device not accepting new address=2 (error=-145) Jan 1 01:00:07 kernel: hub.c: new USB device 00:04.0-1, assigned address 3 Jan 1 01:00:07 kernel: usb.c: USB device not accepting new address=3 (error=-145) Jan 1 01:00:08 kernel: lp0: using parport0 (polling). Jan 1 01:00:08 kernel: usb.c: registered new driver usblp Jan 1 01:00:08 kernel: printer.c: v0.13: USB Printer Device Class driver Jan 1 01:00:10 kernel: usb.c: registered new driver audio
That can be the reason why the p910nd daemon can't create /dev/usb/lp0, because the router can't even access the printer on the USB port.
So what now??
These errors are hardware problem, so you should fix them first BEFORE playing with software. If you use a hub, replace it or connect directly. If you do not use a hub, try different port on the wl500g deluxe. If it still does not work, replace a cable.Jan 1 01:00:07 kernel: hub.c: new USB device 00:04.0-1, assigned address 2
Jan 1 01:00:07 kernel: usb.c: USB device not accepting new address=2 (error=-145)
Jan 1 01:00:07 kernel: hub.c: new USB device 00:04.0-1, assigned address 3
Jan 1 01:00:07 kernel: usb.c: USB device not accepting new address=3 (error=-145)
Yes, Processed with arm2hpdl, cross-compiled usb_printerid and put online.Originally Posted by pardonfiu
I bought a WL-500G Deluxe just a few hours ago. It recognizes the printer right after connecting...VERY GOOD. All the previous post are working now:
- can upload firmware and check version with usb_printerid, printing works well.
One slight problem is that GJAman's method for changing the firmware right when the printer is switched on, doesn't work for me. When I run /usr/local/sbin/post-mount manually it works like an angel.
It seems that the post-mount script doesn't run when switching on/off the printer (or connecting).
The router recognizes the printer every time I switch it on, it assigns address to it, so it is aware of the printer.
What should I do to automate firmware loading? How can I force the post-mount script to run when switching on the printer?
Right. Post-mount is executed after usb drive is get mounted.Originally Posted by pardonfiu
No way with post mount. Instead you should replace hotplug handler using smg like this:What should I do to automate firmware loading? How can I force the post-mount script to run when switching on the printer?
post-mount:
create a /usr/local/sbin/hotplugCode:# ... load firmware ... usb_printerid bla-bla-bal # replace a hotplug handler echo /usr/local/sbin/hotplug > /proc/sys/kernel/hotplug
P.S. this is just an idea, you've to read about hotplug in linux and finish this. Post it back then.Code:#!/bin/sh # call firmware handler /sbin/hotplug $* ... check for printer plug and load firmware ... if bla-bla-bla; then ... load firmware ... fi
it seems like the kernel doesn't start /sbin/hotplug (or whatever is in /proc/sys/kernel/hotplug).
I've read much about hotplug on http://linux-hotplug.sourceforge.net/ but couldn't get closer to the solution.
Somehow the system recognizes the printer when turning on, because it refreshes /proc/bus/usb/devices...
I'm stucked with this...
Please post messages after power off/on. They should contain something like this:
usb.c: USB disconnect on device 01:02.0-2.1 address 3
printer.c: usblp0: removed
hub.c: new USB device 01:02.0-2.1, assigned address 5
This means, the /sbin/hotplug should be called for new device. Just checked with a small hotplug replacement and it's indeed called.
Code:[root@wl500gx root]$ cat /tmp/hotplug #!/bin/sh echo --------------- >> /tmp/hotplug.log date >> /tmp/hotplug.log echo $* >> /tmp/hotplug.log set >> /tmp/hotplug.log [root@wl500gx root]$ echo /tmp/hotplug > /proc/sys/kernel/hotplug [root@wl500gx root]$Code:--------------- Sat Jan 7 23:15:13 MSK 2006 usb ACTION='remove' DEVFS='/proc/bus/usb' DEVICE='/proc/bus/usb/002/005' HOME='/' IFS=' ' INTERFACE='7/1/2' PATH='/sbin:/bin:/usr/sbin:/usr/bin' PPID='2' PRODUCT='3f0/7104/100' PS1='\w \$ ' PS2='> ' PS4='+ ' PWD='/' TYPE='0/0/0' --------------- Sat Jan 7 23:15:14 MSK 2006 usb ACTION='add' DEVFS='/proc/bus/usb' DEVICE='/proc/bus/usb/002/006' HOME='/' IFS=' ' INTERFACE='7/1/2' PATH='/sbin:/bin:/usr/sbin:/usr/bin' PPID='2' PRODUCT='3f0/7104/100' PS1='\w \$ ' PS2='> ' PS4='+ ' PWD='/' TYPE='0/0/0'
Finally....
here is the hotplug script
/tmp/local/sbin/hotplug
and I added the following to /tmp/local/sbin/post-bootCode:#!/bin/sh echo --------------- >> /tmp/hotplug.log date >> /tmp/hotplug.log echo $* >> /tmp/hotplug.log set >> /tmp/hotplug.log if [ "$ACTION" = "add" ] || [ "$1" = "usb" ] || [ "$DEVFS" = "/proc/bus/usb" ]; then sleep 5 /tmp/harddisk/etc/usb_printerid /dev/usb/lp0 | grep -q FWVER || cat /tmp/harddisk/etc/sihp1020.dl > /dev/usb/lp0 echo "Firmware loaded succesfully!" >> /tmp/hotplug.log else echo "Device removed" >> /tmp/hotplug.log fi /sbin/hotplug $*
It works like a charm!!!!!Code:echo "/tmp/local/sbin/hotplug" >> /proc/sys/kernel/hotplug
I would like to thank all of you, especially you, Oleg!
This router is amazing with your firmware!
Actually your script contains some bugs...
Righ now I am choosing a new wireless router and thinking about WL500g deluxe. There should be HP LaserJet 1200 printer installed to it and I am wondering if is there any problem with this printer? Can anyone confirm that HP LJ 1200 works well?
Yeah, there are some bugs.Originally Posted by Oleg
1. echo "/tmp/local/sbin/hotplug" >> /proc/sys/kernel/hotplug should be in "/tmp/local/sbin/post-mount"
2. "#!/bin/sh" missing
3. The most important, while I power on/off/on the printer, it doesn't work anymore. Some errors as below:
Mar 20 21:41:18 kernel: usb_control/bulk_msg: timeout
Mar 20 21:41:29 kernel: usb_control/bulk_msg: timeout
Mar 20 21:41:29 kernel: printer.c: usblp0: error -145 reading printer status
I suspect there's something stuck in the router. The printer was not removed successfuly. Is there any solution?
Thanks!
Setup: Pc with Win XP, WL500gP, HP LJ 1020 plugged in Asus.
Router flashed with latest Oleg's firmware. 1020 installed in Win as local printer (following Oleg's tutorial) using HP non-PnP driver (I think it's second on the DL list). Printed test page - everything working. No hotplug scripts, Dl firmware, nothing.
Tomorrow will try LJ 1000 on work, refused to work untill now.
A.