From: Raphael L. <rap...@gm...> - 2004-10-15 09:34:22
|
Hello Simon, did you find the problem with USB on FreeBSD yet? You posted a message on 21st September that you were working on it... I would like to use the scanning functionality, but this is only available when using hpoj - which doesn't work for USB on FreeBSD. Thanks, Raphael -- G System, The Evolving Universe - http://www.g-system.at |
From: Volker S. <vs...@Fr...> - 2004-10-15 17:31:25
|
* Raphael Langerhorst <rap...@gm...>: > I would like to use the scanning functionality, but this is only > available when using hpoj - which doesn't work for USB on FreeBSD. This a notice a received a while back on the hpoj-port: "I got it [scanning] working :) yay. I just tried it on 6-CURRENT and things work. I had to make the device be detected as a ugen device not ulpt. That was the trick since libusb only speaks ugen." Cheers, Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME Two more months. |
From: Raphael L. <rap...@gm...> - 2004-10-19 17:41:47
|
On Friday 15 October 2004 18:07, Volker Stolz wrote: > * Raphael Langerhorst <rap...@gm...>: > > I would like to use the scanning functionality, but this is only > > available when using hpoj - which doesn't work for USB on > > FreeBSD. > > This a notice a received a while back on the hpoj-port: > "I got it [scanning] working :) yay. I just tried it on 6-CURRENT > and things work. I had to make the device be detected as a ugen > device not ulpt. That was the trick since libusb only speaks > ugen." > > Cheers, > Volker Is this code in hpoj CVS HEAD? And: thanks for the info! Raphael -- G System, The Evolving Universe - http://www.g-system.at |
From: Volker S. <vs...@Fr...> - 2004-10-20 08:29:56
|
* Raphael Langerhorst <rap...@gm...>: > On Friday 15 October 2004 18:07, Volker Stolz wrote: >> * Raphael Langerhorst <rap...@gm...>: >> > I would like to use the scanning functionality, but this is only >> > available when using hpoj - which doesn't work for USB on >> > FreeBSD. >> >> This a notice a received a while back on the hpoj-port: >> "I got it [scanning] working :) yay. I just tried it on 6-CURRENT >> and things work. I had to make the device be detected as a ugen >> device not ulpt. That was the trick since libusb only speaks >> ugen." > > Is this code in hpoj CVS HEAD? No special code is required -- just a minimal addition to the ptal-init-script where 'moreWildcards' is defined. I didn't get a concrete patch out of him and lack the hardware to test this myself (luckily only JetDirect here :). If you use the FreeBSD port, it should take of finding libusb etc, so the above should be the only change required. Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME Two more months. |
From: Raphael L. <rap...@gm...> - 2004-10-20 20:18:17
|
On Wednesday 20 October 2004 10:29, Volker Stolz wrote: > * Raphael Langerhorst <rap...@gm...>: > > On Friday 15 October 2004 18:07, Volker Stolz wrote: > >> * Raphael Langerhorst <rap...@gm...>: > >> > I would like to use the scanning functionality, but this is > >> > only available when using hpoj - which doesn't work for USB on > >> > FreeBSD. > >> > >> This a notice a received a while back on the hpoj-port: > >> "I got it [scanning] working :) yay. I just tried it on > >> 6-CURRENT and things work. I had to make the device be detected > >> as a ugen device not ulpt. That was the trick since libusb only > >> speaks ugen." > > > > Is this code in hpoj CVS HEAD? > > No special code is required -- just a minimal addition to the > ptal-init-script where 'moreWildcards' is defined. I didn't get a > concrete patch out of him and lack the hardware to test this myself > (luckily only JetDirect here :). > If you use the FreeBSD port, it should take of finding libusb etc, > so the above should be the only change required. > > Volker OK, found it, thanks a lot! Raphael -- G System, The Evolving Universe - http://www.g-system.at |
From: Volker S. <vs...@Fr...> - 2004-10-21 07:43:21
|
* Raphael Langerhorst <rap...@gm...>: >> No special code is required -- just a minimal addition to the >> ptal-init-script where 'moreWildcards' is defined. I didn't get a >> concrete patch out of him and lack the hardware to test this myself >> (luckily only JetDirect here :). >> If you use the FreeBSD port, it should take of finding libusb etc, >> so the above should be the only change required. > > OK, found it, thanks a lot! Jeff pointed out you might have to unload the USB-modules umass and ulpt, though, since those will capture the device -- ugen is only available if the device is not assigned to one of the above. Also, this won't work if you have them compiled into the kernel. [Jeff, are you lurking here?] -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME Two more months. |
From: Raphael L. <rap...@gm...> - 2004-10-23 11:28:33
|
On Thursday 21 October 2004 09:43, Volker Stolz wrote: > * Raphael Langerhorst <rap...@gm...>: > >> No special code is required -- just a minimal addition to the > >> ptal-init-script where 'moreWildcards' is defined. I didn't get > >> a concrete patch out of him and lack the hardware to test this > >> myself (luckily only JetDirect here :). > >> If you use the FreeBSD port, it should take of finding libusb > >> etc, so the above should be the only change required. > > > > OK, found it, thanks a lot! > > Jeff pointed out you might have to unload the USB-modules umass and > ulpt, though, since those will capture the device -- ugen is only > available if the device is not assigned to one of the above. Also, > this won't work if you have them compiled into the kernel. Ah, yes, I just noticed that the device gets attached as ulpt0. I think I have the devices in the kernel... will remove them and rebuild kernel. Thanks, Raphael PS: I just tried it (with ulpt0) out with a fresh 5.3-RC1 and it didn't work... When I have removed the devices and rebuilt the kernel I'll report back. > > [Jeff, are you lurking here?] -- G System, The Evolving Universe - http://www.g-system.at |
From: Raphael L. <rap...@gm...> - 2004-10-24 19:09:56
|
On Saturday 23 October 2004 13:27, Raphael Langerhorst wrote: > On Thursday 21 October 2004 09:43, Volker Stolz wrote: > > * Raphael Langerhorst <rap...@gm...>: > > >> No special code is required -- just a minimal addition to the > > >> ptal-init-script where 'moreWildcards' is defined. I didn't > > >> get a concrete patch out of him and lack the hardware to test > > >> this myself (luckily only JetDirect here :). > > >> If you use the FreeBSD port, it should take of finding libusb > > >> etc, so the above should be the only change required. > > > > > > OK, found it, thanks a lot! > > > > Jeff pointed out you might have to unload the USB-modules umass > > and ulpt, though, since those will capture the device -- ugen is > > only available if the device is not assigned to one of the above. > > Also, this won't work if you have them compiled into the kernel. > > Ah, yes, I just noticed that the device gets attached as ulpt0. I > think I have the devices in the kernel... will remove them and > rebuild kernel. > > Thanks, > Raphael > > PS: I just tried it (with ulpt0) out with a fresh 5.3-RC1 and it > didn't work... When I have removed the devices and rebuilt the > kernel I'll report back. > > > [Jeff, are you lurking here?] OK, I just tried things out, I had a CVS checkout of around February and it seems I can't check out current CVS versions (what's the server adress). It didn't work but the device was recognised :) Still there is some communication error.... Can maybe anyone send me a tar ball with the latest source? Thanks a lot, Raphael -- G System, The Evolving Universe - http://www.g-system.at |
From: Raphael L. <rap...@gm...> - 2004-11-14 09:49:16
|
On Saturday 23 October 2004 13:27, Raphael Langerhorst wrote: > On Thursday 21 October 2004 09:43, Volker Stolz wrote: > > * Raphael Langerhorst <rap...@gm...>: > > >> No special code is required -- just a minimal addition to the > > >> ptal-init-script where 'moreWildcards' is defined. I didn't > > >> get a concrete patch out of him and lack the hardware to test > > >> this myself (luckily only JetDirect here :). > > >> If you use the FreeBSD port, it should take of finding libusb > > >> etc, so the above should be the only change required. > > > > > > OK, found it, thanks a lot! > > > > Jeff pointed out you might have to unload the USB-modules umass > > and ulpt, though, since those will capture the device -- ugen is > > only available if the device is not assigned to one of the above. > > Also, this won't work if you have them compiled into the kernel. > > Ah, yes, I just noticed that the device gets attached as ulpt0. I > think I have the devices in the kernel... will remove them and > rebuild kernel. > > Thanks, > Raphael > > PS: I just tried it (with ulpt0) out with a fresh 5.3-RC1 and it > didn't work... When I have removed the devices and rebuilt the > kernel I'll report back. > > > [Jeff, are you lurking here?] I am now at FreeBSD 5.3 Release, built the kernel WITHOUT ulpt, umass (and also without uscanner). The PSC 1210 gets attached to ugen0. Also I used _latest_ CVS version of hpoj and he recognizes the device but can't open it. HPOJ output is: Probing "%/dev/usb2%/dev/ugen0"... *** Found "psc 1200 series" but failed to communicate with it! *** Elapsed time for this attempt was 1 second(s). *** Check syslog file for ptal-mlcd error messages. *** See hpoj documentation for troubleshooting information. syslog output is: Nov 14 10:45:18 guardian ptal-mlcd: ERROR at ExMgr.cpp:3752, dev=<mlc:usb:probe@%/dev/usb2%/dev/ugen0>, pid=654, e=16, t=1100425518 usb_open failed! Nov 14 10:45:18 guardian ptal-mlcd: ERROR at ExMgr.cpp:2572, dev=<mlc:usb:probe@ %/dev/usb2%/dev/ugen0>, pid=654, e=25, t=1100425518 Couldn't set up print interface! Note that I think elapsed time for this attempt was 1 second(s) is more likely 0 seconds - at least I get the above message quite "immediately". Any suggestions? Raphael -- G System, The Evolving Universe - http://www.g-system.at |
From: Raphael L. <rap...@gm...> - 2004-11-16 16:40:28
|
Hi all, I'm currently tracking down the issue that causes hpoj to fail with PSC devices connected on USB on FreeBSD. If anyone has some hints what could make it fail, let me know. configuration: FreeBSD 5.3 RELEASE, libusb 0.1.7, hpoj of 16th Nov 2004, PSC 1210 32 Bit Athlon CPU, I'm using a 4 port PCI card for USB 2.0 (to which the device is attached) The device gets identified at /dev/ugen0 but "communication" fails (see previous emails for details) Thanks, Raphael |
From: Raphael L. <rap...@gm...> - 2004-11-16 17:19:35
|
On Tuesday 16 November 2004 17:39, Raphael Langerhorst wrote: > Hi all, > > I'm currently tracking down the issue that causes hpoj to fail with > PSC devices connected on USB on FreeBSD. > > If anyone has some hints what could make it fail, let me know. > > configuration: > FreeBSD 5.3 RELEASE, libusb 0.1.7, hpoj of 16th Nov 2004, PSC 1210 > 32 Bit Athlon CPU, I'm using a 4 port PCI card for USB 2.0 (to > which the device is attached) > The device gets identified at /dev/ugen0 but "communication" fails > > (see previous emails for details) > > Thanks, > Raphael > Hello again, First I wrote a little test application to see whether I can open an usb device twice without closing it in between. It turned out that I could open /dev/ugen0 (my PSC 1210) the first time but it failed for the second time. It succeeded again if I closed the device in between. -> You can open an usb device only once or you have to close it before reopening (keep that in mind, see below). I added some debugging code to bsd.c for the libusb library that tells me when a device gets opened and when a device gets closed. Then I removed the "> /dev/null" from the system call of the ptal-init script to see the output of the mlcd call: Probe for USB-connected devices ([y]/n)? y Probing "%/dev/usb2%/dev/ugen0"... usb_os_open called on /dev/ugen0 usb_os_close called on /dev/ugen0 usb_os_open called on /dev/ugen0 usb_os_close called on /dev/ugen0 usb_os_open called on /dev/ugen0 usb_os_open called on /dev/ugen0 ptal-mlcd: ERROR at ExMgr.cpp:3752, dev=<mlc:usb:probe@%/dev/usb2%/dev/ugen0>, p id=4251, e=16, t=1100624870 usb_open failed! ptal-mlcd: ERROR at ExMgr.cpp:2572, dev=<mlc:usb:probe@%/dev/usb2%/dev/ugen0>, p id=4251, e=16, t=1100624870 Couldn't set up print interface! usb_os_close called on /dev/ugen0 *** Found "psc 1200 series" but failed to communicate with it! *** Elapsed time for this attempt was 0 second(s). *** Check syslog file for ptal-mlcd error messages. *** See hpoj documentation for troubleshooting information. ---------------------------------------------------------------------- The "usb_os_open" and "usb_os_close" lines is the debugging code I put into my libusb. As you can see hpoj tries to close, open, close, open, open the device which of course causes it to fail -> that's why ptal tells me that usb_open failed! Ok now, why does hpoj need to open the usb device twice??? I'll have a look into that myself, but if this already helps to shoot the bug in hpoj then let me know (I don't know the source code as well as the authors). Regards, Raphael -- G System, The Evolving Universe - http://www.g-system.at |
From: Raphael L. <rap...@gm...> - 2004-11-16 19:16:16
Attachments:
freebsd_psc_scan.patch
|
On Tuesday 16 November 2004 18:18, Raphael Langerhorst wrote: > On Tuesday 16 November 2004 17:39, Raphael Langerhorst wrote: > > Hi all, > > > > I'm currently tracking down the issue that causes hpoj to fail > > with PSC devices connected on USB on FreeBSD. > > > > If anyone has some hints what could make it fail, let me know. > > > > configuration: > > FreeBSD 5.3 RELEASE, libusb 0.1.7, hpoj of 16th Nov 2004, PSC > > 1210 32 Bit Athlon CPU, I'm using a 4 port PCI card for USB 2.0 > > (to which the device is attached) > > The device gets identified at /dev/ugen0 but "communication" > > fails > > > > (see previous emails for details) > > > > Thanks, > > Raphael > > Hello again, > > First I wrote a little test application to see whether I can open > an usb device twice without closing it in between. It turned out > that I could open /dev/ugen0 (my PSC 1210) the first time but it > failed for the second time. It succeeded again if I closed the > device in between. -> You can open an usb device only once or you > have to close it before reopening (keep that in mind, see below). > > I added some debugging code to bsd.c for the libusb library that > tells me when a device gets opened and when a device gets closed. > Then I removed the "> /dev/null" from the system call of the > ptal-init script to see the output of the mlcd call: > > Probe for USB-connected devices ([y]/n)? y > > Probing "%/dev/usb2%/dev/ugen0"... usb_os_open called on > /dev/ugen0 usb_os_close called on /dev/ugen0 > usb_os_open called on /dev/ugen0 > usb_os_close called on /dev/ugen0 > usb_os_open called on /dev/ugen0 > usb_os_open called on /dev/ugen0 > > ptal-mlcd: ERROR at ExMgr.cpp:3752, > dev=<mlc:usb:probe@%/dev/usb2%/dev/ugen0>, p > id=4251, e=16, t=1100624870 > usb_open failed! > > ptal-mlcd: ERROR at ExMgr.cpp:2572, > dev=<mlc:usb:probe@%/dev/usb2%/dev/ugen0>, p > id=4251, e=16, t=1100624870 > Couldn't set up print interface! > usb_os_close called on /dev/ugen0 > > *** Found "psc 1200 series" but failed to communicate with it! > *** Elapsed time for this attempt was 0 second(s). > *** Check syslog file for ptal-mlcd error messages. > *** See hpoj documentation for troubleshooting information. > > ------------------------------------------------------------------- >--- > > > The "usb_os_open" and "usb_os_close" lines is the debugging code I > put into my libusb. As you can see hpoj tries to close, open, > close, open, open the device which of course causes it to fail -> > that's why ptal tells me that usb_open failed! > > Ok now, why does hpoj need to open the usb device twice??? I'll > have a look into that myself, but if this already helps to shoot > the bug in hpoj then let me know (I don't know the source code as > well as the authors). > > > Regards, > Raphael Ok, I have scanning OR printing working :) But this is NOT a final solution(!!) only better than nothing. Attached is a patch that makes it possible to use a HP PSC1210 attached to USB work with FreeBSD 5.3 (with hpoj of course). I used a CVS snapshot of today. If you use the patch then you can print if: * you have the ulpt module loaded (kldload ulpt). You do not need to start hpoj as the PSC is identified as an USB printer and connected as such at /dev/ulpt0 (or /dev/ulpt1, ...) or you can scan if you have the module NOT loaded (you probably have to remove "device ulpt" from your kernel configuration). Then you can use "ptal-init setup" and "ptal-init start" to launch hpoj, it will only serve the sane backend (as the printing backend is disabled by the patch). You can use /boot/loader.conf to load ulpt on startup: ulpt_load="YES" if you load ulpt on startup you can print (the PSC gets attached as /dev/ulpt, you do not need hpoj), if you do not load ulpt on startup (and you don't have it in the kernel!!) then you can scan (you need hpoj for this, the device gets attached as /dev/ugen0). In this configuration you can also setup hpoj with "ptal-init setup". Ok, the funny thing about is that you probably have to restart to change the configuration (I played around a little with kldload and kldunload but it seems that ugen0 doesn't appear after unlaoding ulpt). If at all possible I want the hpoj author to fix the problem with hpoj - I guess it's not neccessary to have the device open for scanning AND printing at the same time, probably after mlcd is set up the device could be closed to reopen it for printing(??) After starting hpoj the devices are not opened anyway (are they?). I haven't investigated closesly but I guess it requires more understanding of hpoj. So, I hope this is archived now on the net at last. Regards, Raphael -- G System, The Evolving Universe - http://www.g-system.at |
From: Volker S. <st...@i2...> - 2004-11-16 19:15:20
|
* Raphael Langerhorst <rap...@gm...>: > I'm currently tracking down the issue that causes hpoj to fail with > PSC devices connected on USB on FreeBSD. Looks like GMANE ate my previous mail: In your output was some additional /dev/usb2%/dev/ugen0 -- any chance of looking into where this is coming from? -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME |