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 |