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

Wim Brul

  • Sr. Member
  • ****
  • Posts: 300
  • Karma: +26/-0
    • View Profile
    • Wim's home page
Re: libusb-1.0 port to OS/2 - help needed
« Reply #45 on: May 17, 2013, 12:33:20 pm »
Quote
Any change of a debug log from 1.0.22? Might also be worth sending you a scanimage.exe with libusb logging enabled....

Hi Paul,

I have attached the relevant portion of the debugoutput.txt from 1.00.22.
Yes, please send me a scanimage.exe with libusb logging enabled.

Regards, Wim.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #46 on: May 17, 2013, 11:14:09 pm »
Quote
Any change of a debug log from 1.0.22? Might also be worth sending you a scanimage.exe with libusb logging enabled....
I have attached the relevant portion of the debugoutput.txt from 1.00.22.
Yes, please send me a scanimage.exe with libusb logging enabled.

http://smedley.id.au/tmp/scanimage-logging.zip

muffetta

  • Guest
Re: libusb-1.0 port to OS/2 - help needed
« Reply #47 on: May 18, 2013, 07:50:33 am »
Mine using this test.cmd:

set beginlibpath=c:\sane\lib;
set SANE_DEBUG_MUSTEK_USB=255
set SANE_DEBUG_SANEI_USB=255
set sane_config_dir=\sane\etc\sane.d
scanimage -v  >output.pnm 2>debugoutput.txt

return debugoutput.txt in attachment and a size 0  output.pnm
output.pnm came from  scanimage > output.pnm (your last with libusb logging enable)
Regards

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #48 on: May 18, 2013, 07:54:34 am »
Mine using this test.cmd:

set beginlibpath=c:\sane\lib;
set SANE_DEBUG_MUSTEK_USB=255
set SANE_DEBUG_SANEI_USB=255
set sane_config_dir=\sane\etc\sane.d
scanimage -v  >output.pnm 2>debugoutput.txt

return debugoutput.txt in attachment and a size 0  output.pnm
output.pnm came from  scanimage > output.pnm (your last with libusb logging enable)
Regards

Same as before:
libusb: 0.001000 debug [os2_get_device_list] 0 devices detected

Which is weird, as you can see the scanner with scanimage -L and with lsusb

Seems there is something weird with USB or usbcalls on your system

ivan

  • Hero Member
  • *****
  • Posts: 1603
  • Karma: +20/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #49 on: May 18, 2013, 08:00:32 pm »
Hi Paul,

A little more information.  I copied scanimage over to the tame directory and almost everything that worked with the old scanimage works with your new one - except sizing an area in the preview window.  I can size an area and it shows up as it did but scanimage scans the whole area regardless.  If this can be fixed, good, if not it just means cropping in PMView - one extra stage which will only be a big deal if I have a lot of scans to crop.

Ian B Manners

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 475
  • Karma: +10/-0
  • I am the computer, it is me.
    • View Profile
    • ComKal Networks Australia
Re: libusb-1.0 port to OS/2 - help needed
« Reply #50 on: May 19, 2013, 10:52:11 am »
With scanimage.exe  build 12/05/13   08:31

[D:\]scanimage -L
device `epson2:libusb:001:001' is a Epson GT-8300 flatbed scanner

scanimage --mode color --resolution 300 --brightness -1 > output.pnm
Produces the normal scan quality in color.

========================
[D:\]scanimage -L
device `plustek:libusb:001:001' is a Hewlett-Packard Scanjet 2200c flatbed scanner

scanimage --mode Color -l 0 -t 0 -x 215 -y 297 --resolution 150  > output.pnm
Looks good, requires scan area info.

========================
[D:\]scanimage -L
device `hp:libusb:001:001' is a Hewlett-Packard ScanJet 5200C flatbed scanner

scanimage --mode Color > output.pnm
Ohh, that's really nice gamma :)
This scanner has normally only been this good with the SCSI option.
« Last Edit: May 19, 2013, 04:08:27 pm by Ian Manners »
Cheers
Ian B Manners

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #51 on: May 19, 2013, 11:17:27 am »
Hi Ivan,

A little more information.  I copied scanimage over to the tame directory and almost everything that worked with the old scanimage works with your new one - except sizing an area in the preview window.  I can size an area and it shows up as it did but scanimage scans the whole area regardless.  If this can be fixed, good, if not it just means cropping in PMView - one extra stage which will only be a big deal if I have a lot of scans to crop.

This is pretty strange - I doubt the command line syntax has changed - it certainly hasn't been caused by the libusb changes....

Might we worth enabling tame logging to see what command line it's passing to scanimage.

rbri

  • Guest
Re: libusb-1.0 port to OS/2 - help needed
« Reply #52 on: May 19, 2013, 12:08:58 pm »
Hi Paul,

did some test with my epson scanner.

device `plustek:libusb:001:001' is a Epson Perfection 1250/Photo flatbed scanner
device `test:0' is a Noname frontend-tester virtual device
device `test:1' is a Noname frontend-tester virtual device

The scanner is detected and a simple color scan has produced a tiff. Looks good so far.
Do you need anything more to be tested?

Thanks
     RBRi

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #53 on: May 20, 2013, 04:23:22 am »
Hi RBRi

did some test with my epson scanner.

device `plustek:libusb:001:001' is a Epson Perfection 1250/Photo flatbed scanner
device `test:0' is a Noname frontend-tester virtual device
device `test:1' is a Noname frontend-tester virtual device

The scanner is detected and a simple color scan has produced a tiff. Looks good so far.
Do you need anything more to be tested?

Not really - the main thing I need is to confirm it is working as well as the previous Sane builds - it's good confirmation that libusb-1.0 is reasonably feature complete, which is a relief - as I spent way too much time on the port (most of it caused by my lack of programming skills :P)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #54 on: May 25, 2013, 11:54:49 am »
Added libusb 1.0 to my site at http://smedley.id.au/os2ports_new/index.php?page=libusb-1-0

It is now implemented as a DLL.

lsusb has also been added to that site as an example application that uses libusb10.dll

Future builds of Sane, CUPS and hplip will all use this DLL to provide support for USB devices.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #55 on: May 25, 2013, 12:01:49 pm »
A test version of scanimage (needs the full Sane 1.0.23 package from post 1) that uses libusb10.dll is at http://smedley.id.au/tmp/scanimage-20130525.zip This isn't working on my LIDE20 :(

Wim Brul

  • Sr. Member
  • ****
  • Posts: 300
  • Karma: +26/-0
    • View Profile
    • Wim's home page
Re: libusb-1.0 port to OS/2 - help needed
« Reply #56 on: May 25, 2013, 03:56:02 pm »
I copied libusb10.dll into d:\ecs\dll and I copied lsusb.exe into d:\ecs.bin and lsusb works for me.
I copied scanimage.exe into d:\sane and I could scan :) with my CanoScan Lide 210 scanner.

@echo off
setlocal
set beginlibpath=d:\sane\lib;
set SANE_CONFIG_DIR=d:\sane\etc\sane.d
d:\sane\scanimage -d genesys --mode color --resolution 300 1>xscan.pnm 2>xscan.txt
d:\programs\tame\nconvert -in -1 -out bmp xscan.pnm
d:\mmos2\mmplayer\ib xscan.bmp
endlocal

Note: In previous posts I used d:\sane23 to distinguish from d:\sane which contains the old version and it appears that I must not do that. I had to rename d:\sane into d:\sane22 and to rename d:\sane23 into d:\sane in order to get the new version to work.

David McKenna

  • Hero Member
  • *****
  • Posts: 815
  • Karma: +25/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #57 on: May 25, 2013, 03:58:28 pm »
Paul,

  When I try 'lsusb -v'  I get an error: lsusb: 'cannot open "/extras/share/usb.ids", No such file or directory', and indeed there isn't. I do have usb.ids in C:\ecs\bin. I am able to scan with my Epson 2480 photo scanner, thanks!
« Last Edit: May 25, 2013, 04:21:28 pm by David McKenna »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #58 on: May 25, 2013, 11:48:20 pm »
Hi Dave,

  When I try 'lsusb -v'  I get an error: lsusb: 'cannot open "/extras/share/usb.ids", No such file or directory', and indeed there isn't. I do have usb.ids in C:\ecs\bin. I am able to scan with my Epson 2480 photo scanner, thanks!

For the next drop of lsusb, I'll try make it look in the default ecs location for usb.ids.

Glad your scanner works still :)

Cheers,

Paul

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2289
  • Karma: +176/-0
    • View Profile
Re: libusb-1.0 port to OS/2 - help needed
« Reply #59 on: May 26, 2013, 01:28:33 am »
  When I try 'lsusb -v'  I get an error: lsusb: 'cannot open "/extras/share/usb.ids", No such file or directory', and indeed there isn't. I do have usb.ids in C:\ecs\bin. I am able to scan with my Epson 2480 photo scanner, thanks!

With https://dl.dropboxusercontent.com/u/76425158/lsusb-20130526.zip it should look in %OS_DIR%\bin for usb.ids.  eCS sets OS_DIR to ?:\ECS, and installs usb.ids into \ecs\bin.

non eCS users can set OS_DIR to x:\OS2 and place usd.ids into x:\OS2\bin