Author Topic: libusb-1.0 port to OS/2 - help needed  (Read 75673 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
libusb-1.0 port to OS/2 - help needed
« on: April 26, 2013, 01:24:47 pm »
Hi All,

Some would be aware that I have been working on porting libusb 1.0 to OS/2.  The previous OS/2 port is at version 0.1.x level, which is not used anymore by many current applications.

I have managed to successfully scan some files using Sane built with libusb 1.0, and I have also ported lsusb, a linux application to view attached USB devices.

I would be very appreciative if people could help by testing these applications on their systems.

For Sane - I'm really interested in users who are currently successfully scanning via *usb* with older versions/builds of Sane. I need to know if the libusb backend is performing as well as the previous backend that directly called usbcalls. The test Sane build is available from https://dl.dropboxusercontent.com/u/76425158/sane-1.0.23-os2-20130426.zip

For lsusb - I'm wanting to ensure all devices that show in something like usbdock, are shown by lsusb. Additionally, I want to ensure the information presented by 'lsusb -v' (ie a detailed device report) matches the device reports from usbdock (formatting differences aside). lsusb can be downloaded from https://dl.dropboxusercontent.com/u/76425158/lsusb.zip

See the readme.os2 in each package for details on how to capture the logging information from libusb.

Thanks in advance,

Paul

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 387
  • Karma: +5/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #1 on: April 26, 2013, 03:13:56 pm »
Tried lsusb here on my TP500.  It detects exactly the same devices as USBDock: fingerprint reader, webcam, mouse, bluetooth, and keypad.  I assume you don't want the debug output if it worked properly. :)

I'll try sane on my other PC later today.

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: libusb-1.0 port to OS/2 - help needed
« Reply #2 on: April 26, 2013, 06:24:54 pm »
Nice work. I tried lsusb on eComStation 2.0 with the following results:

1. Yes, the devices that show up in UsbDock are shown by lsusb.

2. Yes, the information presented by 'lsusb -v' matches the device reports from  UsbDock.

3. No, the file /extras/share/usb.ids was not found.

I created d:\extras\share and copied usb.ids used by usbres.exe and that worked.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #3 on: April 26, 2013, 06:47:30 pm »
7 systems. LSUSB works as described on all of them.

Sorry, no USB scanner to work with.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #4 on: April 26, 2013, 11:06:31 pm »
Nice work. I tried lsusb on eComStation 2.0 with the following results:

1. Yes, the devices that show up in UsbDock are shown by lsusb.

2. Yes, the information presented by 'lsusb -v' matches the device reports from  UsbDock.

3. No, the file /extras/share/usb.ids was not found.

I created d:\extras\share and copied usb.ids used by usbres.exe and that worked.

Thanks - I wonder if usb.ids is included in eCS.  If it is, I could try and change the code in lsusb to look in that location...

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #5 on: April 26, 2013, 11:52:54 pm »
Hi Paul,

Where do you want us to send the debug information?

My report for Lsusb is about the same as Wim's except I have WSeB and am using Usbres (no eCS hence no UsbDock) for usb information

While Lsusb finds and identifies my Epson Perfection 640U scanner the version of Sane you want testing does not.  I have created a debug log file using the test.cmd you supplied in the zip hence my question about where you want that information sent.

Re. usb.ids just remember that not all of us are using eCS - mine is in the same dir as Usbres (\tools\usb).

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #6 on: April 27, 2013, 12:27:52 am »
Thanks - I wonder if usb.ids is included in eCS.  If it is, I could try and change the code in lsusb to look in that location...

It is in eCS\bin

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #7 on: April 27, 2013, 03:37:48 am »
Please send logs for things that are not working to Paul at Smedley dot id dot au

What would be really useful for sane is a debug log of a working scanimage -L

Hi Paul,

Where do you want us to send the debug information?

My report for Lsusb is about the same as Wim's except I have WSeB and am using Usbres (no eCS hence no UsbDock) for usb information

While Lsusb finds and identifies my Epson Perfection 640U scanner the version of Sane you want testing does not.  I have created a debug log file using the test.cmd you supplied in the zip hence my question about where you want that information sent.

Re. usb.ids just remember that not all of us are using eCS - mine is in the same dir as Usbres (\tools\usb).

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #8 on: April 27, 2013, 08:06:25 am »
To be clearer (now that I'm home):

What I'd like is a scan using an older sane version using something like the following test.cmd
set SANE_DEBUG_EPSON2=255
set SANE_DEBUG_SANEI_USB=255
scanimage -v  >output.pnm 2>debugoutput.txt

with both a working Sane build - and also with the test build.

This will hopefully help me see where the problem in libusb lies.

Send both debugoutput.txt to me

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #9 on: April 27, 2013, 08:57:45 am »
Please hold off testing USB scanners - I found some issues.

Turns out my 'successful' scans used the wrong build of scanimage :(

Now that I'm using the correct build I have some issues here too.

I fixed one already, but now I need to find an implementation for clock_gettime()

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #10 on: April 27, 2013, 05:17:51 pm »
Thanks - I wonder if usb.ids is included in eCS.  If it is, I could try and change the code in lsusb to look in that location...

It is in eCS\bin

Also a slightly older copy in amouse, they're both from 2007, at least in eCS 2.1

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #11 on: April 28, 2013, 02:21:39 am »
Hi All,

Updated lsusb now available.

 https://dl.dropboxusercontent.com/u/76425158/lsusb-os2-20130428.zip Only significant change is that the max size for report from UsbQueryDeviceReport is now 2048 vs 1024 previously.

Interestingly, I had used 2048 in Sane, whereas Rich used 1024 for libusb 0.1 - guess where I stole the code from :)

Two builds included - one in logging, one in nonlogging.

This change hopefully fixes a problem Wim reported with DeviceReports failing on a Logitech webcam

Cheers,

Paul

muffetta

  • Guest
Re: libusb-1.0 port to OS/2 - help needed
« Reply #12 on: April 28, 2013, 07:43:57 am »
All versions work well and report the same devices identification of usbdock, but I have a scanner Mustek 1200 USB that when connected is attached and detached in an infinite loop, so, the report is right but sane/tame can't use it. I also disabled the usb widget (eCS 2.2 beta) but the scanner does not work (0kb output), indeed even before (tame included in eCS, the same problem).
Regards.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #13 on: April 28, 2013, 11:49:14 am »
Hi Barbara,

Please let me knwo thedevice id of he Mustek 1200 scanner.  Once I fix the remaining known issues I have here with libusb1.0 I'd like to try and fix the issues with your device.

muffetta

  • Guest
Re: libusb-1.0 port to OS/2 - help needed
« Reply #14 on: April 28, 2013, 01:11:56 pm »
Hi, Paul
lsusb report
Bus 001 Device 001: ID 055f:0006 Mustek Systems, Inc. ScanExpress 1200 UB
Thanks for your effort !