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

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #60 on: January 10, 2021, 04:40:51 pm »
...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.
...

Quick test this was.

No-Go, the 'hp' (in my case) is baked into TAME, I assume through it's scanner list database. So this is actually a non-editable field and is auto-populated once you select the scanner.

Sooo, '-d hp' still works, TAME is happy. Meanwhile the current SET SANE_DEFAULT_DEVICE=libusb:001:001 statement needed a small change. I found multiple on-line references to Linux style mappings, such as:

1) SANE_DEFAULT_DEVICE="hp:/dev/scanner"
2) SANE_DEFAULT_DEVICE="plustek:libusb:002:002"

In the end, relying on Wim's earlier post and using his quick CMD as a template (Thank You Wim!) I was able to whip-up a working setup where the correct value is: "SET SANE_DEFAULT_DEVICE=hp:libusb:001:001".

Here is what that looks like when the following scanimage CLI is executed "g:\usr\bin\scanimage -v 1>\tmp\scanner\scanner_scan.pnm 2>\tmp\scanner\scanner_scan.txt":

Code: [Select]
[sanei_debug] Setting debug level of dll to 4.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.28
[dll] sane_init/read_dlld: attempting to open directory `g:\etc\sane.d/dll.d'
[dll] sane_init/read_dlld: using config directory `g:\etc\sane.d/dll.d'
[dll] add_backend: adding backend `hp'
Output format is not set, using pnm as a default.
[dll] sane_open: trying to open `hp:libusb:001:001'
[dll] load: searching backend `hp' in `/@unixroot/usr/lib/sane'
[dll] load: trying to load `/@unixroot/usr/lib/sane/hp1.dll'
[dll] load: dlopen()ing `/@unixroot/usr/lib/sane/hp1.dll'
[dll] init: initializing backend `hp'
...

One can tell how the 'hp' backend is successfully resolved.

EDIT
====
Has anyone taken over the TAME maintenance? I think Paul has released the SANE updates in the past, may have been packaged together actually...it's been a while.

The reason I ask, there are some changes in the past backends and the latest one we have today (1.0.28), specifically for my 'hp' backend the 'grayscale' setting is no longer valid, instead it would appear that was replaced by 'gray'.

A quick look at the TAME INI file shows some of these being stored, but I haven't quite figured out how these map to the actual SANE commands TAME uses, is this hard-coded?
« Last Edit: January 10, 2021, 07:17:13 pm by Dariusz Piatkowski »

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #61 on: January 11, 2021, 12:17:37 pm »
 Hi Dariusz,

 Copy SCANNER.DAT to SCANNER.INI, then open SCANNER.INI in an INI editor. You will see the scanners listed and keys for the various settings for each tab of Tame. The hard part is figuring out which values are for what setting, but theoretically you can create a new scanner for Tame this way...

Regards,

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #62 on: January 11, 2021, 06:50:20 pm »
Hi Dariusz

To get a Canon MG7550 scanner working with Tame/2 I used the following steps:-

1] Identify a  scanner with similar capabilities

2] Copy scanner.dat to scanner.dat.ini

3] Open scanner.dat.ini in an INIEditor

4] Copy Application of scanner identified in 1] above to a new Application name - usually Make/Model

5] Edit key A to reflect the .conf file used and scanner Make/model

6] Save and Exit INIEditor

7] Copy scanner.dat.ini to scanner.dat

8] Test with Tame/2


Hopefully the above will work for you.


Regards

Pete

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #63 on: January 14, 2021, 01:05:31 am »
Dave and Pete,

Thank you guys, this worked great.

Since my HP 6390C was already there, I had simply adjusted the 'Grayscale' label and replaced with 'Gray'. This worked, TAME automatically recognized the modified settings AND they worked. I atteched that adjusted file in case anyone else needs this.

Now given all the other contents of the INI file, can anyone actually spell out the format so that I could decipher what scaner features are actually utilized?

This may seem like a pointless question, after all whatever choices are present they should be visible in the GUI itself, right?

Well, because of the above I have to ask the following: does anyone know if TAME has dithering controls support? Specifically if the scanner supports 'Halftone' option, are there any Tame controls that allow me to adjust the settings?

For example, my scanner shows:

Code: [Select]
--halftone-pattern Coarse|Fine|Bayer|Vertical|Horizontal|Custom [inactive]
        Defines the halftoning (dithering) pattern for scanning halftoned
        images.

...but I have not spotted where this setting is controlled in Tame (maybe it is not?). It may be that the "[inactive]" indicates that the scanner does NOT support this...not sure, I figured I'd ask first.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Scanners and ArcaOS
« Reply #64 on: January 14, 2021, 02:51:08 am »
Hi

I'm stuck with my USB scanner tests. I really don't know what else I should test with SANE to find out if the scanners that I have are supported or not. I'm don't know what else to do to complete my tests and get to the conclusion that the scanner work or not.

I guess that once I make it work with SANE (if possible), later I should give a try with Tame/2 for the frontend.

Regards

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

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #65 on: January 14, 2021, 03:04:25 pm »
Hi Martin

I think you are waiting for a release of sane that includes the utushi backend for the epson scanner.

Maybe you can persuade HP to open source the plugins that some HP scanners (including the ScanJet Pro 2000 S1) and printers need to work with the hplip package.


Sorry to not be more helpful

Pete

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Scanners and ArcaOS
« Reply #66 on: January 14, 2021, 03:14:30 pm »
Hi Pete.

Do you think that , according to my tests on this thread and your experience, these scanners will not work with the current tools we have on ArcaOS? So, a SANE utushi backend port is needed for my Epson scanner and for the HP scanner there is missing a component that is not open.

I just ask these because I don't have experience with SANE and I just want to know that I have tried what it is possible with the software that we have ported to the platform.

Regards
« Last Edit: January 14, 2021, 03:37:22 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

andreas

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +4/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #67 on: January 14, 2021, 05:16:38 pm »
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,
thanks for the script.
i had to change the location for beginlibpath to usr\lib\sane.

the debug log says: 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).

unfortunatelly that's all i get...

andreas

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +4/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #68 on: January 14, 2021, 05:26:59 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

thanks so much for your message. and sorry for the late response.
still i have my problem. but at least now i know that there should be a solution since in your case it works.

i just found out, that i have sane-backends, sane-backends-daemon and sane-backends-libs installed, but not
sane-backends-drivers.scanners, though my try trial to install it leads to the information that i have all packages
installed...

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #69 on: January 15, 2021, 05:07:27 pm »
Hi Martin

I think you have summed up correctly: the epson is not yet supported and the hp needs a closed source plugin to work with hplip/hpaio.

The good news is that there is a backend being developed for the epson  :-)


Regards

Pete

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #70 on: January 15, 2021, 08:03:41 pm »
Hi andreas

Sorry, missed the debug line out of the script. Add this line just after the set SANE_DEBUG_DLL=255 line
   set SANE_DEBUG_SANEI_USB=255

Hopefully we will then get some debug info to work with.


Regards

Pete

andreas

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +4/-0
    • View Profile
Re: USB Scanners and ArcaOS
« Reply #71 on: February 11, 2021, 09:24:08 pm »
sorry again for the late reply.
meanwhile i installed/updated all the relevant rmp-packages.
running your scropt i get now a positive result. is says:
device 'genesys:libusb:001:001' is a Canon Lide 210 flatbed scanner.

the debug log says some dlls are missing: v4l1.dll, qcam1.dll, pint1.dll, mu_usb21.dll, mustek1.dll, hpsj5s1.dll, den_net1.dll, coscan31.dll,arus48u1.dll
are these files imprtant for me in any way? if so, where can i find them?

Maybe the missing of these dll lead to a problem with not beeing able to ioen the lighttavle folder and also the OCR tool.

though my scanner does not appear in the program a an option to choose, it works when i choose "lide 60"

followed some hint i found here in an other thread, i copied scanner.dat to scanner.ini. with the use of an ini-editor i copied the application Canon Lide 60 and named it Canon Lide 210. Now i can see my scanner on the display...

thanks for your help
« Last Edit: February 11, 2021, 10:48:02 pm by andreas »