Page 2 of 6 FirstFirst 1234 ... LastLast
Results 16 to 30 of 82

Thread: HP LaserJet 1000/1005/1020 not working: sort of solution

  1. #16
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Your post-mount should start with #!/bin/sh and be a chmod +x

  2. #17
    Join Date
    Jul 2004
    Posts
    32
    Quote Originally Posted by Oleg
    Your post-mount should start with #!/bin/sh and be a chmod +x
    Stupid me I forgot #!/bin/sh

    Now it works great!

    When I disconnect or power off/on the firmware is loaded in the printer right away!

    Great work!
    KEEP FORUMS @ WL500G.INFO UP!!! - DONATE NOW, CLICK HERE!!!

  3. #18

    Exclamation no '/dev/usb/lp0', '/dev/usb' empty

    ./usb_printerid /dev/usb/lp0 | grep -q FWVER || cat sihp1020.dl > /dev/usb/lp0
    I haven't got anything under /dev/usb, it's totally empty. The printer is connected to the usb, but when I run the command above, it says:

    Error: No such file or directory: can't open '/dev/usb/lp0'

    Of course it can't open it because it isn't there. WHY?

    If I try with /dev/lp0 it says:
    Error: Invalid argument: GET_DEVICE_ID on '/dev/lp0'

    maybe because this lp0 stands for the LPT printer, doesn't it?

  4. #19

    Thumbs down what now?

    ...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
    Code:
    usb_printerid /dev/usb/lp0
    and voila, the new firmware was on the printer, saying FWVER:200411xx

    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:

    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
    the error messages are the same as before, even with the new firmware.

    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??

  5. #20
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    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)
    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.

  6. #21
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by pardonfiu
    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.)
    Yes, Processed with arm2hpdl, cross-compiled usb_printerid and put online.

  7. #22

    Exclamation New router

    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?

  8. #23
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by pardonfiu
    It seems that the post-mount script doesn't run when switching on/off the printer (or connecting).
    Right. Post-mount is executed after usb drive is get mounted.
    What should I do to automate firmware loading? How can I force the post-mount script to run when switching on the printer?
    No way with post mount. Instead you should replace hotplug handler using smg like this:

    post-mount:
    Code:
    # ... load firmware ...
    usb_printerid bla-bla-bal
    # replace a hotplug handler
    echo /usr/local/sbin/hotplug > /proc/sys/kernel/hotplug
    create a /usr/local/sbin/hotplug
    Code:
    #!/bin/sh
    # call firmware handler
    /sbin/hotplug $*
    ... check for printer plug and load firmware ...
    if bla-bla-bla; then
     ... load firmware ...
    fi
    P.S. this is just an idea, you've to read about hotplug in linux and finish this. Post it back then.

  9. #24

    hotplug

    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...

  10. #25
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    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'

  11. #26

    Talking Final Breakthrough!!!

    Finally....

    here is the hotplug script

    /tmp/local/sbin/hotplug
    Code:
    #!/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 $*
    and I added the following to /tmp/local/sbin/post-boot
    Code:
    echo "/tmp/local/sbin/hotplug" >> /proc/sys/kernel/hotplug
    It works like a charm!!!!!

    I would like to thank all of you, especially you, Oleg!
    This router is amazing with your firmware!

  12. #27
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Actually your script contains some bugs...

  13. #28
    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?

  14. #29
    Quote Originally Posted by Oleg
    Actually your script contains some bugs...
    Yeah, there are some bugs.

    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!

  15. #30

    hotplug problems?

    Hi,

    I've tried to make an ASUS WL-500g to work with a HP LaserJet 1020, but I'm not able to make work reliably.

    I've tried to implement some of the ideas discussed here, but it simply doesn't work in a reliable way - the firmware is not loaded to the printer.

    I have added 3 scripts:

    /tmp/local/sbin/hotplug
    Code:
    #!/bin/sh
    echo --------------- >> /var/log/hotplug.log
    date >> /var/log/hotplug.log
    echo $* >> /var/log/hotplug.log
    set >> /var/log/hotplug.log
    
    if [ "$ACTION" = "add" ] || [ "$1" = "usb" ] || [ "$DEVFS" = "/proc/bus/usb" ]; then
            sleep 5s
            /tmp/usb_printerid /dev/usb/lp0 | grep -q FWVER || cat /tmp/sihp1020.dl > /dev/usb/lp0
            echo "Firmware loaded succesfully!" >> /var/log/hotplug.log
    else
            echo "Device removed" >> /var/log/hotplug.log
    
    fi
    /sbin/hotplug $*
    /tmp/local/sbin/post-boot
    Code:
    #!/bin/sh
    
    sleep 7s
    cd /tmp
    wget http://oleg.wl500g.info/hplj/usb_printerid
    wget http://oleg.wl500g.info/hplj/sihp1020.dl
    chmod +x usb_printerid
    /tmp/local/sbin/post-mount
    Code:
    #!/bin/sh
    echo "/tmp/local/sbin/hotplug" >> /proc/sys/kernel/hotplug
    My perception is that post-boot will be executed after the booting is finished. The post-boot script only waits for some seconds in order to make the AP to be online.
    The post-mount script should be executed after the printer is detected (turned on), but it doesn't execute.

    Do some of you have any ideas to solve printing with ASUS WL-500g and HP LaserJet 1020? Can it be done in a different way, e.g. using CUPS (is CUPS able to upload the firmware to the printer since the driver is installed at the client?)?

    Any suggestions to help me solve this issues will be appreciated :-)

    Best regards,
    Rune

Page 2 of 6 FirstFirst 1234 ... LastLast

Similar Threads

  1. Replies: 3
    Last Post: 18-12-2005, 02:07
  2. Solution for: No printer driver with Mac OSX
    By tortuga in forum WL-500g/WL-500gx Tutorials
    Replies: 0
    Last Post: 16-12-2005, 14:21
  3. Replies: 1
    Last Post: 09-12-2005, 23:29
  4. Problem mit HP LaserJet 1020
    By Gray in forum German Discussion - Deutsch (DE)
    Replies: 0
    Last Post: 05-12-2005, 18:36
  5. Trying to get IDE working on Oleg's Firmware
    By hugo in forum WL-HDD Custom Development
    Replies: 34
    Last Post: 01-11-2004, 19:06

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •