Author Topic: USB Scanners and ArcaOS  (Read 3245 times)

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 71
  • Posts: 742
  • Karma: +14/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #45 on: January 08, 2021, 11:53:09 pm »
ok, yes that worked. Thanks !
I am not familiar with yum/rpm.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 71
  • Posts: 742
  • Karma: +14/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #46 on: January 09, 2021, 12:11:16 am »
Hi andreas

Which version of libusb10.dll is installed? - the current release of libusb1 is 1.0.21-2 plus the libusb1-legacy-0 release 1.0.16-2

Some debugging tips from the 1.0.27 readme.os2 :-

requires the following environment variable set so that Sane can find it's configuration files:
set sane_config_dir=?:\sane\etc\sane.d
where ? = drive letter involved

set SANE_DEBUG_SANEI_USB=255 - turns on debug information for the USB interface


I suggest you create a simple cmd file to set variables and test scanner eg:-

rem scan.cmd
set sane_config_dir=j:\programs\sane\etc\sane.d
set beginlibpath=j:\programs\sane\lib;
set SANE_DEBUG_DLL=255
scanimage -L 2> debugL.log

 (change drive letters to suit your system)

Hopefully when run in the scanimage directory will create debugL.log which can be examined in the editor to try and spot where things go wrong.


Regards

Pete

Hi Pete, as far as I can tell, at least the SANE version that is packaged as RPM uses usb100.dll and not libusb10.dll. usb100.dll seems to be the successor to libusb10.dll. usb100.dll in turn calls USBCALLS.DLL.
It looks like only "sane-find-scanner.exe" makes use of these USB libs. Maybe, that is called by "scanimage.exe".
I would really like to know what's wrong with the latest USBCALLS.DLL. I know Silvan worked on usb100.dll to work around some design deficiency in USBCALLS.DLL (which always existed).

Paul Smedley

  • Hero Member
  • *****
  • Thank You
  • -Given: 57
  • -Receive: 108
  • Posts: 807
  • Karma: +47/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #47 on: January 09, 2021, 01:10:00 am »
Hi andreas

Which version of libusb10.dll is installed? - the current release of libusb1 is 1.0.21-2 plus the libusb1-legacy-0 release 1.0.16-2

Some debugging tips from the 1.0.27 readme.os2 :-

requires the following environment variable set so that Sane can find it's configuration files:
set sane_config_dir=?:\sane\etc\sane.d
where ? = drive letter involved

set SANE_DEBUG_SANEI_USB=255 - turns on debug information for the USB interface


I suggest you create a simple cmd file to set variables and test scanner eg:-

rem scan.cmd
set sane_config_dir=j:\programs\sane\etc\sane.d
set beginlibpath=j:\programs\sane\lib;
set SANE_DEBUG_DLL=255
scanimage -L 2> debugL.log

 (change drive letters to suit your system)

Hopefully when run in the scanimage directory will create debugL.log which can be examined in the editor to try and spot where things go wrong.


Regards

Pete

Hi Pete, as far as I can tell, at least the SANE version that is packaged as RPM uses usb100.dll and not libusb10.dll. usb100.dll seems to be the successor to libusb10.dll. usb100.dll in turn calls USBCALLS.DLL.
It looks like only "sane-find-scanner.exe" makes use of these USB libs. Maybe, that is called by "scanimage.exe".
I would really like to know what's wrong with the latest USBCALLS.DLL. I know Silvan worked on usb100.dll to work around some design deficiency in USBCALLS.DLL (which always existed).

When I first built libusb, I called the DLL libusb10.dll. bitwise knew better and renamed it....

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 547
  • -Receive: 114
  • Posts: 3061
  • Karma: +17/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Scanners and ArcaOS
« Reply #48 on: January 09, 2021, 04:51:49 pm »
Hi

I'm back with the USB scanner testing.

- ArcaOS 5.0.6 - 14.202
- AN USB Driver 12.07
- USBRESMG.SYS 12.07
- USBCALLS.DLL -  2020-08-15 -12.07 - (only one on the system - no usbcalls from rpm installed).
- libusb1 - 1.0.21-2
- libusb1-legacy-0 1.0.16-2
- Sane from Netlabs RPM - sane-backends - 1.0.28-2
 
- Epson L4150 multifunction printer (04b8:1135)

Config.SYS
Code: [Select]
set sane_config_dir=x:\etc\sane.d
set SANE_DEBUG_epsonds=255
set SANE_DEBUG_SANEI_USB=255
set SANE_DEBUG_DLL=255

LSUSB
Code: [Select]
[X:\]lsusb
Bus 001 Device 001: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 002: ID 04b8:1135 Seiko Epson Corp.
Bus 001 Device 003: ID 147e:1002 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 004: ID 05c8:0317 Cheng Uei Precision Industry Co., Ltd (Foxlink)

Do any new drives appear in the Drives folder when you attach a scanner?
No

OS2DASD
I had this trap on OS2DASD when I run "ScanImage -L"
I REM OS2ASPI.DMD (I think I have no need for it on the Thinkpad L420), rebooted and for the moment the trap is gone.

Testing
I did the "ScanImage -L >out.txt" and I got the "No scanner were identified".
Code: [Select]
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

Here it is the "scanimage -v 1>output.pnm 2>debugoutput.txt" results.

This is how I stand now, what else do you suggest to try to make the "04b8:1135" scanner to work?

Regards

« Last Edit: January 09, 2021, 05:16:33 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 48
  • Posts: 1078
  • Karma: +1/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #49 on: January 09, 2021, 05:46:30 pm »
Hi Martin

Looking through your debugoutput.txt file it looks as though sane/scanimage does not have support for the epson scanner as both epsonds and espon2 sections show a list of pci ids which those backends support and 0x04b8/0x1135 is not listed.

You could try adding the pci ids to the epsonds and epson2 .conf files # USB section eg epson2.conf:-

# epson2.conf
#
# here are some examples for how to configure the EPSON2 backend

# SCSI
scsi EPSON
# for the GT-6500:
#scsi "EPSON SC"

# Parallel port
#pio 0x278
#pio 0x378
#pio 0x3BC

# USB
usb 0x04b8 0x1135

# For libusb support for unknown scanners use the following command
# usb <product ID> <device ID>
# e.g.:
# usb 0x4b8 0x110

# Network
#
# net 192.168.1.123
net autodiscovery


Regards

Pete

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 41
  • Posts: 232
  • Karma: +7/-0
    • View Profile
    • Wim's home page
Re: USB Scanners and ArcaOS
« Reply #50 on: January 09, 2021, 05:58:25 pm »
Hi Andreas,

Perhaps How I installed SANE and TAME for the first time on my ArcaOS system. I used a two step approach. helps you in getting your CanoScan LiDE 210 scanner working.

The sane-find-scanner.exe (size 81.044) works and shows:found USB scanner (vendor=0x04a9 [Canon], product=0x190a [CanoScan], chip=GL124) at libusb:001:005

Speaking about backends. The scanimage.exe that works (size 4.817.128) has the sane scanner specific backends linked in.

Wim

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 547
  • -Receive: 114
  • Posts: 3061
  • Karma: +17/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Scanners and ArcaOS
« Reply #51 on: January 09, 2021, 06:23:50 pm »
Looking through your debugoutput.txt file it looks as though sane/scanimage does not have support for the epson scanner as both epsonds and espon2 sections show a list of pci ids which those backends support and 0x04b8/0x1135 is not listed.

You could try adding the pci ids to the epsonds and epson2 .conf files # USB section eg epson2.conf:-

# epson2.conf

Thanks Pete. I just did that with epson2.conf following your advice.

What should I do now to test the scanner?

I'm attaching the new "scanimage -v 1>output.pnm 2>debugoutput.txt"

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 48
  • Posts: 1078
  • Karma: +1/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #52 on: January 09, 2021, 09:45:39 pm »
Hi Martin

Looking through your latest debugoutput.txt it seems the scanner is recognised and opened, see line 1729, but something goes wrong after that.

Does the scanner also have wireless connectivity? - If "Yes" turn that off while trying to setup usb.

You probably need Paul or Sylvan to look through the debug file as there is more chance of them spotting a problem.


Regards

Pete

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 71
  • Posts: 742
  • Karma: +14/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #53 on: January 09, 2021, 10:08:21 pm »
Hi Andreas,

Perhaps How I installed SANE and TAME for the first time on my ArcaOS system. I used a two step approach. helps you in getting your CanoScan LiDE 210 scanner working.

The sane-find-scanner.exe (size 81.044) works and shows:found USB scanner (vendor=0x04a9 [Canon], product=0x190a [CanoScan], chip=GL124) at libusb:001:005

Speaking about backends. The scanimage.exe that works (size 4.817.128) has the sane scanner specific backends linked in.

Wim
Hi Wim,
I assume you are using an up to date version of USBCALLS.DLL and USBRESMG.SYS, correct?
That at least would confirm that we do not need to rework either one.

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 41
  • Posts: 232
  • Karma: +7/-0
    • View Profile
    • Wim's home page
Re: USB Scanners and ArcaOS
« Reply #54 on: January 10, 2021, 12:19:21 am »
Hi Wim,
I assume you are using an up to date version of USBCALLS.DLL and USBRESMG.SYS, correct?
That at least would confirm that we do not need to rework either one.
Yes Lars, that is correct. No rework required.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 23
  • Posts: 904
  • Karma: +10/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #55 on: January 10, 2021, 05:15:43 am »
So what is the strategy / configuration options available to utilize the RPM SANE release in a TAME installation?

I haven't actually tried it yet but it seems like removing the previous SANE install from the TAME directory and literally having TAME issue the normal calls it normally would, which in this case would all come from the \usr\bin directory, should suffice?

It goes w/o saying that the appropriate changes in the various SANE SET...= options need to be made as well.

Martin,
My experience does not directly apply to your problem, but having previously used my HP ScanJet 6390 through the SCSI interface I'm looking to simplify and convert to USB hook up. So far the CLI attempts have worked and I am getting a good scan. Once I can test the TAME re-config I will provide a fuller report-out, although I think for the most part everyone else here has covered that pretty well.

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 41
  • Posts: 232
  • Karma: +7/-0
    • View Profile
    • Wim's home page
Re: USB Scanners and ArcaOS
« Reply #56 on: January 10, 2021, 11:20:44 am »
So what is the strategy / configuration options available to utilize the RPM SANE release in a TAME installation?

I haven't actually tried it yet but it seems like removing the previous SANE install from the TAME directory and literally having TAME issue the normal calls it normally would, which in this case would all come from the \usr\bin directory, should suffice?

It goes w/o saying that the appropriate changes in the various SANE SET...= options need to be made as well.

I guess that scanimage.exe (size 25.154) in \usr\bin works by dynamically loading scanner specific backends.
It seems to me that the "Sane from Netlabs RPM - sane-backends - 1.0.28-2" does not contain these.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 71
  • Posts: 742
  • Karma: +14/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #57 on: January 10, 2021, 12:25:35 pm »
Exactly. You need to install an additional RPM that is not listed as a prerequisite.
You need to install "sane-backends-drivers-scanners".
That will drop a bunch of DLLs into /usr/lib/sane, one DLL per conf file.
And if a scanner is a USB scanner, these DLLs will use usb100.dll which in turn uses USBCALLS.DLL to do their job.

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 41
  • Posts: 232
  • Karma: +7/-0
    • View Profile
    • Wim's home page
Re: USB Scanners and ArcaOS
« Reply #58 on: January 10, 2021, 03:25:00 pm »
Exactly. You need to install an additional RPM that is not listed as a prerequisite.
You need to install "sane-backends-drivers-scanners".
That will drop a bunch of DLLs into /usr/lib/sane, one DLL per conf file.
And if a scanner is a USB scanner, these DLLs will use usb100.dll which in turn uses USBCALLS.DLL to do their job.
So now I have installed "sane-drivers-scanners" and I have deleted scanimage.exe (size 4.817.128) from h:\tame.

Now scanning with the CanoScan LiDE 210 using Tame/2 on my ArcaOS system works with the latest drivers.

Thank you, Lars!

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 23
  • Posts: 904
  • Karma: +10/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #59 on: January 10, 2021, 03:51:03 pm »
I guess that scanimage.exe (size 25.154) in \usr\bin works by dynamically loading scanner specific backends.
It seems to me that the "Sane from Netlabs RPM - sane-backends - 1.0.28-2" does not contain these.

Yup, that's right.

I took a look at the SANE RPMs that are currently out there last night, here is what I installed:

1) sane-backends.pentium4                         1.0.28-2.oc00
This is the core of the SANE package, but limitted to mostly the EXEs themselves.

2) sane-backends-daemon.pentium4                  1.0.28-2.oc00
This is the network daemon in case you want to serve up your locally attached scanner over the network.

3) sane-backends-doc.noarch                       1.0.28-2.oc00
Documentation for SANE...although scanimage appears to be corrupted. At least here despite the fact that it can be found here => \usr\share\man\man\scanimage.1.gz, executing 'man scanimage' just produces a blank one-liner :
Code: [Select]
[G:\usr]man scanimage
 Manual page scanimage(1) line ?/? (END) (press h for help or q to quit)

4) sane-backends-drivers-scanners.pentium4        1.0.28-2.oc00
This is the other part that actually has the scanner hardware backend details. I am guessing this was split up b/c that approach would allow you to update these independently of the EXEs themselves.

5) sane-backends-libs.pentium4                    1.0.28-2.oc00
This is the matching drivers DLL package.

So per Wim's previous recommendation I went back to the older post. Having completely purged SANE from the current TAME install location, indeed the RPM release of scanimage.exe appears to be the only thing that must be physically moved back to the TAME directory. Having updated all of the other settings that allows TAME to use the RPM SANE release.

Here is what I have in my CONFIG.SYS:

Code: [Select]
REM **********************
REM ***  SANE - START  ***
REM **********************
REM Line below is specific to TAME install
rem SET SANE_CONFIG_DIR=G:\apps\graphics\tools\tame\conf

REM Line below is specific to RPM install
SET SANE_CONFIG_DIR=g:\etc\sane.d
SET SANE_DEFAULT_DEVICE=libusb:001:001

SET SANE_DEBUG_HPAIO=4
SET SANE_DEBUG_HP=4
SET SANE_DEBUG_SANEI_USB=4
SET SANE_DEBUG_DLL=4

REM Options below allow to keep the connection OPEN all the time
REM    as opposed to an OPEN/CLOSE operation
REM SET SANE_HP_KEEPOPEN_SCSI=1
REM SET SANE_HP_KEEPOPEN_USB=1
REM SET SANE_HP_KEEPOPEN_DEVICE=1
REM **********************
REM ***   SANE - END   ***
REM **********************

That has allowed me to successfully scan from CLI as well as through TAME using the USB hookup.

I suppose the only other thing that I'm unclear about is the SET SANE_DEFAULT_DEVICE=libusb:001:001 statement. This does work here, however TAME still references the 'hp' backend and indeed the CLI it executes still uses that as well, namely:

Code: [Select]
Start:    10 Jan 2021  00:43:52
Job:      Scan to file
Command1: START /MIN /C SCANIMAGE.EXE -d hp --resolution 1200 --format=tiff -l 0 -t 0 -x 215 -y 296 > G:\tmp\scanner\Image025.tif
File:     G:\tmp\scanner\Image025.tif (17764970 bytes)
End:      10 Jan 2021  00:46:36

For consistency's sake it's worth adjusting this in TAME, which is what I will test out next.

Ahh, one other thing, the USB DLLs.

Martin,
Here is what I have:

1) libusb1.pentium4                          1.0.21-2.oc00
2) libusb1-legacy-0.pentium4                 1.0.16-2.oc00.L
3) libusbcalls.i686                          12.07-1.oc00