Re: [sane-devel] HP all-in-one printer

2024-05-24 Thread Ralph Little
Hi,

On Fri, May 24, 2024 at 8:02 AM Marco Moock  wrote:

> Am 24.05.2024 um 08:55:39 Uhr schrieb Richard:
>
> > I recently purchased an HP Smart Tank 7602 all-in-one
> > printer, which includes a scanner. My installation of the
> > sane and xsane software was not able to recognize the
> > scanner and I did not see this printer or the 7600 series
> > of printers listed among the supported devices.
>
>
> https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index
> HP Smart Tank 7300 series   3.21.8
>
> Which hplip version is installed on your OS?
>
> --
> Gruß
> Marco
>
> Send unsolicited bulk mail to 1716533739mu...@cartoonies.org


Yeah, further, make sure you have the hplip packages installed.
HP's support for their multifunction machines are good for scanning which
is why we don't have native SANE support for them.

Cheers,
Ralph


Re: [sane-devel] Canon Pixma TS5150- no WIFI-connection

2024-05-22 Thread Ralph Little

Hi,

On 2024-05-22 01:43, Wolfram Heider via sane-devel wrote:


the Canon Pixma TS5150 is a pretty simple inkjet-machine, providing 
printing, copying and scanning (no FAX).


We are talking here just about the WIFI-connection (cable should work).

  * Canon, using a special protocol in the form of bnjp://IP.address,
provdes a proprietary software /scangearmp2/, which is working,
but is pretty rudimentary as well.
  * commercial software like /Vuescan/ is getting into contact
immediately without any configuration
  * SANE - in its last versions - should be able to handle the
bjnp-protocol as well, unfortunately doesn't in this case. You can
make, what you want.



Could you tell us what platform, OS and SANE version you are using 
(output of scanimage -V)?

The TS5100 series machines have been supported for quite some time.

Some newer machines use the bjnp protocol for USB connectivity but use 
other protocols for WiFi. I don't know if this is the case for your 
machine, but we do have this machine series supported for both Wifi and 
USB with the pixma backend. So it should work. Perhaps you can give us 
some more details as to what you see?


But there is a package /sane-airscan/, which does the job, making 
available Xsane, Skanlite and all of the other Opensource-frontends. 
Also without any further configuration.


So my question is: Shouldn't it be possible, to integrate - or, at  
least, to use its technology - /sane-airscan/ into SANE to make 
machines of that kind work directly out of the SANE-box?




That is up to the author or sane-airscan. IIRC, there was some overture 
about some kind of integration but I don't know how far that discussion 
went.
We do have the sane-escl backend, which has some overlap with the 
sane-airscan backend.


Cheers,
Ralph


Re: [sane-devel] Missing package on Launchpad for current Ubuntu LTS version

2024-05-21 Thread Ralph Little
Hi,

On Sun, May 19, 2024 at 3:47 AM Ulf Zibis via sane-devel <
sane-devel@alioth-lists.debian.net> wrote:

>
> Am 10.05.24 um 14:31 schrieb Ulf Zibis via sane-devel:
> > Hi,
> >
> > I like to report, that there is no SANE release for Ubuntu 24.04 by
> Launchpad PPA.
>
> The latest Ubuntu LTS release is 4 weeks old.
> Why isn't there a matching package here? :
> https://launchpad.net/~sane-project/+archive/ubuntu/sane-release
> Or at least a dev version here:
> https://launchpad.net/~sane-project/+archive/ubuntu/sane-git
>
> -Ulf
>
> --
> Von meinem Seibert gesendet
>
>
>
I will get to it at some point. Been a bit busy. :(

Cheers,
Ralph


Re: [sane-devel] Trouble scanning with Canon MF8280

2024-04-25 Thread Ralph Little
Hi,
The diag seems to indicate that the machine is busy. This is often because
a lot of the imageClass machines require it to be put in "remote scanning
mode" in order to scan off it. I believe in this case, you press SCAN on
the machine, and select "Remote Scanner" from the menu.

Cheers,
Ralph

On Thu, Apr 25, 2024 at 4:20 AM Karsten Opel  wrote:

> Hi,
>
> I have tried for some time to scan from a Canon i-Sensys MF8280Cw. To
> exclude network issues the device is now connected to USB.
> It is found by both sane-find-scanner and scanimage -L, detected as
> MF8200C series device.
> scanimage -d test -T passes.
> simple-scan allows to select the device but starting a scan gives "Failed
> to scan: Error communicating with scanner."
> I've set the environment variables as described in
> http://www.sane-project.org/man/sane.7.html and get the output below when
> using scanimage.
> Any ideas why it's not working?
>
> Kind regards
> Karsten
>
> ~$ scanimage >image.pnm
> [13:05:31.639477] [sanei_debug] Setting debug level of dll to 128.
> [13:05:31.639554] [dll] sane_init: SANE dll backend version 1.0.13 from
> sane-backends 1.1.1-debian
> [13:05:31.639569] [dll] sane_init/read_dlld: attempting to open directory
> `./dll.d'
> [13:05:31.639591] [dll] sane_init/read_dlld: attempting to open directory
> `/etc/sane.d/dll.d'
> [13:05:31.639612] [dll] sane_init/read_dlld: using config directory
> `/etc/sane.d/dll.d'
> [13:05:31.639637] [dll] sane_init/read_dlld: considering
> /etc/sane.d/dll.d/hplip
> [13:05:31.639659] [dll] sane_init/read_config: reading dll.d/hplip
> [13:05:31.639681] [dll] add_backend: adding backend `hpaio'
> [13:05:31.639703] [dll] sane_init/read_dlld: done.
> [13:05:31.639721] [dll] sane_init/read_config: reading dll.conf
> [13:05:31.639752] [dll] add_backend: adding backend `pixma'
> Output format is not set, using pnm as a default.
> [13:05:31.639785] [dll] sane_get_devices
> [13:05:31.639797] [dll] load: searching backend `pixma' in
> `/usr/lib/x86_64-linux-gnu/sane:/usr/lib/sane:/usr/lib64/sane'
> [13:05:31.639808] [dll] load: trying to load
> `/usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1'
> [13:05:31.639825] [dll] load: dlopen()ing
> `/usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1'
> [13:05:31.640038] [dll] init: initializing backend `pixma'
> [13:05:31.640062] [sanei_debug] Setting debug level of pixma to 11.
> [13:05:31.640079] [pixma] pixma is compiled with pthread support.
> [13:05:31.640114] [pixma] pixma version 0.28.6
> [13:05:31.654871] [dll] init: backend `pixma' is version 1.0.28
> [13:05:31.654903] [pixma] pixma_collect_devices() found Canon i-SENSYS
> MF8200C Series at libusb:003:011
> [13:05:32.390277] [pixma] pixma_collect_devices() found Canon i-SENSYS
> MF8200C Series at mfnp://192.168.39.107:8610/timeout=3000
> [13:05:32.390337] [pixma] pixma_find_scanners() found 2 devices
> [13:05:32.390359] [dll] load: searching backend `hpaio' in
> `/usr/lib/x86_64-linux-gnu/sane:/usr/lib/sane:/usr/lib64/sane'
> [13:05:32.390373] [dll] load: trying to load
> `/usr/lib/x86_64-linux-gnu/sane/libsane-hpaio.so.1'
> [13:05:32.390408] [dll] load: dlopen()ing
> `/usr/lib/x86_64-linux-gnu/sane/libsane-hpaio.so.1'
> [13:05:32.397265] [dll] init: initializing backend `hpaio'
> [13:05:32.398298] [dll] init: backend `hpaio' is version 1.0.0
> [13:05:33.429751] [dll] sane_get_devices: found 2 devices
> [13:05:33.429794] [dll] sane_open: trying to open
> `pixma:MF8200C_192.168.39.107'
> [13:05:33.429827] [pixma] pixma_collect_devices() found Canon i-SENSYS
> MF8200C Series at libusb:003:011
> [13:05:34.102077] [pixma] pixma_collect_devices() found Canon i-SENSYS
> MF8200C Series at mfnp://192.168.39.107:8610/timeout=3000
> [13:05:34.102145] [pixma] pixma_open(): Canon i-SENSYS MF8200C Series
> [13:05:34.134289] [pixma] *iclass_open* This is a generation 2
> scanner.  *
> [13:05:34.134337] [pixma] Trying to clear the interrupt buffer...
> [13:05:35.142661] [pixma]   no packets in buffer
> [13:05:35.142731] [dll] sane_open: open successful
> [13:05:35.142750] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=0)
> [13:05:35.142767] [dll]
> sane_control_option(handle=0x5641bc236bb0,option=0,action=0,value=0x7ffe72ed3b24,info=(nil))
> [13:05:35.142787] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=0)
> [13:05:35.142800] [dll]
> sane_control_option(handle=0x5641bc236bb0,option=0,action=0,value=0x7ffe72ed3a30,info=(nil))
> [13:05:35.142813] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=1)
> [13:05:35.142823] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=2)
> [13:05:35.142833] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=3)
> [13:05:35.142843] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=4)
> [13:05:35.142853] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=5)
> [13:05:35.142863] [dll]
> sane_get_option_descriptor(handle=0x5641bc236bb0,option=6)
> [13:05:35.142872] [dll]

[sane-devel] Release 1.3.0 issues

2024-02-26 Thread Ralph Little

Hi,
Just an update on the 1.3.0 release.
We appear to be having some issues with the deployment of build 
artifacts at GitLab at the moment.
I'm just trying to sort it out and have raised an issue to try to get 
some assistance.


I will keep you all updated

Cheers,
Ralph



[sane-devel] Release issues

2024-02-12 Thread Ralph Little
Hi,
I have started the release generation process but run into problems with
the release automation scripts.
I won't get chance until Wednesday to deal with this further, so please
bear with me as it is the first time trying to do this.

If anyone has experience with these things and fancies having a look at the
pipeline failure and can let me know what I'm missing I would appreciate it
though!

Cheers,
Ralph


Re: [sane-devel] SANE 4 VIISAN Scaner

2024-02-12 Thread Ralph Little
Hi,


On Mon, Feb 12, 2024 at 4:40 AM Wojciech N. via sane-devel <
sane-devel@alioth-lists.debian.net> wrote:

> Good evening,
>
> I am writing to ask if it will be possible to run the VIISAN V13 scanner
> >>> https://www.viisan.com/en/download/type1.html <<< in your program? I
> am sending a link to Our Linux forum. My nickname is wojtdh >>>
> https://forum.linuxmint.pl/showthread.php?tid=2334=2=V21
>  <<<
>
>
Which model of scanner are you looking for support for?
It looks from the download page that they provide *some* Linux drivers.

Cheers,
Ralph


[sane-devel] Release 1.3.0 process begins....

2024-01-29 Thread Ralph Little
Hi,
I have created a release branch for the 1.3.0 release, which is called
release-1.3.0. A day later than the plan but better late than never. I was
busy yesterday insulating pipes. :D

We are now in functional code freeze, so no new functionality to that
branch please unless it is an emergency! ;) All MRs should target this new
branch if they are intended for the release. Other work can still target
master.

Translators!! Please could you update translations? I have regenerated po
files and updated en_GB. Thank you in advance. For translators that I can
find the email addresses for, I will send out a short email to them.

Cutting of the actual release will occur in 2 weeks time on Sunday 11th
February, so plenty of time to get things done.

Good luck for the release!

Cheers,
Ralph


Re: [sane-devel] Proposed timeline for 1.3.0 release

2024-01-21 Thread Ralph Little

Hi,

On 2024-01-21 15:46, m. allan noah wrote:
Sounds good to me. I have attached an updated copy of doc/releases.md, 
which contains some notes I made during the last release. There were a 
number of missing or poorly documented steps.


OK, thanks I will look at that.

Cheers,
Ralph


allan

On Sun, Jan 21, 2024 at 2:34 PM Ralph Little  wrote:

Hi,
So it looks like we will do a 1.3.0 release.
I propose a fairly quick timeline since there isn't a lot of
critical stuff waiting to go in it. The only thing that I am aware
of is the longstanding problem for macOS USB support and I think
we have a partial solution for that which should push them on.

Allan did the release last time, and perhaps I can go through the
process this time so that I am familiar. Are you OK with that Allan?

1) Code freeze: 1 week from now (28th January), I will create a
release branch and MRs targeted for the release should target that
branch. Anything else not intended for the release can still
target master. I will send out an email asking for translations
after regenerating po files. During this time, we will not
normally accept functional enhancements but exceptions will be
considered in an emergency or if it is very safe.

2) Release: 2 weeks later (11th February) we will cut the release.
I will also do a PPA release for our Ubuntu users.

Cheers,
Ralph



--
"well, I stand up next to a mountain- and I chop it down with the edge 
of my hand"


[sane-devel] Proposed timeline for 1.3.0 release

2024-01-21 Thread Ralph Little
Hi,
So it looks like we will do a 1.3.0 release.
I propose a fairly quick timeline since there isn't a lot of critical stuff
waiting to go in it. The only thing that I am aware of is the longstanding
problem for macOS USB support and I think we have a partial solution for
that which should push them on.

Allan did the release last time, and perhaps I can go through the process
this time so that I am familiar. Are you OK with that Allan?

1) Code freeze: 1 week from now (28th January), I will create a release
branch and MRs targeted for the release should target that branch. Anything
else not intended for the release can still target master. I will send out
an email asking for translations after regenerating po files. During this
time, we will not normally accept functional enhancements but exceptions
will be considered in an emergency or if it is very safe.

2) Release: 2 weeks later (11th February) we will cut the release. I will
also do a PPA release for our Ubuntu users.

Cheers,
Ralph


Re: [sane-devel] SANE with Samsung SCX-4x21F Getting IO Error

2024-01-17 Thread Ralph Little
Hi,

On Tue, Jan 16, 2024 at 11:14 PM  wrote:

> Hello,
>
>
> Hope you are having a great day. The output from the command as follow:
>
>  >  ➜ scanimage -L
>  > device `xerox_mfp:libusb:003:023' is a SAMSUNG ORION multi-function
> peripheral
>  > device `smfp:usb;04e8;3419;SERIALNUMBERREDACTED.' is a Samsung
> SCX-4x21 Series on USB Scanner
>
>
> I have already tried both and both didn't scan. The result from the
> previous email is from the xerox_mfp one
>
> Thank you very much.
>
>
Could you let us see some diag output from the xerox_mfp backend?

SANE_DEBUG_XEROX_MFP=50 scanimage  {whatever options you use}

If there is a *lot* of output, perhaps just send it to me as an attachment.

Cheers,
Ralph


> On 2024/01/17 7:04, Ralph Little wrote:
> > Hi,
> >
> > On 2024-01-14 06:20, sqe6nouc--- via sane-devel wrote:
> >> Hello,
> >>
> >> I am currently trying to get SANE to scan with a Samsung SCX-4x21F MFP
> >> on Arch Linux.
> >>
> >> I have sane 1.2.1-5 and xsane 0.999-6 on kernel 6.6.10-arch1-1 (KDE
> >> Plasma Wayland) with the following driver packages:
> >>
> >> samsung-unified-driver 1.00.39-7
> >> samsung-unified-driver-common 1.00.39-7
> >> samsung-unified-driver-printer 1.00.39-7
> >> samsung-unified-driver-scanner 1.00.39-7
> >>
> >> dmesg:
> >>
> >> [75005.102178] usb 3-9: new full-speed USB device number 6 using
> xhci_hcd
> >> [75005.245210] usb 3-9: New USB device found, idVendor=04e8,
> >> idProduct=3419, bcdDevice= 1.00
> >> [75005.245235] usb 3-9: New USB device strings: Mfr=1, Product=2,
> >> SerialNumber=3
> >> [75005.245245] usb 3-9: Product: SCX-4x21 Series
> >> [75005.245248] usb 3-9: Manufacturer: Samsung
> >> [75005.245249] usb 3-9: SerialNumber: .
> >> [75005.926529] usblp 3-9:1.1: usblp0: USB Bidirectional printer dev 6
> >> if 1 alt 0 proto 2 vid 0x04E8 pid 0x3419
> >> [75005.926577] usbcore: registered new interface driver usblp
> >>
> >> Error I am getting:
> >> Failed to start scanner: Error during device I/O
> >>
> >> If I wait a bit then click scan again, it starts scanning, however the
> >> scan head stuck at the end of the flatbed and XSane hangs for a bit
> >> then the following error is shown:
> >> Error during read: Error during device I/O
> >>
> >> After this, the scan head is still stuck at the end of the flatbed
> >>
> >> Any help would be appreciated. Thank you.
> >>
> >
> > I wonder why the xerox_mfp backend wouldn't provide you with support for
> > this device. You have a very recent version of the backends and it is
> > supposed to be supported.
> > Could you show us the output of:
> >
> > scanimage -L
> >
> > Cheers,
> > Ralph
>


Re: [sane-devel] Release 1.3 anyone?

2024-01-17 Thread Ralph Little
Hi,

On Tue, Jan 16, 2024 at 3:39 PM m. allan noah  wrote:

> Release sounds good to me. I think I made a mess during the last one,
> possibly due to some incomplete release documentation. That might require
> some cleanup first.
>
>
OK, I will start to tie up the loose ends and get a ChangeLog sorted out.

Cheers,
Ralph


Re: [sane-devel] SANE with Samsung SCX-4x21F Getting IO Error

2024-01-16 Thread Ralph Little

Hi,

On 2024-01-14 06:20, sqe6nouc--- via sane-devel wrote:

Hello,

I am currently trying to get SANE to scan with a Samsung SCX-4x21F MFP 
on Arch Linux.


I have sane 1.2.1-5 and xsane 0.999-6 on kernel 6.6.10-arch1-1 (KDE 
Plasma Wayland) with the following driver packages:


samsung-unified-driver 1.00.39-7
samsung-unified-driver-common 1.00.39-7
samsung-unified-driver-printer 1.00.39-7
samsung-unified-driver-scanner 1.00.39-7

dmesg:

[75005.102178] usb 3-9: new full-speed USB device number 6 using xhci_hcd
[75005.245210] usb 3-9: New USB device found, idVendor=04e8, 
idProduct=3419, bcdDevice= 1.00
[75005.245235] usb 3-9: New USB device strings: Mfr=1, Product=2, 
SerialNumber=3

[75005.245245] usb 3-9: Product: SCX-4x21 Series
[75005.245248] usb 3-9: Manufacturer: Samsung
[75005.245249] usb 3-9: SerialNumber: .
[75005.926529] usblp 3-9:1.1: usblp0: USB Bidirectional printer dev 6 
if 1 alt 0 proto 2 vid 0x04E8 pid 0x3419

[75005.926577] usbcore: registered new interface driver usblp

Error I am getting:
Failed to start scanner: Error during device I/O

If I wait a bit then click scan again, it starts scanning, however the 
scan head stuck at the end of the flatbed and XSane hangs for a bit 
then the following error is shown:

Error during read: Error during device I/O

After this, the scan head is still stuck at the end of the flatbed

Any help would be appreciated. Thank you.



I wonder why the xerox_mfp backend wouldn't provide you with support for 
this device. You have a very recent version of the backends and it is 
supposed to be supported.

Could you show us the output of:

scanimage -L

Cheers,
Ralph



Re: [sane-devel] Release 1.3 anyone?

2024-01-10 Thread Ralph Little

Hi,
Thanks for that info.
I will update the documentation.

Cheers,
Ralph

On 2024-01-10 12:10, Martin Gubser via sane-devel wrote:

Hi

At the same time the list of supported devices could be improved:
The Epson XP-6100 is only listed with a WiFi-interface. But it has 
also a USB-interface that works very well. That should be documented. 
People looking for a new printer/scanner could not consider the 
XP-6100 because they want to connect it with USB.


Martin

Am 10.01.24 um 20:31 schrieb Ralph Little:

Hi,
It has been pointed out that we haven't had a release for a while.
Perhaps we should get the ball rolling for a 1.3 release?

Cheers,
Ralph








[sane-devel] Release 1.3 anyone?

2024-01-10 Thread Ralph Little

Hi,
It has been pointed out that we haven't had a release for a while.
Perhaps we should get the ball rolling for a 1.3 release?

Cheers,
Ralph



Re: [sane-devel] Ability to control scanner imaging head return speed?

2023-12-02 Thread Ralph Little

Hi,

On 2023-12-01 11:56, Joel Penner wrote:

Hello,

I was wondering whether it's possible with SANE to control how quickly 
the scanner imaging head is returned to the starting position. Maybe 
it's a long shot as this is probably controlled through firmware, but 
just checking. Ideally I would like the ability to control the 
retraction speed of the Canon CanoScan 9000f or 8800f scanners or the 
Epson V550 scanner. I am trying to slow this down to make the scanner 
operation quieter.



I'm pretty sure that the Canons cannot be easily modified in this way, 
at least I'm not aware of anything in the pixma protocols that allow the 
return speed of the print head. The bjnp and mfnp protocols are pretty 
high level and the smarts for controlling the scan head are in the 
firmware of the device.


As for the V550, it *might* be possible. I don't know much about this 
device nor its protocols.


TBH, to get direct control, you would need something with a more 
hardware-oriented interface, perhaps a Genesys-based device where the 
backend is manipulating the motor slope and speed tables. With one of 
them you would have a chance.


Cheers,
Ralph



Re: [sane-devel] Additional model support for epsonds backend

2023-10-02 Thread Ralph Little

Hi,
Thank you for your submission.
I have applied the patch to the backend in merge request here: 
https://gitlab.com/sane-project/backends/-/merge_requests/800


Cheers,
Ralph

On 2023-09-29 00:27, linuxdriver-develop wrote:


Dear All,

Thank you for your continuous efforts for SANE project.

We are Linux scanner driver development team in Epson.

We have made patch a new our scanners for epsonds backend as below:

   Additional new models (Scanners) :

Model



Backend

ES-C220



epsonds

DS-C330



epsonds

DS-C490



epsonds

   Changed Points : Just add a new model’s ID

   Patch :    We have attached patch to 
the latest ver. of epsonds as below:


   Test Status :    We have completed testing with 
actual devices.


   How to apply this patch :

$ cd [backend source folder]

$ patch -p 1 < epsonds_add_devcie.path

Then, could you please review and investigate to include this patch to 
the next update of sane-backend?


If you will have any advice, please let us know.



Re: [sane-devel] Help needed diagnosing strange failure to scan with Samsung SCX-4500W

2023-10-01 Thread Ralph Little
Hi,

On Sun, Oct 1, 2023 at 4:56 AM ValdikSS via sane-devel <
sane-devel@alioth-lists.debian.net> wrote:

> On 07.05.2013 00:12, Mike Cloaked wrote:
> > I have a strange scanner failure to try to resolve, and I am hoping that
> > an expert on this list may be able to help me fix the problem.
> >
> > I have a Samsung SCX-4500W multifunction printer that is plugged in to
> > the usb port of my main machine running arch linux x86_64.  The printer
> > part works fine with the Splix driver, but the scanner fails to work.
> >
> > When I unplug the device and plug it into a laptop running arch linux,
> > it works fine. On a second laptop also running arch linux the scanner
> > functions also work fine (xsane). However plugging the same device back
> > in to my main desktop the scanner fails to work.
> >
> >
> > scanimage -L works the first time I issue the command but then
> > subsequently fails:
> >
> > scanimage -L
> > device `xerox_mfp:libusb:001:006' is a Samsung Samsung SCX-4500W Series
> > multi-function peripheral
> >
> > scanimage -L
> >
> > No scanners were identified.
>
> Hello. I know this issue is 10 years old, but I fixed it.
> It seems that this device has some bugs in USB stack implementation. I
> have SCX-4521F with the same issue, it works for me on one laptop with
> USB3 port (and only after explicit port reset!) but not on another with
> USB2.
>
> It seems that the device hangs if ENDPOINT HALT CLEAR is performed on
> its out endpoint, which is explicitly sent by the backend.
> If this command is not sent, the device works reliably.
>
> https://gitlab.com/sane-project/backends/-/issues/706
>
> Another workaround is to send CLEAR_TT_BUFFER command to the hub (which
> USB3 stack already does).
>

So, according to commentary in the libusb forum, we have had advice that
calling usb_clear_halt() when there is no error condition can leads to all
sorts of issues and is not recommended. If we were to remove this in the
xerox_mfp backend (which would fix the support of this device), are there
any users out there that could test with other supported devices?

It is possible that it was added in the first place to deal with some
problematic devices. Having said that, it might also have been added as a
"reset the device to make sure there are no problems", and doesn't actually
solve any real world devices. I know that a couple of the other backends do
the same thing.

Please let me know if there are any users who would be prepared to test
this change!

I have not heard anything from the backend maintainer for a couple of years
so I'm not sure if he is still active,

Cheers,
Ralph


Re: [sane-devel] Partial success using Iriscan Express 3

2023-09-19 Thread Ralph Little
Hi,
Thanks you for your report!

On Tue, Sep 19, 2023 at 2:34 AM Stephane Louise 
wrote:

> Hello,
>
> I wanted to report a partial success using Iriscan Express 3 scanner with
> sane (it is an oldy, but it was given to me so why not give it a try).
> For that, I probed the scanner using sane-find-scanner and scanimage -L,
> and was pretty confident that it was a gt6816 based scanner. Therefore I
> overrode the detection of the scanner to iriscan-express-2, in gt68xx.conf
> and it kind-of worked.
>
> The results: the commands are accurately given to the scanner, and it can
> scan in its highest resolution (600dpi) without crashing or endomaging the
> hardware. The main caveat is the fact that the output file is a horizontal
> gradient of the picture which is "not optimal" (looks like e.g. a Prewitt
> filter applied to the output). N.B: there are miss-alignments with lower
> resolutions also but for me it is still minor as long as I could make the
> native resolution work.
>

It would be cool to see some samples of that. It might be something that is
easy to fix.
Even better would be to create an issue on our GitLab backends page where
the information you have supplied could be kept and progress tracked.

If you don't feel happy to do that then you could send some sample images
to me personally and I will open the issue there. It also means that it
doesn't get forgotten.

Cheers,
Ralph


Re: [sane-devel] New WIP open-source Brother backend

2023-09-12 Thread Ralph Little
Hi,

On Sun, Sep 10, 2023 at 10:04 AM Jonathan Schulz 
wrote:

> Dear all,
>
> I have recently written a basic backend for my Brother DCP-L2500D
> all-in-one device (connected via USB). I am aware that the manufacturer
> provides a closed-source SANE backend, but I as far as I am aware, there
> are no binaries for arm64 linux. While I have tested my code with only one
> device, the manufacturer's driver suggests that the protocol is similar or
> identical for numerous similar devices.
>
>
There is a work-in-progress already for Brother multifunction devices which
I am trying to get back to.
We might be able to compare notes somewhat.

You can see how far we are here, where there is quite a bit of discussion:
https://gitlab.com/sane-project/backends/-/merge_requests/751

Unfortunately, it doesn't have a lot of visibility outside of that Merge
Request but I will plan to clean it up and get it merged so that people can
try it out.
It will be Beta-quality code when I do that but a number of people have
reported that they can successfully scan on their devices,

What I would really love would be to get some opinions on decoding the
binary query command responses which presumably contain some interesting
information that the backend could use, such as what sources there are
(ADF/Flatbed) maximum resolutions, etc which I currently have to add to
each device's configuration. I note that Brother's backends don't seem to
require this information in their configurations, although they do have
some basic config files with device names and USB PID/VIDs.

If you would like to give my backend a go, you can build it with some
additions to the config structure in backend/brother_mfp/brother_mfp.cpp
appropriate for your device.

If you do, let me know how you get on.

Cheers,
Ralph

>


Re: [sane-devel] canon driver segfault in TPU mode handling

2023-06-25 Thread Ralph Little

Hi,
Thanks you for your report.

Unfortunately, I don't think we have a maintainer for the canon backend 
at the moment.
I suspect that few people have the capability these days to test 
canon/TPU combinations of this sort which is probably why you are the 
only one to encounter this in recent times.


I will try to have a look at the code sometime but I am not familiar 
with that backend.


Cheers,
Ralph

On 2023-06-25 05:46, Alain Zscheile via sane-devel wrote:

Hi,

while trying to use a scanner I encountered a segfault
in simple-scan, which turned out to be caused by the sane-canon 
backend driver.


backtrace|:||#0 __strlen_sse2 () at 
../sysdeps/x86_64/multiarch/strlen-sse2.S:142#1 0x7fe7c722cb02 
in __GI___strdup (s=0x0) at strdup.c:41#2 0x7fe7a5ca4e57 in 
init_options (s=s@entry=0x7fe7a01c64d0) at canon.c:1764 #3 
0x7fe7a5ca8be1 in sane_canon_open (devnam=, 
handle=0x7fe7b4ffea48) at 
/build/sane-backends-1.2.1/backend/canon-sane.c:205 #4 
0x7fe7c7458ff4 in sane_dll_open (full_name=, 
meta_handle=meta_handle@entry=0x7fe7b4ffeab0) at dll.c:1294 #5 
0x7fe7c745599e in sane_open (name=, 
h=h@entry=0x7fe7b4ffeab0) at dll-s.c:27 #6 0x0043c897 in 
scanner_do_open (self=self@entry=0x1485850) at 
src/simple-scan.p/scanner.c:5419 #7 0x0043e0ee in 
scanner_scan_thread (self=self@entry=0x1485850) at 
src/simple-scan.p/scanner.c:7320 #8 0x0043e12b in 
_scanner_scan_thread_gthread_func (self=0x1485850) at 
src/simple-scan.p/scanner.c:7355 #9 0x7fe7c82ab64d in 
g_thread_proxy () from 
/nix/store/cgmbz0wglid7v5m0m0a70ksvgyxppsgn-glib-2.76.3/lib/libglib-2.0.so.0 
#10 0x7fe7c7216dd4 in start_thread (arg=) at 
pthread_create.c:444 #11 0x7fe7c72989b0 in clone3 () at 
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81|


In
https://gitlab.com/sane-project/backends/-/blob/1.2.1/backend/canon.c#L1764 
when|s->hw->tpu.ControlMode 
is set to 3, `strdup(0)` is called, which|

|leads to the segfault.|

By now, I applied the following patch,
in accordance with
https://gitlab.com/sane-project/backends/-/blob/1.2.1/backend/canon-sane.c#L676 




diff --git a/backend/canon.c b/backend/canon.c
index d17cd01a4..6a0b8aa07 100644
--- a/backend/canon.c
+++ b/backend/canon.c
@@ -166,6 +166,7 @@ static const SANE_String_Const mode_list_fb1200[] = {
 static const SANE_String_Const tpu_dc_mode_list[] = {
   SANE_I18N("No transparency correction"),
   SANE_I18N("Correction according to film type"),
+  SANE_I18N("Correction according to ??? (unhandled)"),
   SANE_I18N("Correction according to transparency ratio"),
   0
 };


but I don't really know what a proper solution would be...
ControlMode = 2 doesn't seem to be handled anywhere
(in contrast to ControlMode = 0,1,3).

This also doesn't seem to be introduced recently, as the related code
appears to be introduced some 23 years ago, and was last modified 16 
years

ago to introduce SANE_I18N...

downstream report: https://github.com/NixOS/nixpkgs/issues/239726

Regards,
Alain Fogtia Zscheile






[sane-devel] Some protocol questions

2023-06-11 Thread Ralph Little

Hi,
I am looking to get some advice about unusual scanning situations so 
that I can deal with them properly with my new backend and with some 
other work that I have planned:


1) sane_get_parameters() can return "lines" with a value of -1 to 
indicate that the length is not known in advance.
However, are there any well-known ways for a frontend to indicate that 
the backend should scan the "full length" of whatever media is currently 
loaded?


I am mainly thinking here of scanning a set of documents in an ADF that 
are all of different lengths. Perhaps the backend could supply a special 
option of "detected length" to indicate that a length will not be 
specified and whatever length of the loaded media will be accepted?


2) Related a little to 1), I have been looking at a problem in the 
epsonds backend in which it doesn't work properly with saned because it 
does the scan in a call to sane_get_parameters() so that it can provide 
an accurate length of the scan (having already performed the scan). 
However saned calls sane_start() *before* sane_get_parameters() which is 
perfectly legal. Indeed, no frontend *has* to call sane_get_parameters() 
at all. This breaks things somewhat. I feel that what epsonds is doing 
is a bit broken. So I would like to rework it to return -1 for the 
number of lines, preparing the frontend for an unknown length and 
perform the scan properly after sane_start() has been called. Comments?


Cheers,
Ralph




Re: [sane-devel] New tutorial for SANE and Raspberry PI with a circuit for scan-to-mail

2023-05-15 Thread Ralph Little

Hi,
That's great! I have added an entry.

Cheers,
Ralph

On 2023-05-12 10:14, giuse...@peppe8o.com wrote:


Hi Sirs,

I’ve just updated my tutorial from my blog on how to use SANE with 
Raspberry PI. Moreover, I’ve added a funny guide to create a 
Scan-to-mail system from a scanner with SANE, Raspberry PI and a few 
and cheap hardware pieces.


I hope you will love it and I ask you if it is possible to add my 
tutorial link in your http://www.sane-project.org/docs.html page.


My tutorial is available at 
https://peppe8o.com/scan-from-raspberry-pi-terminal-with-sane/


Many thanks in advance,

Giuseppe

*Giuseppe Cassibba*

blog: https://peppe8o.com

twitter: @peppecassibba

linkedin: https://www.linkedin.com/in/giuseppe-cassibba-0312266 





Re: [sane-devel] Canon PIXMA 490 Seg Fault

2023-04-24 Thread Ralph Little
Hi,

On Mon, Apr 24, 2023 at 11:34 AM Atom Mac  wrote:

> Setting the `SANE_DEBUG_PIXMA` env variable and running `scanimage` with
> all of the arguments included in my original post (ex. for the doc
> feeder, etc.) causes `scanimage` to immediately exit and print
> `Segmentation Fault`.  This differs from when the env variable is unset,
> which seems to cause a delay before the seg fault occurs.
>
> I'm a noob when it comes to gdb but assuming I captured the stack trace
> correctly, what I'm seeing is:
>
> ```
> (gdb) exec-file scanimage \
> --device=pixma:04A91787_77BF9D \
> --source="Automatic Document Feeder" \
> --batch=out%d.png \
> --format=png \
> --mode=Gray \
> -vv
> (gdb) run
> Starting program: /usr/local/bin/scanimage scanimage \
> --device=pixma:04A91787_77BF9D \
> --source="Automatic Document Feeder" \
> --batch=out%d.png \
> --format=png \
> --mode=Gray \
> -vv
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x76fa11fc in memchr () from /lib/ld-musl-armhf.so.1
> (gdb) bt
> #0  0x76fa11fc in memchr () from /lib/ld-musl-armhf.so.1
> #1  0x76fa2114 in strnlen () from /lib/ld-musl-armhf.so.1
> #2  0x76f6ae9c in ?? () from /lib/ld-musl-armhf.so.1
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> 
>

Well that sounds a lot different from what I thought.
If I have time, I will try to install Alpine on a Pi that I have here and
try it out with my MX492.
Can't make any promises though.

Cheers,
Ralph


Re: [sane-devel] Canon PIXMA 490 Seg Fault

2023-04-24 Thread Ralph Little
Hi,

On Mon, Apr 24, 2023 at 6:44 AM Atom Mac  wrote:

> Thanks Ralph!
>
> I was able to pull down and compile the commit that you mentioned.
> However, I'm still seeing the same output (i.e. a seg fault without any
> additional information).
>
> `scanimage -V` yields the following:
> `scanimage (sane-backends) 1.1.1.415-b171a; backend version 1.1.1`
>
> Happy to provide any additional information if needed.
>

So I don't get the crash with 1.1.1. It just hangs so perhaps we are seeing
something unrelated to the changes on my branch.
Also of course I have a slightly different model.

Perhaps we could start with a diag log. It might give us some context to
the crash.
scanimage doesn't have much in the way of diag unfortunately, but we can
have a look at the pixma diag:

SANE_DEBUG_PIXMA=50 scanimage ...

...and capture the output to a file and send the file to me and let's see
if we can't figure out what's going on!

What you could also do is run scanimage in gdb and capture a stack back
trace when the crash occurs of you are able to do that.

Cheers,
Ralph


Re: [sane-devel] Canon PIXMA 490 Seg Fault

2023-04-23 Thread Ralph Little

Hi,
If you are able, you can try to build the pixma backend from branch 
264-canon-pixma-mx492-adf-issues at the git repo.

You only really need the libsane-pixma* files to support your scanner.

If you are not sure how to do this, then let me know and I can help you out.

I just tried that branch code on my MX492 and it works fine. However 
regular 1.1.1 is a bust on the ADF.
IIRC it was an alignment requirement that these particular machines are 
more fussy about.


Cheers,
Ralph

On 2023-04-23 14:22, Atom Mac wrote:

Thanks for your time, Ralph!

The output of `scanimage -V` is:
scanimage (sane-backends) 1.1.1; backend version 1.1.1

:wave:

On Sun, Apr 23, 2023 at 12:05 PM Ralph Little  wrote:

Hi,

On 2023-04-23 07:34, Atom Mac wrote:
> Hello everyone!
>
> I've been attempting to get the "Automatic Document Feeder" to
work with
> my Canon PIXMA 490 but after a 1-2 minute delay, `scanimage`
outputs a
> "Segmentation Fault" error (which no details).  Below are the full
> inputs and outputs involved.  Note that scanning works fine with the
> `Flatbed` source; just not the `Automatic Document Feeder` source.
>
> ## Input
>
> scanimage \
>          --device=pixma:04A91787_77BF9D \
>          --source="Automatic Document Feeder" \
>          --batch=out%d.png \
>          --format=png \
>          --mode=Gray \
>          -v
>
> ## Output
>
> Scanning infinity pages, incrementing by 1, numbering from 1
> Scanning page 1
> Segmentation fault
>
> ## System Info
> Raspberry Pi 3
> Alpine Linux 3.17.3
>
> Any help would be greatly appreciated!
>
> -Atom
>

I know that there are issues with this family of machines. I have
done
some work with a MX492 (that is not yet merged) and it has very
problematic ADF support.
I will drag out mine and try it with what you have above and see if I
get the same.

In the meantime, could you let us know the versions of your SANE
components?

scanimage -V

Cheers,
Ralph



Re: [sane-devel] Canon PIXMA 490 Seg Fault

2023-04-23 Thread Ralph Little

Hi,

On 2023-04-23 07:34, Atom Mac wrote:

Hello everyone!

I've been attempting to get the "Automatic Document Feeder" to work with
my Canon PIXMA 490 but after a 1-2 minute delay, `scanimage` outputs a
"Segmentation Fault" error (which no details).  Below are the full
inputs and outputs involved.  Note that scanning works fine with the
`Flatbed` source; just not the `Automatic Document Feeder` source.

## Input

scanimage \
 --device=pixma:04A91787_77BF9D \
 --source="Automatic Document Feeder" \
 --batch=out%d.png \
 --format=png \
 --mode=Gray \
 -v

## Output

Scanning infinity pages, incrementing by 1, numbering from 1
Scanning page 1
Segmentation fault

## System Info
Raspberry Pi 3
Alpine Linux 3.17.3

Any help would be greatly appreciated!

-Atom



I know that there are issues with this family of machines. I have done 
some work with a MX492 (that is not yet merged) and it has very 
problematic ADF support.
I will drag out mine and try it with what you have above and see if I 
get the same.


In the meantime, could you let us know the versions of your SANE components?

scanimage -V

Cheers,
Ralph



Re: [sane-devel] Canon LiDE70 support

2023-04-15 Thread Ralph Little

Hi,

On 2023-04-15 12:49, Steve Underwood wrote:

Hi,

I just found there is sane support for our old Canon LiDE70 scanner. I 
can scan with this OK, but the colour balance, contrast, etc. looks 
very strange. I noticed the man page says auto-calibration is not 
supported. Are there any tools to sort out the image quality settings 
easily? Perhaps by scanning a reference image?


Regards,

Steve



I don't believe so. Most scanners can perform auto calibration with 
reference to hidden black and white strips inside the case.
For a lot of these scanners that use scanner-on-a-chip designs, that 
process has to be performed by the driver code and I don't think that 
has been written for this scanner as yet.


Cheers,
Ralph



Re: [sane-devel] "Failed to fetch" Help

2023-04-13 Thread Ralph Little

Hi,

On 2023-04-10 10:02, S. Parton via sane-devel wrote:

Hello, and thank you for all your hard work.

My name is Stephen. I use Ubuntu 14.04 LTS 64-bit Intel Core i5-3230M 
CPU @ 2.60GHz × 4.
Yesterday, I purchased a Canon LiDE 220 because I read that sane was 
able to support it, but has not been able to work even in root.


I found some information online, and first tried adding

sudo add-apt-repository ppa:roflbensch/sane-git

but it could not recognize the command.

I went to your site and found a new command to replace it:

sudo add-apt-repository ppa:sane-project/sane-git

which seemed to work. But when I updated the system it gave 404 errors 
regarding the sane-project team and "failed to fetch" the packages.


I'm at a loss as to where to even start thinking next, so any help 
would be much appreciated.

Thank you!



Ubuntu 14.04 is not supported by Ubuntu's PPA facility and is well out 
of support.

This is why you are getting the issues with downloading those packages.

Normally, ppa:sane-project/sane-git would be a decent place to get that 
but we are unable to support that OS version.

Same goes for ppa:sane-project/sane-release.

Your best bet, if it is possible would be to upgrade your OS to 
something a bit newer.
I think that the earliest Ubuntu that we still support through the PPA 
is 18.04 Bionic, but that loses official support in June 2023 according 
to this reference: https://wiki.ubuntu.com/Releases


Cheers,
Ralph


Re: [sane-devel] xerox_mfp Invalid argument Samsung SCX-3400

2023-04-01 Thread Ralph Little

Hi.

On 2023-04-01 10:09, Marco wrote:

Am 01.04.2023 um 09:43:15 Uhr schrieb Ralph Little:


Could you let us see the output of the diag from the xerox_mfp
backend?

SANE_DEBUG_XEROX_MFP=4 ...

See the attachment.


I'm seeing a different error from what you reported before. I don't see 
"Invalid argument".


Cheers,
Ralph



Re: [sane-devel] xerox_mfp Invalid argument Samsung SCX-3400

2023-04-01 Thread Ralph Little

Hi,

On 2023-04-01 08:09, Marco wrote:

Am 01.04.2023 um 17:04:12 Uhr schrieb jitesh pandey:


Please provide the output for the command

*export SANE_DEBUG_DLL=255; SANE_DEBUG_SANEI_USB=255;
SANE_DEBUG_XEROX_MFP=4; scanimage -L*

as it will give some insight

See the attachment.


The problem that we commonly see with devices using the xerox_mfp 
backend that used to work before are related to a change to enable JPEG 
compression.

However, it transpires that some of these devices do not support it.

Could you let us see the output of the diag from the xerox_mfp backend?

SANE_DEBUG_XEROX_MFP=4 ...

I only see the output from SANE_DEBUG_DLL.

Cheers,
Ralph



Re: [sane-devel] Blank names and descs for Group options

2023-03-13 Thread Ralph Little
Hi,

On Mon, Mar 13, 2023 at 11:02 AM Benjamin Gordon 
wrote:

> On Mon, Mar 13, 2023 at 11:03 AM Ralph Little  wrote:
>
>> Hi,
>> Wanted to get views from the more seasoned devs on this topic.
>> The SANE API spec says that Name and Desc for attributes are not valid
>> for options of type SANE_TYPE_GROUP, but is not prescriptive about what
>> those values should be initialized to in those cases.
>>
>> My gut says that they should be NULL, but a lot of backends set them to
>> "".
>>
>>
> From the poking around I've done, at least some frontends assume name has
> a valid pointer in it.  I found a couple where they dereference name
> without checking if it's NULL at all and others that skip over options that
> have name == NULL.  scanimage itself falls into the second category in
> print_options(), so it doesn't print groups unless they have a non-NULL
> name pointer.  It seems like even if NULL is technically a valid value
> here, better compatibility with existing frontends is achieved by setting
> it to "".
>
> Thanks,
> Benjamin
>
>
Some clarification in the SANE specification would be helpful here, even if
it says that it "must be a valid string but content is not guaranteed to
contain anything useful". Given the number of older backends that supply
"", it is hard to determine what the originators of the spec had in mind. :(

Cheers,
Ralph


[sane-devel] Blank names and descs for Group options

2023-03-13 Thread Ralph Little
Hi,
Wanted to get views from the more seasoned devs on this topic.
The SANE API spec says that Name and Desc for attributes are not valid for
options of type SANE_TYPE_GROUP, but is not prescriptive about what those
values should be initialized to in those cases.

My gut says that they should be NULL, but a lot of backends set them to "".

What is the general view?

Cheers,
Ralph


Re: [sane-devel] Canon Pixma 8600 testing

2023-02-21 Thread Ralph Little
Hi,

On Tue, Feb 21, 2023 at 9:59 AM Skip Egdorf  wrote:

> I see that on the list http://www.sane-project.org/sane-mfgs.html the
> Canon Pixma TR8600 series is listed as Untested and Testers Needed!
>
> I just picked up a Canon TR8620a to replace a broken HP and have done a
> few initial scans.
>
> The printer is on my home network, Ethernet connected. My desktop is
> Fedora 37.
>
> Xsane sees the scanner and I have done a few initial scans from it.
> Everything seems to work out of the box (well, the printing needs
> Canon's Linux driver, but that doesn't seem to be a scanner/Sane issue).
>
> Would you guys like me to any more rigorous tests? Do you have a
> standard test suite or something? I would be glad to help if I can.
>

That's great! Thanks for your report.

Some further information would be great:

- Which backend is being used to access the device? Perhaps let us see the
output of "scanimage -L"?
- If you are able to connect with USB, does it work and again, what is the
output of "scanimage -L" so we can see which backend is being used for USB:
it might be different.
- Does both the flatbed *and* ADF work for both USB and Network? We have
had instances with the pixma backend where data formats are a little
different between flatbed and ADF (ADF returns JPEG data whereas flatbed
does not). A bit bizarre I know. :(

Cheers,
Ralph


Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-02-19 Thread Ralph Little

Hi,

On 2023-02-07 17:43, m. allan noah wrote:
Sounds reasonable, though at the moment I am pretty frustrated with 
how this backends release went. I know folks worked pretty hard on 
what we have now (particularly Olaf), but I think I am going to make 
an executive decision, and rip some of this out. Once I have done this 
(and cleaned up the snapshot build process), I'd like to quickly 
release 1.2.2. Hopefully, we can end up with a release that actually 
builds with a proper version number, and without autotools being required.




Is this still your intention?
I have a few fairly radical things in the pipeline (like changes to 
sanei_thread) waiting in the wings to get checked in and I don't think 
they would be appropriate for a 1.2.2 release coming out quickly.


Cheers,
Ralph



Re: [sane-devel] DocketPORT 487 - Making loud noises

2023-02-09 Thread Ralph Little
Hi,

On Thu, Feb 9, 2023 at 11:52 AM Miss Tori  wrote:

>
> I'll try wine or run a vm. I will then try to locate a windows machine if
> those two options don't pan out.
>
> The last time I tried to use it, it worked. That was Sept 2016.
> scanimage -V
> scanimage (sane-backends) 1.1.1-debian; backend version 1.1.1
>
> I am not fluent in C++, but I am willing to help in any way.
>
> There is a more recent version 1.2.1.
> Here are the changes
>
> genesys:
>
>- Fixes for unit test build errors related to GCC 12.
>- Fix for 32-bit limitation on scan line size which caused early
>abort. of scan.
>- Build issue fix for OSX.
>- Button support for Canon 8400f scanner corrected.
>- Support added back in for Plustek OpticFilm 7600i: config file entry
>was missing.
>
> The second one is the only one that  seems like it may be relevant. I
> don't know.
>

The rewrite of the genesys backend was some time ago. I don't think
anything changed in 1.2.1 that would make a difference to this.
I have contacted the backend maintainer about this issue and hopefully, we
will be able to help you. There is some commentary in the current code that
suggests there may be some issues with the current support for your
machine, so hopefully we will be able to come up with a fix.

I will let know you if and when I get some feedback.

Cheers,
Ralph


Re: [sane-devel] DocketPORT 487 - Making loud noises

2023-02-09 Thread Ralph Little
Hi,

On Thu, Feb 9, 2023 at 11:34 AM Miss Tori  wrote:

>
> On 2/9/23 14:12, Ralph Little wrote:
>
> Hi,
>
> On Thu, Feb 9, 2023 at 11:07 AM Miss Tori  wrote:
>
>> Update to my mailing below (I deleted it before it was approved to the
>> list)
>> It definitely has to do with what's going on during the sane_read API
>> function.
>>
>> If I issue scanimage -T,  it will start clicking instantly
>>
>
> There are a couple of things that I can think of:
>
> 1 - The scan head is hitting the end of travel and is slipping the belt or
> gear, or
> 2-  Whatever motor settings being specified are out of spec for the motor.
>
> Can you confirm is this happens when the scan head is at the end of travel?
> If not, then I suspect that the motor is having some problems with the
> settings used by the backend to drive the motor.
>
> Cheers,
> Ralph
>
>
> Thank you so much for your reply.
>
> I am unsure of how to do that. I do not see any moving part from the
> outside. I assume I need to open and watch, which is fine. I will open it
> and watch.
>

If you do have the option to try Windows, then I would give that a go, at
least to verify the correct function of the device.

Actually, since this is a genesys device, it may be that the motor settings
have changed as the genesys backend of SANE was rewritten in C++.
One or two machines have had problems with motor tables from this new
version exhibiting just this problem: the motor just buzzes without moving.
If you are using a recent SANE, then this *could* be the issue.
If so, then we would have to change the motor settings for this machine.

Cheers,
Ralph


Re: [sane-devel] DocketPORT 487 - Making loud noises

2023-02-09 Thread Ralph Little
Hi,

On Thu, Feb 9, 2023 at 11:24 AM Mike Hansen  wrote:

> I am head of development at Ambir, the manufacturer of this scanner.  That
> model has been out of production for over a decade.   It’s likely the unit
> is EOL and that clicking you are hearing is coming from the motor.   There
> are no belts, only gears in the unit and sure it’s possible the gears could
> be broken(not sure we’ve ever seen this failure mode) but more likely the
> motor is EOL.
>
>
>

I should have added that it could be toast, of course. :D

If the SANE driver worked for it in the past and it’s not working now, it’s
> an EOL unit.   The control board is over a decade old and the SANE code is
> likely to be the same or older.
>

Certainly people do turn to SANE to attempt to support their old hardware,
much of which is still serviceable. That's great for the environment, but
probably not so great for the bottom line of Ambir. :(


>
>
> Also note that the SANE code did not come from Ambir nor do we endorse or
> support SANE development on those models.   I know that we have had
> discussions in the past about supporting SANE with the current models and
> may do so in the future.
>

I would applaud that step greatly! We would also be happy to assist in any
way that we can.


>
>
> I am supplying the above information so that you do not continue to put
> effort into the codebase for that model.  Also, if you want to check if the
> unit is EOL you are free to download the Windows drivers from
> docketport.com.
>

That's actually good advice, although WIndows may not be an option for this
user.

Cheers,
Ralph


Re: [sane-devel] Library functions in backend

2023-02-09 Thread Ralph Little
Hi,

On Thu, Feb 9, 2023 at 11:11 AM m. allan noah  wrote:

> Frontends or backends? Either way, I am not opposed to abandoning quirks
> for ancient platforms.
>
>
In this case the suggestion is for backends.
I agree that flushing out ancient code is a good thing in general. I only
worry that SANE is built on some more esoteric platform where this library
is required. In any event, I guess that they could be patched back in for
that platform.

The valid commentary from Zdenek Dohnal there is that the code is ancient
and has likely not been patched for bugs since it was originally included.

Cheers,
Ralph


Re: [sane-devel] DocketPORT 487 - Making loud noises

2023-02-09 Thread Ralph Little
Hi,

On Thu, Feb 9, 2023 at 11:07 AM Miss Tori  wrote:

> Update to my mailing below (I deleted it before it was approved to the
> list)
> It definitely has to do with what's going on during the sane_read API
> function.
>
> If I issue scanimage -T,  it will start clicking instantly
>

There are a couple of things that I can think of:

1 - The scan head is hitting the end of travel and is slipping the belt or
gear, or
2-  Whatever motor settings being specified are out of spec for the motor.

Can you confirm is this happens when the scan head is at the end of travel?
If not, then I suspect that the motor is having some problems with the
settings used by the backend to drive the motor.

Cheers,
Ralph


[sane-devel] Library functions in backend

2023-02-09 Thread Ralph Little
There has been a proposal to remove the library replacement functions from
the backend repo.
https://gitlab.com/sane-project/frontends/-/merge_requests/11

On the surface, this seems sensible. I can't see that there are many if any
platforms that the backends repo is built on that wouldn't have these
functions. In the past, there have certainly been non-standards conformant
variants (like snprint() on Windows which I believe is now fixed).

What are the general views here? Are there some platform that would still
require some of these functions?

Cheers,
Ralph


Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-02-07 Thread Ralph Little

Hi,
On a slightly different note, perhaps we should consider doing a 
frontends release soon.
Thierry has been working on a GTK3 port of the GUI apps in there which 
is going to become an issue shortly as some distros drop GTK2.


Cheers,
Ralph

On 2023-02-07 04:48, m. allan noah wrote:
This entire thing is a little crazy, because I spent more time 
fighting with the automation than I would have spent doing an old 
manual release. One of the steps there was simply to edit configure.ac 
<http://configure.ac> and change the version number a couple of times. 
Seems easy enough to 'echo $new_version > .version' or something like 
that in this new scheme. I'll do some more research into how other 
projects handle this.


And, I noticed the extra comments at the top of the NEWS file were 
being displayed in the release notes and manually removed that in the 
gitlab UI.


allan

On Tue, Feb 7, 2023 at 12:32 AM Ralph Little  wrote:

Hi,

On 2023-02-06 20:04, m. allan noah wrote:

Hmm, looks like AC_INIT calls `./tools/git-version-gen --prefix
'' .tarball-version`, which returns UNKNOWN. Seems like our
release process might be leaving out some steps. I guess I'll dig
more tomorrow.



IIRC, this has been a long-standing issue with the tar file
included in the GitLab release artifacts, in that they don't
build. You have to instead get the snapshot file.
I don't know how long it has been like that but we do get a
complaint every now again. I keep trying to remember to figure out
what is going on to do something about it.

If it is the thing that I am thinking about, it might also be the
thing that always stuffs me up in the release PPA because the orig
tar file requires an extra .gitversion file with the release
version in it, otherwise it won't build when it is uploaded.

We really need to get our collective heads together and fix it. I
don't pretend to really understand what the issue is though. Build
systems aren't really my thing.


As an aside, the release page seems to have some weird guff from
the top of the NEWS file in there. Not really sure what caused
that. It is some of the comment material. :`(

Cheers,
Ralph


allan

On Mon, Feb 6, 2023 at 10:44 PM m. allan noah
 wrote:

So, I was able to do the release on time (after filling in a
few blanks in our documentation). But I only did the website
updates tonight. I seem to have run into a small problem
there- when I download the release tarball, and run
./autogen.sh, i get a ./configure file which has 'UNKNOWN' as
the package version number. This also happens with 1.1.1 as
well. Is this happening for anyone else?

allan

On Sat, Feb 4, 2023 at 10:05 PM Ralph Little
 wrote:

Hi,
OK, I think I have done that.

Because we are short on time I cut and pasted the release
note fragments from my spreadsheet into the NEWS file
with Apostrophe MD file editor and whipped them into
shape manually.
First time using it and it is pretty good. Obviously,
this was a manual process, but it wasn't too onerous.

I couldn't get the towncrier thingy to work anyway. I
don't really have much experience with python and pip.
Python seems an awful lot more complicated since the last
time I used it :(

I have pushed the release notes in NEWS to your branch.

Cheers,
Ralph

On 2023-02-04 18:18, m. allan noah wrote:

Awesome, thanks! I'm working on updating
doc/releases.md, which I find to be hard to use. Maybe
if you keep some notes on what you did, I can
incorporate your method instead of towncrier.

allan

On Sat, Feb 4, 2023 at 9:12 PM Ralph Little
 wrote:

Hi,
In this case I didn't generate the towncrier files.
It's a lot of faff if you don't do it as you go along.
I just put them into a spreadsheet.

I will try to generate the release notes from that.

Cheers,
Ralph

On 2023-02-04 17:57, m. allan noah wrote:

I have pushed a branch called 'release-1.2.x'. I
don't have this 'towncrier' thing, so maybe you can
run that and merge the release notes?

allan

On Wed, Feb 1, 2023 at 11:39 AM m. allan noah
 wrote:

Awesome, thanks! I'll probably take a first
stab at it on the 4th, and see if I can follow
our current instructions.

allan

On Sat, Jan 28, 2023 at 8:43 PM Ralph Little
 

Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-02-06 Thread Ralph Little

Hi,
Further to my previous comment about the releases page fluff, that seems 
to have gone now.

Please disregard my comment! :D

Cheers,
Ralph

On 2023-02-06 20:04, m. allan noah wrote:
Hmm, looks like AC_INIT calls `./tools/git-version-gen --prefix '' 
.tarball-version`, which returns UNKNOWN. Seems like our release 
process might be leaving out some steps. I guess I'll dig more tomorrow.


allan

On Mon, Feb 6, 2023 at 10:44 PM m. allan noah  wrote:

So, I was able to do the release on time (after filling in a few
blanks in our documentation). But I only did the website updates
tonight. I seem to have run into a small problem there- when I
download the release tarball, and run ./autogen.sh, i get a
./configure file which has 'UNKNOWN' as the package version
number. This also happens with 1.1.1 as well. Is this happening
for anyone else?

allan

On Sat, Feb 4, 2023 at 10:05 PM Ralph Little 
wrote:

Hi,
OK, I think I have done that.

Because we are short on time I cut and pasted the release note
fragments from my spreadsheet into the NEWS file with
Apostrophe MD file editor and whipped them into shape manually.
First time using it and it is pretty good. Obviously, this was
a manual process, but it wasn't too onerous.

I couldn't get the towncrier thingy to work anyway. I don't
really have much experience with python and pip. Python seems
an awful lot more complicated since the last time I used it :(

I have pushed the release notes in NEWS to your branch.

Cheers,
Ralph

On 2023-02-04 18:18, m. allan noah wrote:

Awesome, thanks! I'm working on updating doc/releases.md,
which I find to be hard to use. Maybe if you keep some notes
on what you did, I can incorporate your method instead of
towncrier.

allan

On Sat, Feb 4, 2023 at 9:12 PM Ralph Little
 wrote:

Hi,
In this case I didn't generate the towncrier files. It's
a lot of faff if you don't do it as you go along.
I just put them into a spreadsheet.

I will try to generate the release notes from that.

Cheers,
Ralph

On 2023-02-04 17:57, m. allan noah wrote:

I have pushed a branch called 'release-1.2.x'. I don't
have this 'towncrier' thing, so maybe you can run that
and merge the release notes?

allan

On Wed, Feb 1, 2023 at 11:39 AM m. allan noah
 wrote:

Awesome, thanks! I'll probably take a first stab at
it on the 4th, and see if I can follow our current
instructions.

allan

On Sat, Jan 28, 2023 at 8:43 PM Ralph Little
 wrote:

Hi,
I have prepared the release notes whenever you
are ready!

Cheers,
Ralph

On 2023-01-24 08:33, m. allan noah wrote:

Sounds good to me, thanks for your help. I'm
traveling this week, and won't be able to work
on this until the weekend.

On Tue, Jan 24, 2023, 10:47 AM Ralph Little
 wrote:

Hi,

On 2023-01-01 15:54, m. allan noah wrote:
> It has been nearly a year since our last
release, and there have been
> many changes and bug fixes. I'd like to
get 1.2.1 released in early
> February. I've not done it in a few
years, but I am certainly willing
> to make the release package.
>
> Any objections to a code freeze on Jan
22, and a release on Feb 5?
>
> allan

I think if we are going for your proposed
plan, then we are official in
code freeze for 1.2.1.
If you want to proceed, I can prepare
release notes.

Cheers,
Ralph





-- 
"well, I stand up next to a mountain- and I chop it

down with the edge of my hand"



-- 
"well, I stand up next to a mountain- and I chop it down

with the edge of my hand"




-- 
"well, I stand up next to a mountain- and I chop it down with

the edge of my hand"




-- 
"well, I stand up next to a mountain- and I chop it down with the

edge of

Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-02-06 Thread Ralph Little

Hi,

On 2023-02-06 20:04, m. allan noah wrote:
Hmm, looks like AC_INIT calls `./tools/git-version-gen --prefix '' 
.tarball-version`, which returns UNKNOWN. Seems like our release 
process might be leaving out some steps. I guess I'll dig more tomorrow.




IIRC, this has been a long-standing issue with the tar file included in 
the GitLab release artifacts, in that they don't build. You have to 
instead get the snapshot file.
I don't know how long it has been like that but we do get a complaint 
every now again. I keep trying to remember to figure out what is going 
on to do something about it.


If it is the thing that I am thinking about, it might also be the thing 
that always stuffs me up in the release PPA because the orig tar file 
requires an extra .gitversion file with the release version in it, 
otherwise it won't build when it is uploaded.


We really need to get our collective heads together and fix it. I don't 
pretend to really understand what the issue is though. Build systems 
aren't really my thing.



As an aside, the release page seems to have some weird guff from the top 
of the NEWS file in there. Not really sure what caused that. It is some 
of the comment material. :`(


Cheers,
Ralph


allan

On Mon, Feb 6, 2023 at 10:44 PM m. allan noah  wrote:

So, I was able to do the release on time (after filling in a few
blanks in our documentation). But I only did the website updates
tonight. I seem to have run into a small problem there- when I
download the release tarball, and run ./autogen.sh, i get a
./configure file which has 'UNKNOWN' as the package version
number. This also happens with 1.1.1 as well. Is this happening
for anyone else?

allan

On Sat, Feb 4, 2023 at 10:05 PM Ralph Little 
wrote:

Hi,
OK, I think I have done that.

Because we are short on time I cut and pasted the release note
fragments from my spreadsheet into the NEWS file with
Apostrophe MD file editor and whipped them into shape manually.
First time using it and it is pretty good. Obviously, this was
a manual process, but it wasn't too onerous.

I couldn't get the towncrier thingy to work anyway. I don't
really have much experience with python and pip. Python seems
an awful lot more complicated since the last time I used it :(

I have pushed the release notes in NEWS to your branch.

Cheers,
Ralph

On 2023-02-04 18:18, m. allan noah wrote:

Awesome, thanks! I'm working on updating doc/releases.md,
which I find to be hard to use. Maybe if you keep some notes
on what you did, I can incorporate your method instead of
towncrier.

allan

On Sat, Feb 4, 2023 at 9:12 PM Ralph Little
 wrote:

Hi,
In this case I didn't generate the towncrier files. It's
a lot of faff if you don't do it as you go along.
I just put them into a spreadsheet.

I will try to generate the release notes from that.

Cheers,
Ralph

On 2023-02-04 17:57, m. allan noah wrote:

I have pushed a branch called 'release-1.2.x'. I don't
have this 'towncrier' thing, so maybe you can run that
and merge the release notes?

allan

On Wed, Feb 1, 2023 at 11:39 AM m. allan noah
 wrote:

Awesome, thanks! I'll probably take a first stab at
it on the 4th, and see if I can follow our current
instructions.

allan

On Sat, Jan 28, 2023 at 8:43 PM Ralph Little
 wrote:

Hi,
I have prepared the release notes whenever you
are ready!

Cheers,
Ralph

On 2023-01-24 08:33, m. allan noah wrote:

Sounds good to me, thanks for your help. I'm
traveling this week, and won't be able to work
on this until the weekend.

On Tue, Jan 24, 2023, 10:47 AM Ralph Little
 wrote:

Hi,

On 2023-01-01 15:54, m. allan noah wrote:
> It has been nearly a year since our last
release, and there have been
> many changes and bug fixes. I'd like to
get 1.2.1 released in early
> February. I've not done it in a few
years, but I am certainly willing
> to make the release package.
>
> Any objections to a code freeze on Jan
22, and a release on Feb 5?
>
> allan

   

Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-02-04 Thread Ralph Little

Hi,
OK, I think I have done that.

Because we are short on time I cut and pasted the release note fragments 
from my spreadsheet into the NEWS file with Apostrophe MD file editor 
and whipped them into shape manually.
First time using it and it is pretty good. Obviously, this was a manual 
process, but it wasn't too onerous.


I couldn't get the towncrier thingy to work anyway. I don't really have 
much experience with python and pip. Python seems an awful lot more 
complicated since the last time I used it :(


I have pushed the release notes in NEWS to your branch.

Cheers,
Ralph

On 2023-02-04 18:18, m. allan noah wrote:
Awesome, thanks! I'm working on updating doc/releases.md, which I find 
to be hard to use. Maybe if you keep some notes on what you did, I can 
incorporate your method instead of towncrier.


allan

On Sat, Feb 4, 2023 at 9:12 PM Ralph Little  wrote:

Hi,
In this case I didn't generate the towncrier files. It's a lot of
faff if you don't do it as you go along.
I just put them into a spreadsheet.

I will try to generate the release notes from that.

Cheers,
Ralph

On 2023-02-04 17:57, m. allan noah wrote:

I have pushed a branch called 'release-1.2.x'. I don't have this
'towncrier' thing, so maybe you can run that and merge the
release notes?

allan

On Wed, Feb 1, 2023 at 11:39 AM m. allan noah
 wrote:

Awesome, thanks! I'll probably take a first stab at it on the
4th, and see if I can follow our current instructions.

allan

On Sat, Jan 28, 2023 at 8:43 PM Ralph Little
 wrote:

Hi,
I have prepared the release notes whenever you are ready!

Cheers,
Ralph

On 2023-01-24 08:33, m. allan noah wrote:

Sounds good to me, thanks for your help. I'm traveling
this week, and won't be able to work on this until the
weekend.

On Tue, Jan 24, 2023, 10:47 AM Ralph Little
 wrote:

Hi,

On 2023-01-01 15:54, m. allan noah wrote:
> It has been nearly a year since our last release,
and there have been
> many changes and bug fixes. I'd like to get 1.2.1
released in early
> February. I've not done it in a few years, but I
am certainly willing
> to make the release package.
>
> Any objections to a code freeze on Jan 22, and a
release on Feb 5?
>
> allan

I think if we are going for your proposed plan, then
we are official in
code freeze for 1.2.1.
If you want to proceed, I can prepare release notes.

Cheers,
Ralph





-- 
"well, I stand up next to a mountain- and I chop it down with

the edge of my hand"



-- 
"well, I stand up next to a mountain- and I chop it down with the

edge of my hand"




--
"well, I stand up next to a mountain- and I chop it down with the edge 
of my hand"


Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-02-04 Thread Ralph Little

Hi,
In this case I didn't generate the towncrier files. It's a lot of faff 
if you don't do it as you go along.

I just put them into a spreadsheet.

I will try to generate the release notes from that.

Cheers,
Ralph

On 2023-02-04 17:57, m. allan noah wrote:
I have pushed a branch called 'release-1.2.x'. I don't have this 
'towncrier' thing, so maybe you can run that and merge the release notes?


allan

On Wed, Feb 1, 2023 at 11:39 AM m. allan noah  wrote:

Awesome, thanks! I'll probably take a first stab at it on the 4th,
and see if I can follow our current instructions.

allan

On Sat, Jan 28, 2023 at 8:43 PM Ralph Little 
wrote:

Hi,
I have prepared the release notes whenever you are ready!

Cheers,
Ralph

On 2023-01-24 08:33, m. allan noah wrote:

Sounds good to me, thanks for your help. I'm traveling this
week, and won't be able to work on this until the weekend.

On Tue, Jan 24, 2023, 10:47 AM Ralph Little
 wrote:

Hi,

On 2023-01-01 15:54, m. allan noah wrote:
> It has been nearly a year since our last release, and
there have been
> many changes and bug fixes. I'd like to get 1.2.1
released in early
> February. I've not done it in a few years, but I am
certainly willing
> to make the release package.
>
> Any objections to a code freeze on Jan 22, and a
release on Feb 5?
>
> allan

I think if we are going for your proposed plan, then we
are official in
code freeze for 1.2.1.
If you want to proceed, I can prepare release notes.

Cheers,
Ralph





-- 
"well, I stand up next to a mountain- and I chop it down with the

edge of my hand"



--
"well, I stand up next to a mountain- and I chop it down with the edge 
of my hand"


Re: [sane-devel] scanimage does not recognize basic long options

2023-02-04 Thread Ralph Little

Hi,
I have checked in a change to scanimage in master and it should be in 1.2.1.

@karl, perhaps pull the change and make sure it is good for you?

Cheers,
Ralph


On 2023-02-04 11:47, m. allan noah wrote:

I'm ok with breaking code freeze if you want

On Sat, Feb 4, 2023, 2:41 PM Ralph Little  wrote:

Hi,

On 2023-02-04 10:38, Karl Weber wrote:
> Hi Ralf,
>
> On Saturday, 4 February 2023 18:06:41 CET Ralph Little wrote:
>> The condition on SANE_OPTION_IS_SETTABLE(opt->cap) has been
removed in
>> version
>>> 1.1.1 and this causes the problem.
>> I'm a bit confused by this comment. I thought that your issue
was caused
>> by the backend sending NULL.
>> Which problem do you believe this causes? Or are you saying
that the
>> NULL options issue is revealed by this change? That is
certainly possible.
> Yes, you may also say that the NULL options issue has been
revealed by this
> change. I didn't know, why this check has been removed and I
don't know why it
> had been there beforehand. I am really new to sane! I started to
look at the
> code two days ago. Before I was only an ignorant user of
scanimage. So please
> excuse me.
>
> But irrespective of the wording, are you going to do something
about it? Or
> where would be the right place to fix this problem? Currently I
have no idea,
> whether hplip-sane is open source and what the chances would be,
to get a fix
> in there, if this would be the right place for a fix. I don't
even know,
> whether it is part of the SANE API specification, that there
must not be NULL
> options.
I suspect that the hpaio backend is doing something improper.
However,
we must deal with it somehow.
I will do a fix.

Cheers,
Ralph



Re: [sane-devel] scanimage does not recognize basic long options

2023-02-04 Thread Ralph Little

Hi,

On 2023-02-04 10:38, Karl Weber wrote:

Hi Ralf,

On Saturday, 4 February 2023 18:06:41 CET Ralph Little wrote:

The condition on SANE_OPTION_IS_SETTABLE(opt->cap) has been removed in
version

1.1.1 and this causes the problem.

I'm a bit confused by this comment. I thought that your issue was caused
by the backend sending NULL.
Which problem do you believe this causes? Or are you saying that the
NULL options issue is revealed by this change? That is certainly possible.

Yes, you may also say that the NULL options issue has been revealed by this
change. I didn't know, why this check has been removed and I don't know why it
had been there beforehand. I am really new to sane! I started to look at the
code two days ago. Before I was only an ignorant user of scanimage. So please
excuse me.

But irrespective of the wording, are you going to do something about it? Or
where would be the right place to fix this problem? Currently I have no idea,
whether hplip-sane is open source and what the chances would be, to get a fix
in there, if this would be the right place for a fix. I don't even know,
whether it is part of the SANE API specification, that there must not be NULL
options.
I suspect that the hpaio backend is doing something improper. However, 
we must deal with it somehow.

I will do a fix.

Cheers,
Ralph



Re: [sane-devel] scanimage does not recognize basic long options

2023-02-04 Thread Ralph Little

Hi,

On 2023-02-04 01:15, Karl Weber wrote:

Hi,

On Friday, 3 February 2023 21:11:11 CET Karl Weber wrote:

It is easy, to fix this. After

if (opt->type == SANE_TYPE_GROUP)
 continue;

one may to add

if (opt->name == NULL)
 continue;

The sources that come with my distribution, i.e. version 1.0.32, have the
different check in fetch_options:

/* create command line option only for settable options */
if (!SANE_OPTION_IS_SETTABLE (opt->cap) || opt->type == SANE_TYPE_GROUP)
   continue;

The condition on SANE_OPTION_IS_SETTABLE(opt->cap) has been removed in version
1.1.1 and this causes the problem.


I'm a bit confused by this comment. I thought that your issue was caused 
by the backend sending NULL.
Which problem do you believe this causes? Or are you saying that the 
NULL options issue is revealed by this change? That is certainly possible.


That specific change was introduced to avoid readonly options being 
reported as "invalid" which is confusing to the user, as they are 
obviously valid, yet cannot be set.

It now reports that the option is readonly.

Cheers,
Ralph



Re: [sane-devel] scanimage does not recognize basic long options

2023-02-02 Thread Ralph Little
Hi,

On Thu, Feb 2, 2023 at 12:41 PM Karl Weber  wrote:

> Hi,
>
> I downloaded the source code tar ball sane-backends-1.1.1.360-573ca.tar.gz
> and
> built sane simply with
>
> ./configure
> make
> make install
>
> When I execute scanimage, it does not recognize basic long options. I get
> the
> error messages like
>
> scanimage: unrecognized option '--format=jpeg'
>
>
I downloaded and built said package and I don't see the same issue:

scanimage --format=tiff -d 'test:0' --resolution 200 -x 210.000 -y 296.985
--mode Color  --batch="sid-600-%03d.tiff" --source 'Automatic Document
Feeder' --batch-count=1

This works for me just fine.

Cheers,
Ralph


Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-01-28 Thread Ralph Little

Hi,
I have prepared the release notes whenever you are ready!

Cheers,
Ralph

On 2023-01-24 08:33, m. allan noah wrote:
Sounds good to me, thanks for your help. I'm traveling this week, and 
won't be able to work on this until the weekend.


On Tue, Jan 24, 2023, 10:47 AM Ralph Little  wrote:

Hi,

On 2023-01-01 15:54, m. allan noah wrote:
> It has been nearly a year since our last release, and there have
been
> many changes and bug fixes. I'd like to get 1.2.1 released in early
> February. I've not done it in a few years, but I am certainly
willing
> to make the release package.
>
> Any objections to a code freeze on Jan 22, and a release on Feb 5?
>
> allan

I think if we are going for your proposed plan, then we are
official in
code freeze for 1.2.1.
If you want to proceed, I can prepare release notes.

Cheers,
Ralph



Re: [sane-devel] API documentation

2023-01-24 Thread Ralph Little

Hi,

On 2023-01-24 13:46, Steven Santos wrote:
I honestly think we should see how it goes before we think too much 
about where to store the results!



Fair comment, but I will be looking to check my Brother doc in somewhere 
shortly, or at least the first version of it to coincide with the 
merging of the first beta backend code.


Cheers,
Ralph



On Tue, Jan 24, 2023 at 4:06 PM Ralph Little  wrote:

Hi,

On Tue, Jan 24, 2023 at 12:46 PM Steven Santos
 wrote:

Ralph is doing some amazing work documenting the Brother API.

I think his idea of creating a library of API documentation is
an excellent idea,  and I would like to offer help.

Any developers who would like help documenting another scan
API, I would be more than happy to work with you on this.


Oh my gosh, it's a big task!

For some context, the answer often heard is that you can look at
the code. Honestly, for the most part, that doesn't work for
low-level code. If you want a flavour of a protocol, you at least
need some context and overview and we don't even have that for
most of the protocols that we support.
The question will come up though: where should we store such a
library? Should we include in backends/doc or create a new library
repository? Since some of the docs might end up being fairly
large, I would suggest creating a fresh repo.

Cheers,
Ralph



Re: [sane-devel] API documentation

2023-01-24 Thread Ralph Little
Hi,

On Tue, Jan 24, 2023 at 12:46 PM Steven Santos 
wrote:

> Ralph is doing some amazing work documenting the Brother API.
>
> I think his idea of creating a library of API documentation is an
> excellent idea,  and I would like to offer help.
>
> Any developers who would like help documenting another scan API, I would
> be more than happy to work with you on this.
>

Oh my gosh, it's a big task!

For some context, the answer often heard is that you can look at the code.
Honestly, for the most part, that doesn't work for low-level code. If you
want a flavour of a protocol, you at least need some context and overview
and we don't even have that for most of the protocols that we support.
The question will come up though: where should we store such a library?
Should we include in backends/doc or create a new library repository? Since
some of the docs might end up being fairly large, I would suggest creating
a fresh repo.

Cheers,
Ralph


Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-01-24 Thread Ralph Little

Hi,

On 2023-01-01 15:54, m. allan noah wrote:
It has been nearly a year since our last release, and there have been 
many changes and bug fixes. I'd like to get 1.2.1 released in early 
February. I've not done it in a few years, but I am certainly willing 
to make the release package.


Any objections to a code freeze on Jan 22, and a release on Feb 5?

allan


I think if we are going for your proposed plan, then we are official in 
code freeze for 1.2.1.

If you want to proceed, I can prepare release notes.

Cheers,
Ralph



Re: [sane-devel] pthread change proposal

2023-01-10 Thread Ralph Little

Hi,

On 2023-01-10 04:58, m. allan noah wrote:
No way. It is not good practice to add a major, potentially breaking, 
and partially untested change to git mere days before a release. I 
propose that this change (or a derivative) gets merged a couple weeks 
after the release.




Yeah, you are completely right. I will complete the work after the 
release and put out a call for testing then.

Not sure what I was thinking. A temporary lapse of insanity on my part ;)
In my defense I did post my worries that the code was largely untested 
and it was close to the release date.


We *could* perhaps do a small change to the build system that enables 
MacOS builds again without the major structural changes involved in 
sanei_pthread.
We do have some feedback that such a change does work for MacOS users 
and that would satisfy them in the short term.

I will look into it.

Cheers,
Ralph



[sane-devel] pthread change proposal

2023-01-09 Thread Ralph Little

Hi,
We have a long-running issue related to pthread use in SANE backends.
See here: https://gitlab.com/sane-project/backends/-/issues/153

I proposed a change to sanei_thread to try to sort some of these issues 
while improving detection of builds that abuse the restrictions 
surrounding pthread_t values. That proposal is here: 
https://gitlab.com/sane-project/backends/-/merge_requests/750


Povilas and I had some discussions about this solution and given the 
impending release of 1.2.1, someone has expressed a desire to see these 
issues solved, particularly as they relate to MacOS, which is properly 
broken at the moment. :(


Could I get some further comments on the proposed solution and I would 
especially appreciate if we could see some testing of that branch 
solution on platforms other than Linux?


Cheers,
Ralph



Re: [sane-devel] Kofax CGA Board

2023-01-03 Thread Ralph Little

Hi,
Sounds like this might be up your street. I send the link to you just on 
the off-chance that you are interested.


https://vancouver.craigslist.org/van/ele/d/vancouver-agfa-arcus-1200-flatbed/7568501939.html

Cheers,
Ralph

On 2022-12-30 02:11, luja wrote:

Dear List,

good scanners are heavy, so everything lighter than 20kG is nor worth 
using :-)
So I am experimenting with old ex-expensive production scanners that 
process at least 80 image per minute. Such as fujitsu fi-5900c or 
kodak i810 (the dinosaur).
As the fi-5900c is quite small you can have it in your room not in a 
storage house. If you connect it using usb you find it beeing slowed 
down by slow usb.

Also the native scsi interface is nice but KOFAX CGA is nicer.
Here is a very expensive offer at ebay for reference. Hint, the 
interface comes with the scanner, as it was purchased at that time 
with the priceless scanner for a "priceless" price :-)

https://web.archive.org/web/20221230094606/https://www.ebay.com/itm/183424759527

Please look at the picture of that ebay offer:
https://web.archive.org/web/20221230094608/https://i.ebayimg.com/images/g/Om8AAOSwd6pblVeN/s-l1600.jpg
https://web.archive.org/web/20221230095152/https://i.ebayimg.com/images/g/StgAAOSw01JblVeQ/s-l1600.jpg

So you can see SDRAM module, a freescale coldfire CPU (68K+, maybe 
running some sort of RTOS), and 2 xilinx spartan fpa, which was quit 
good at that time.


KOFAX VRS 4.5 was shipped with fujitsu scanners and there is a copy at 
archive.org.

https://archive.org/details/vrs-4.50.7z
Also the newer KOFAX VRS 5.1.0 is shipped for them, you can find it on 
the KOFAX page.


So why I am posting this?

There are also other production scanners which use the KOFAX interface 
and software companies tend to be "lazy", so the VRS SCSI and VRS USB 
should (!) be similar for all KOFAX CGM interfaces.
The KOFAX VRS tool provides some "advanced" image processing features 
like descewing, noise removal, gamma correction and so on and offloads 
some of it to the CGM board which sits in the scaner.


So I suggest to use KOFAX VRS, there is also an unlimited trial 
version that stamps the images, with a virtualization environment and 
to sniff the SCSI /dev/sg0 traffic or the USB traffic using the Linux 
that runs the Windows Vista-VM :-) with KOFAX.

https://www.kofax.com/products/vrs-elite/trial
after entering some credentials you get this link.
https://az32125.vo.msecnd.net/download/Download$/VRS/KofaxVRS-5.2.0.ZIP
also archive.org has it :-)

Depending on the findings we could use ALL Kodak CGA based production 
scanners with sane and use some CGA features like noise reduction or 
deskewing.


As I found by reading manuals, the VRS tool gets always greyscale or 
color imaes from the CGA interface and does the halftone stuff in 
their software running with windows.


I would like to opt to use some of the most interesting features of 
the CGA board to quickly extract the pictures from the scanners, as we 
have modern computers today and tons of open source image processing 
like unpaper that we do not need the VRS tool.


We need to talk to the interface, and to learn how it works.

Who wants to join the efforts?

cheers

luja







Re: [sane-devel] Happy new year- time for a sane-backends release!

2023-01-02 Thread Ralph Little

Hi,

On 2023-01-01 15:54, m. allan noah wrote:
It has been nearly a year since our last release, and there have been 
many changes and bug fixes. I'd like to get 1.2.1 released in early 
February. I've not done it in a few years, but I am certainly willing 
to make the release package.


Any objections to a code freeze on Jan 22, and a release on Feb 5?



Happy New Year!

Sounds good to me. I don't mind creating a 1.2.1 milestone and assigning 
MRs etc, as a precursor to making up the release notes.


I know Povilas proposed using an automated tool to generate the release 
notes. This involves dropping files somewhere into a directory.
I will look into that. I know personally I have not been very strict wrt 
to keeping that up-to-date. I will fill in the gaps as best I can.


Cheers,
Ralph



Re: [sane-devel] Russian translation

2022-12-28 Thread Ralph Little

Hi,

On 2022-12-28 09:09, Yuri Chornoivan wrote:

середа, 28 грудня 2022 р. 18:56:42 EET Ralph Little написано:

Hi All,
Someone has submitted a Russian translation for the backends project,
but it is from someone that I am not familiar with.
We always welcome new submissions, but in this case I have no way to
check it for validity.

I know no Russian. Is there anyone out there that could have a quick
look to see if it is OK?

https://gitlab.com/sane-project/backends/-/merge_requests/775

Cheers,
Ralph

Hi,

Yes, it's a good translation from the Russian translation team of ALT Linux
vendor.

Best regards,
Yuri



Thank you! I will merge.

Cheers,
Ralph



[sane-devel] Russian translation

2022-12-28 Thread Ralph Little

Hi All,
Someone has submitted a Russian translation for the backends project, 
but it is from someone that I am not familiar with.
We always welcome new submissions, but in this case I have no way to 
check it for validity.


I know no Russian. Is there anyone out there that could have a quick 
look to see if it is OK?


https://gitlab.com/sane-project/backends/-/merge_requests/775

Cheers,
Ralph



Re: [sane-devel] Sane does not detect Canon TS6420a

2022-12-24 Thread Ralph Little

Hi,

On 2022-12-24 04:14, Brian Potkin wrote:

On Sat, 24 Dec 2022 at 03:46, Lowther <624...@gmail.com> wrote:

Brian:

 OK, thanks.  I downloaded and installed.  $ scanimage -L gives
device `pixma:04A918D3_04242B' is a CANON Canon PIXMA TS6400 Series 
multi-function peripheral
device `escl:http://localhost:6' is a Canon TS6400 series (USB) platen 
scanner
device `airscan:e0:Canon TS6400 series (USB)' is a eSCL Canon TS6400 series 
(USB) ip=127.0.0.1

and after launching XSane get



Is there any difference between these 3 choices in how XSane app works or the 
quality of the scan?


Not as far as I know. I would use airscan. Can you scan with


I'm not aware of any reasons for the quality of the scan to be different.
From what I hear, there are fewer options available via this route for 
some devices.


Cheers,
Ralph



Re: [sane-devel] Scanning with Epson WF-4820, USB-connected.

2022-12-23 Thread Ralph Little

Hi,

On 2022-12-23 11:01, Brian Potkin wrote:

On Fri, 23 Dec 2022 at 06:13, Ralph Little  wrote:

[...]


I believe that the USB connection should still be using pixma
protocols via the pixma backend.


Gosh I was obviously too tired to be answering emails last night.
Yep, no pixma on Epson devices of course. :D


G.W. Haywood is using Debian bullseye on a Raspberry Pi.
USB is managed by ipp-usb on that OS, provided the device supports
IPP-over-USB (which it should do).

Install sane-airscan and look at what 'scanimage -L' gives. escl
and airscan should be present in the output.


Cheers,
Ralph



Re: [sane-devel] Scanning with Epson WF-4820, USB-connected.

2022-12-22 Thread Ralph Little

Hi,

On 2022-12-22 16:51, G.W. Haywood via sane-devel wrote:

Hi there,

On Thu, 22 Dec 2022, Steven Santos wrote:


Have you tried the escl back ends?


Thanks for the reply.

No - I've never heard of them.  As you've probably deduced I'm no SANE
expert, I've just tinkered occasionally to get a scanner working when
it's been necessary.

If you think it's worth a shot I'll give them a try.  As you've used
the plural I guess there are at least two of them, can you recommend
one for use with the WF-4820 scanner?

sane-escl may work if you are connected via Wifi or Ethernet. I think 
this has been the experience of people of the more recent Canon MFPs.
I believe that the USB connection should still be using pixma protocols 
via the pixma backend.


Cheers,
Ralph



Re: [sane-devel] Sane does not detect Canon TS6420a

2022-12-22 Thread Ralph Little

Hi,


On 2022-12-22 16:15, Lowther wrote:


This is a new all-in-one printer to me.  It scans fine from windows, 
but is not detected with "scanimage -L".


The printer is connected by usb cable to my pc; OS is Ubuntu 20.04.5 
LTS. The Canon TS6420a replaces the Canon TS6200 which


I had previously. With the 6200, there was also a problem trying to 
use Xsane, and it was resolved with a patch - this was in March, 2019.


The patch fixed the problem and I was able to do some testing on the 
6200.  Hope the 6420 can be revived!


Here are outputs from terminal commands:

~$ lsusb
...
Bus 001 Device 002: ID 04a9:18d3 Canon, Inc. TS6400 series



This is tentatively supported by the pixma backend, although the 
supported devices show that we are looking for testers!


If you are not having any luck with the current version of SANE 
backends, you can try our git PPA here: 
https://launchpad.net/~sane-project/+archive/ubuntu/sane-git

Focal is supported. Let us know how you get on!

Cheers,
Ralph

Re: [sane-devel] Weird behavior setting option on epsonscan2

2022-12-05 Thread Ralph Little
Hi,

On Mon, Dec 5, 2022 at 9:24 AM Thiago Milczarek Sayão <
thiago.sa...@gmail.com> wrote:

> Found the problem, must call sane_cancel() after scanning is done.
>

Yeah, it feels a bit counter-intuitive doesn't it?
I found that recently when I was doing some research on another topic.

Cheers,
Ralph


Re: [sane-devel] Weird behavior setting option on epsonscan2

2022-12-02 Thread Ralph Little
Hi,

On Fri, Dec 2, 2022 at 2:28 PM Thiago Milczarek Sayão <
thiago.sa...@gmail.com> wrote:

> Hi,
>
> I've downloaded epson drivers here:
> https://support.epson.net/linux/en/epsonscan2.php
>
> Scanning generally works, but there's one option behaving weird:
>
> SaneOptionDescriptor {
> name='mode',
> title='Scan mode',
> desc='Selects the scan mode (e.g., lineart, monochrome, or color).',
> type=SANE_TYPE_STRING,
> unit=SANE_UNIT_NONE,
> size=11,
> cap=5,
> constraintType=SANE_CONSTRAINT_STRING_LIST, list=[Color, Grayscale,
> Monochrome]
>  }
>
> When I set this option to Color, Grayscale or Monochrome scanning it will
> return SANE_STATUS_NO_DOCS as if
>
> SaneOptionDescriptor {
> name='source',
> title='Scan source',
> desc='Selects the scan source (such as a document-feeder).',
> type=SANE_TYPE_STRING,
> unit=SANE_UNIT_NONE,
> size=8,
> cap=5,
> constraintType=SANE_CONSTRAINT_STRING_LIST, list=[ADF, Flatbed]
> }
>
> was set to ADF. But I'm always sure to set to Flatbed.
>
>
> Does it make a difference if you change the order of the option sets?
Some options (typically mode and source) request a reload of options as
other options can be affected.

Cheers,
Ralph


Re: [sane-devel] Get raw image from scanner

2022-11-28 Thread Ralph Little
Hi,

On Mon, Nov 28, 2022 at 12:36 PM Thiago Milczarek Sayão <
thiago.sa...@gmail.com> wrote:

> Hi,
>
> I am developing a C function to return an Raw image to java/JNI.
>
> I would like this function to return raw image data being either RGB or
> GRAY.
>
> I'm reading scanimage.c, but it's a hard one for me due to lack of
> experience.
>
> Is there a simpler example I can look at? Or maybe a "higher level API" ?
>
>
If your requirements are very simple, then the regular SANE API is fairly
straightforward: https://sane-project.gitlab.io/standard/api.html
The complications come from interacting with the options to set the device
up as you need.
However, getting an image from a device is pretty easy..

Cheers,
Ralph


Re: [sane-devel] Help decoding Minolta Dimage Scan Dual II USB protocol

2022-11-23 Thread Ralph Little
Hi,

On Wed, Nov 23, 2022 at 10:18 AM Giovanni Cappellotto 
wrote:

> You’re right, I was using avision.
>
> Thanks for the suggestion, I guess I could try that.
>
> Last time I was hacking the avision backed, I remember the source code had
> a lot of additional complexity because it was supporting tens of different
> scanners. Supposedly some changes for supporting a particular scanner broke
> the support for Minolta Dimage.
>
> I’m wondering if you have docs or other resources I can use to reverse
> engineer the scanner protocol from the logs I can collect from the original
> windows driver.
>

I believe that there are some Avision protocol docs around but IIRC they
are held by folks under NDA so probably no help there. From what I have
been able to gather, Avision themselves did have a hand in the making the
avision backend, but I doubt that they would be interested in helping out
there now.

>
> For instance I think I identified 3 different endpoints looking at the
> sniffer logs, but I’m not sure their meaning. 0x01 seems some kind of
> command endpoint, 0x83 receives and sends a lot of information, 0x82
> receives and responds with zeroes and seems like an endpoint used to
> complete a command.
>
> Maybe I can share the full log I collected and get help to recreate a
> backend specific for Minolta Dimage?
>
> Sure, generate a  diag log and send it to us. We might be able to figure
out what is going on. I would certainly look at the forking issue and try
the fix that was suggested in the link I provided. From what I gather,
process forking is like kryptonite to libusb. Threading is a better option.

Cheers,
Ralph


Re: [sane-devel] Help decoding Minolta Dimage Scan Dual II USB protocol

2022-11-23 Thread Ralph Little
Hi,

On Wed, Nov 23, 2022 at 6:31 AM Giovanni Cappellotto 
wrote:

> Hello,
>
> In 2017 I used sane on Mac OS X to scan films using a Minolta Dimage Scan
> Dual II. When I used sane again in 2020 it didn't work anymore. I tried to
> contribute to the project to fix the backend for my scanner. I was able to
> successfully scan a single frame at a time, but I lacked the knowledge to
> completely fix the issue.
>

If you are using SANE then there are currently some issues when scanning
via USB on MacOS related to forking + libusb. Hopefully we can sort this
out soon.

When you successfully scanned in 2017, you would most likely have been
using the avision backend since this is an avision device.
You could try again with SANE and generate some diagnostic output and send
that to us by setting SANE_DEBUG_AVISION=10 environment variable.

If it is related to the fork/libusb issue, you could try the fix that
someone suggested here:
https://gitlab.com/sane-project/backends/-/issues/153#note_117613

Cheers,
Ralph


Re: [sane-devel] User question: Canon CanoScan 3200F

2022-11-14 Thread Ralph Little
Hi,

On Mon, Nov 14, 2022 at 4:30 AM tly  wrote:

> Hi everyone,
>
> Just wanted to say that i was able to compile the old cs3200f backend and
> try it out. Unfortunately it does not work with my scanner. The scanner
> does not respond to any commands after uploading the firmware. Maybe the
> upload does not work correctly, the USB bulk read command to read back the
> firmware after the upload process hangs. I can send my diffs to make it
> compile if anyone is interested.
>
> Sure, let us have a copy of the patches!

You should be able to generate some diag with SANE_DEBUG_CS3200F=5 in the
environment.
Perhaps collect some diag and let us see that also!

It would be cool to see this old backend resurrected again.

Do you have access to Windows and the Windows driver for comparison?

Cheers,
Ralph


Re: [sane-devel] Time for a sane-backends release?

2022-11-09 Thread Ralph Little

Hi,

On 2022-11-09 20:41, m. allan noah wrote:
It's been almost 10 months since our last release. It looks like we've 
added support for a number of new scanners and fixed a good pile of 
bugs. Thoughts on scheduling another release soonish?


I agree! Povilas and I did discuss it a couple of weeks ago or so and he 
added it to his TODO list.


It would be good for us to do a frontends release at some point soon as 
well!


Cheers,
Ralph



Re: [sane-devel] Canon i-Sensys MF-112 Drivers for Ubuntu

2022-10-25 Thread Ralph Little

Hi,

On 2022-10-25 11:50, Ralph Little wrote:

Hi,

On 2022-10-23 23:43, Вассисуалий Пупкин wrote:

Hello.

Did the scan report intercepted by wareshark help? How can I 
additionally help to resolve the issue with the drivers on the Canon 
MF112?

Sending another report from Wareshark.

Many thanks!


I have decoded the data stream from the PCAP and converted it into a 
PNM file to see what it looks like and I can see what you see. For RAW 
data, there aren't enough bytes for the dimensions requested (150dpi 
at 1280x2100 geometry) and I get a mostly empty document with a strip 
of fuzz at the top.


I did wonder if the data was JPEG because some pixma machines output 
JPEG  but I do not see a JFIF header in the data.
If you wish, you could set the machine definition to expect JPEG in 
the entry in pixma_imageclass.c for your machine, at the bottom of the 
file:


  DEV ("Canon i-SENSYS MF110/910 Series", "MF110", MF110_PID, 600, 0, 
640, 1050, PIXMA_CAP_JPEG),


...and rebuild the backend. Then see if it works for you. I don't know 
if the JFIF header requirement is strictly necessary. This is 
something that I am learning about at the moment. If you need help on 
building the backend then let us know and we can help.


Some pixma machines (like in the mp150 family) support JPEG only on 
the ADF. I don't see such a restriction in the code for imageClass 
machines however.




Actually, I missed the first entries that the scanner sends and it is 
indeed JPEG, but it has an EXIF format. That's actually new to me. You 
never stop learning.


The header information is sent much earlier, evidently before the main 
scanning process gets going.


0040   ff d8 ff e1 00 fd 45 78 69 66 00 00 4d 4d 00 2a ..Exif..MM.*
0050   00 00 00 08 00 08 01 0f 00 02 00 00 00 06 00 00 
0060   00 6e 01 10 00 02 00 00 00 11 00 00 00 74 01 1a .n...t..
0070   00 05 00 00 00 01 00 00 00 85 01 1b 00 05 00 00 
0080   00 01 00 00 00 8d 01 28 00 03 00 00 00 01 00 02 ...(
0090   00 00 01 31 00 02 00 00 00 06 00 00 00 95 02 13 ...1
00a0   00 03 00 00 00 01 00 01 00 00 87 69 00 04 00 00 ...i
00b0   00 01 00 00 00 9b 00 00 00 00 43 61 6e 6f 6e 00 ..Canon.
00c0   4d 46 31 31 30 2f 39 31 30 20 53 65 72 69 65 73   MF110/910 Series
00d0   00 00 00 00 96 00 00 00 01 00 00 00 96 00 00 00 
00e0   01 30 31 2e 30 31 00 00 07 90 00 00 07 00 00 00 .01.01..

So what I would suggest is to perform the above modification to the 
device entry and try a scan. It will probably work.


Cheers,
Ralph

Re: [sane-devel] Canon i-Sensys MF-112 Drivers for Ubuntu

2022-10-25 Thread Ralph Little

Hi,

On 2022-10-23 23:43, Вассисуалий Пупкин wrote:

Hello.

Did the scan report intercepted by wareshark help? How can I 
additionally help to resolve the issue with the drivers on the Canon 
MF112?

Sending another report from Wareshark.

Many thanks!


I have decoded the data stream from the PCAP and converted it into a PNM 
file to see what it looks like and I can see what you see. For RAW data, 
there aren't enough bytes for the dimensions requested (150dpi at 
1280x2100 geometry) and I get a mostly empty document with a strip of 
fuzz at the top.


I did wonder if the data was JPEG because some pixma machines output 
JPEG  but I do not see a JFIF header in the data.
If you wish, you could set the machine definition to expect JPEG in the 
entry in pixma_imageclass.c for your machine, at the bottom of the file:


  DEV ("Canon i-SENSYS MF110/910 Series", "MF110", MF110_PID, 600, 0, 
640, 1050, PIXMA_CAP_JPEG),


...and rebuild the backend. Then see if it works for you. I don't know 
if the JFIF header requirement is strictly necessary. This is something 
that I am learning about at the moment. If you need help on building the 
backend then let us know and we can help.


Some pixma machines (like in the mp150 family) support JPEG only on the 
ADF. I don't see such a restriction in the code for imageClass machines 
however.


Cheers,
Ralph



Re: [sane-devel] need help to understand which of THESE scanner/printers is supported

2022-10-15 Thread Ralph Little

Hi,

On 2022-10-15 10:38, M. Fioretti wrote:

Greetings,

(my apologies for the partially off topic request of help, but this
is really messing up a deadline of mine...)

For work reasons, I badly need to replace as soon as possible the
Epson XP-4100 printer that one hour ago died under my desk (something
snapped inside), with another all-in-one device that is

- 100% supported under Linux, **especially** the scanner, because on
   avg I print ~ 15/20 pages/month, mostly B/W, but for THIS and future
   projects I need to scan hundreds of photographs with the highest
   possible resolution, that's why I'm posting here

- about as big as the one that broke (Epson XP-4100) because otherwise
   it would not physically in the shelf below my desk

- as reliable as possible, but budget is < 150 EUR, 100 would be great

Since I need this asap AND I happen to have a gift card for the
Mediaworld stores here in Italy, the ideal solution would be one of
the models in their shop. However AFAICT several of them are not
listed at all in the "supported devices" page on the SANE website.

Hence the question for you experts: could any of you please give a quick
look at the models available in Mediaworld stores:

https://www.mediaworld.it/it/search.html?sort=currentprice%2Basc=stampanti-multifunzione

and tell me which of those models WOULD be supported without problems
by SANE in Ubuntu 22.04??? The page is in italian, but all you need to
look at is the model names...

TIA for any help, I really hope I can solve this quickly. In other
moments, I could even enjoy testing, hacking drivers etc.. but this
time I just cannot afford it.

Marco



I can give some general advice.

Brother

The Brother devices tend to be well supported for printing and scanning 
by Brother's proprietary devices, but you should check on their website.
My experience is that they are of good quality but tend to be a bit more 
expensive. On the flip side, my understanding is that they do not 
chip-lock their toner/ink so consumables tend to be more reasonable. A 
SANE Brother MFP driver is in-progress but will take a little while 
before it is mature enough for mainstream use but their recent 
proprietary Linux SANE drivers seem pretty reliable.


Canon
=
Most Canon devices are supported by Canon proprietary drivers for 
printing but they do not generally support scanning. That is generally 
done via the SANE pixma drivers and the ESCL backend for some of their 
more recent machines. I have an older Canon imageClass MF4770n MFP which 
is a pretty good workhorse and while the toner cartridges have a chip in 
them, third party replacements are very affordable. I would certainly 
get another one of these imageClass/i-SENSYS machines: they are tough 
and reliable although always checkout reviews for specific models. There 
are always lemons in every range.


Epson
===
I find a lot of their lower-end machines tend to be a cheap and poorly 
constructed. They are very cheap to buy but ink and toner has a 
reputation for being chip-locked and insanely expensive. Linux is not 
well supported for scanning although they do contribute to the epson 
SANE backends from time to time for scanning.


HP
==
Machines from HP tend to be of the same class as Epson. Some are fairly 
well made but they have a reputation for chip locking their consumables 
which, like Epson, are insanely expensive. Been in the news of late 
regarding shenanigans over firmware updates locking out the use of 3rd 
party cartridges. In the main, I would avoid them.
On the other hand, HP do support their MFP machines very well with open 
source drivers that they regularly keep up-to-date via the HPLIP 
project. If they would just improve the quality of their machines a bit, 
not overcharge for their ink and toner (and not be asshats to their 
customers in the firmware update department), then I would buy them out 
of principle for their support of the Linux platform.


Others might be better able to direct you to devices that are definitely 
supported.


Cheers and good luck!
Ralph



Re: [sane-devel] Canon i-Sensys MF-112 Drivers for Ubuntu

2022-10-13 Thread Ralph Little
Hi,
BTW, would it be possible to get a Wireshark USB capture of a small scan,
if you are able?
That should tell us a lot about what is going on.

Cheers,
Ralph


Re: [sane-devel] Canon i-Sensys MF-112 Drivers for Ubuntu

2022-10-13 Thread Ralph Little
Hi,
Thanks for enclosed.

On Thu, Oct 13, 2022 at 3:33 AM Вассисуалий Пупкин <4ro...@ukr.net> wrote:

> Hi!
>
> scanimage -V
> scanimage (sane-backends) 1.1.1-debian; backend version 1.1.1
>
> scanimage -L
> device `pixma:04A927ED_1C8612000350' is a CANON Canon i-SENSYS MF110/910
> Series multi-function peripheral
>
> Config:
> Dell Inc. OptiPlex 3080, Intel® Core™ i3-10105T CPU @ 3.00GHz × 8, Mesa
> Intel® UHD Graphics 630 (CML GT2)
> Ubuntu 22.04.1 LTS (x64) (start with 18.04 and upgrade to 20 and to 22),
> Gnome 42.4, SimpleSacn 42.0
>
>
Confirmed that you are running 1.1.1 and the pixma driver via USB from that
package.
That certainly looks like random noise at the to top of the scan.
Can you tell us if the noise band at the top obscures some of the scan
image or if it is prepended to the top?
Perhaps you could scan a photo with the photo aligned with the top right of
the scan area so we can get some more context about the noise band.


> Sometimes communication with the scanner is lost.
> Printscreens in attachment
>
> PS: Because of the shelling of my city, I am sitting at home. The scanner
> is at work. Next time I'll be at work on Monday. I'm sorry to be late with
> the reply.
> Thanks to all.
>

Completely understandable and we are thinking about you guys often.
Hopefully, we can see an end to the insanity soon.

Cheers,
Ralph


Re: [sane-devel] Canon i-Sensys MF-112 Drivers for Ubuntu

2022-10-12 Thread Ralph Little
Hi,

On Wed, Oct 12, 2022 at 2:52 AM Вассисуалий Пупкин <4ro...@ukr.net> wrote:

> Hi ALL!
>
> Ready to assist in testing drivers for the Canon i-Sensys MF-112 scanner
> (Series 110/910). I have Ubuntu 22.04.1 LTS and Canon i-Sensys MF-112
> installed.
> After installing the linux-UFRII-drv-v560-m17n drivers, the printer works
> fine, and the scanner gives a picture with a gray bar at the top of the
> page. I would be grateful for drivers that will allow me to scan normally
> on this beautiful device...
>
> More thanks...
>

Thanks for your offer of help!

So 22.04 (Jammy) should have the latest released drivers for SANE backends:
1.1.1. Could you verify that for us with "scanimage -V"?

Could you also verify that the backends' pixma driver is being used to do
the scan? Let us see the output of "scanimage -L".

If you believe that the scanned image that you are seeing is incorrect,
perhaps send a test image to the list (or to me personally if you find that
isn't working).

Cheers,
Ralph


Re: [sane-devel] errore

2022-09-17 Thread Ralph Little

Hi,

On 2022-09-09 09:15, Giuseppe Tessari wrote:

Errore :

non è possibile avviare lo scanner: l'argomento non è valido


Rispondere in Italiano.

Grazie


Sorry, Google Translate will have to suffice:

Per favore, potresti fornire maggiori informazioni?

Cheers,
Ralph

Re: [sane-devel] Scanner Manufacturer/Post SANE Drivers

2022-09-08 Thread Ralph Little
Hi,

On Thu, Sep 8, 2022 at 10:57 AM Mike Hansen  wrote:

> Ambir Technology is a manufacturer of scanners and we would like to post a
> closed source SANE driver to your site for two of our scanners.   One of
> the major virtualization providers that uses Linux as a backbone of it’s
> system is requiring SANE drivers to be posted to your site.  We would
> appreciate instructions on how/where to post the drivers.
>

The only reference that we have to proprietary drivers is in this page,
where we provide links:
http://www.sane-project.org/lists/sane-backends-external.html

We do not host proprietary drivers or binary blobs. I'm quite happy to add
links to your drivers on that page however.


>
> Also, we would be interested in providing SANE drivers for many of our
> other scanners.   If any SANE developers are interested, we would be
> interested in contracting you to develop the drivers.   We have the Linux
> drivers built out for x86/x64 and can provide the .so files.  Your work
> would involve building out the SANE interface.  In essence, the hardware
> layer is already built out as an SDK, you only need to interact with it and
> all of the USB/port/etc  calls are taken care of by the SDK.  You would
> simply be making calls to set DPI/Color/Simplex/Duplex/etc.  If you are
> interested in performing contract work in this area, feel free to reach out
> to us at this e-mail address.
>
>
>
If you are looking for the SANE Project to support a free/open source
frontend to a proprietary blob then I don't think that it is something that
we could provide from the project or host here. That's not to say that a
SANE developer wouldn't be interested on working on it for you. That would
be entirely up to them. The advantages of an open source backend of course
is that it can be built to support a variety of platforms and modified as
Linux distros (and BSD/Windows/AIX etc...) evolve over time to remain
functional. Many proprietary drivers have become unusable over time because
of this time-based rot. :(

I welcome scanner manufacturers reaching out to the project for
cooperation: we see so little of that of late. It's just a shame that many
still insist on closed-source blobs to be a component of them.

Just my personal opinion of course. Others may disagree.

Cheers,
Ralph


Re: [sane-devel] scanimage options gone --jpeg-quality

2022-09-02 Thread Ralph Little
Hi,

On Fri, Sep 2, 2022 at 2:40 PM mailinglis...@posteo.de <
mailinglis...@posteo.de> wrote:

> Hi there,
>
> after upgrading my Linux box I now have scanimage version 1.0.32 and see
> some options are gone now.
>
> --jpeg-quality seems to be no more, is there any replacement for that
> options? scanimage --help and the man page didn't show any replacement
> for that.
>
> Thanks!
>
>
The options shown come ultimately from the backend that supports your
scanner.
What model of scanner are you using and which backend are you using to
support it?

Cheers,
Ralph


Re: [sane-devel] epsonds backend ADF size with ES-50

2022-09-01 Thread Ralph Little
Hi,

On Wed, Aug 31, 2022 at 12:26 PM Sean Greenslade 
wrote:

> On Wed, Aug 31, 2022 at 09:34:55AM -0700, Ralph Little wrote:
> > Hi,
> >
> > On Tue, Aug 30, 2022 at 10:36 PM Sean Greenslade <
> s...@seangreenslade.com>
> > wrote:
> > ...
> > Document size:
> > Maximum: 8.5 × 72 inches (215.9 × 1828.8 mm)
> > Documents scanned at 301 dpi or more: up to 8.5 × 14 inches (215.9 ×
> 355.6 mm)
> > Minimum: 2 × 2 inches (50.8 × 50.8 mm)
>
> So Allan's point in his reply is probably valid: the AMAX is only usable
> at the 200 dpi resolution. And indeed, I just tried a large scan at 600
> dpi with my patch and it fails once the paper exceeds 14 inches. So this
> is indeed more complicated than my simple patch.
>
> Does anyone know offhand if there are facilities in the sane APIs for
> different scan sizes per supported resolution? I see the TL_X/Y and
> BR_X/Y, but it seems like the API assumes that those values are fixed
> for a given scanner.
>
>
Typically, SANE options are adjusted by amendments to others.
So if you change the resolution or source, other options and/or their
respective limits are amended accordingly. So, for example, if you change
the res to 600dpi, then upper limit on height would change to the lower
limit and if the currently selected value for height exceeded that limit it
would be adjusted downward.

There are specific flags in the option definitions to indicate this to the
frontend as well. So if an option is changed that affects other options, a
flag is set to information the frontend to re-acquire values and attributes
of the other options to get any changes.

Cheers,
Ralph


[sane-devel] Brother MFP

2022-08-31 Thread Ralph Little

Hi All,
Just a heads-up that I have started development of a Brother MFP backend 
for all MFC and DPC models.
Brother have some drivers for their machines and, for the most part, 
they are pretty good, but we do sometimes get requests for help about 
some of their older packages that will not install due to distro 
compatibility issues.


Well the protocol is fairly straightforward and, apart from variations 
in scan data format, seems to be pretty consistent across models. So 
here we are.


https://gitlab.com/sane-project/backends/-/merge_requests/751

The name that I have given to the backend is provisionally 
"brother_mfp". This is to try to avoid device naming clashes with 
Brother's proprietary drivers.


There is a basic prototype and the code should be taken as a "proof of 
concept", so *very* pre-alpha. It supports some types of scanning on a 
single model, USB only.
If anyone is tempted to try it out, then please feel free, but be aware 
that it is still a bit buggy.


The single supported model is an MFC-4320DW, which is supported by 
Brother's "brother4" backend, from their brscan4 package.
I also have an MFC-465CN which is quite an early machine, supported by 
the "brother2" backend from their brscan2 package.
I suspect that the models supported by each of these backends are 
probably very similar in terms of protocol support.


The next step is to refactor to allow different scan data formats, 
adding JPEG decoding for colour scanning and start to look at network 
scanning.
I will also start to organise the code so that models can be assigned to 
protocol families for easy configuration.


Once I have something a little more concrete. I will be looking for help 
getting hold of traces for other models. There are a lot Brother 
machines out there.


Cheers,
Ralph



Re: [sane-devel] epsonds backend ADF size with ES-50

2022-08-31 Thread Ralph Little
Hi,

On Tue, Aug 30, 2022 at 10:36 PM Sean Greenslade 
wrote:

> Hi, all. I recently picked up an Epson ES-50 sheet-feed scanner. My
> intent is to use it for receipt scanning, so I tried it out with a
> ~700 mm long receipt and found that it would error out at around 450 mm
> into the scan. The manual claims the scanner is capable of a max of 72
> inch document length, so I started poking around in the epsonds backend
> code.  Something that jumped out at me was the eds_set_adf_area
> function. It seems that for this particular scanner, three ADF size
> values are reported: AREA, AMIN, and AMAX (in epsonds-cmd.c around line
> 445 on current git master). The eds_set_adf_area function is called with
> the values from AREA, which limits the document length to 14 inches. I'm
> assuming AREA is just meant to be a default value, but if anyone has any
> deeper insight into the meaning, I'd be interested to know.
>

Looking at that code, AMIN and AMAX are pretty much ignored.
What do you get for all of the AREA/AMIN/AMAX parameters?
Perhaps we can figure out what they mean and code up something a little
better?


>
> The AMAX values reported seemed to match the manual's reported 72-inch
> maximum, so on a whim, I just moved the eds_set_adf_area call to the
> AMAX section. After recompiling, I was able to scan my long receipt no
> problem.
>
> Now I'm wondering if there is any downside to using the max ADF size? If
> not, would you consider the attached patch?
>
>
I don't believe that we have a current maintainer for this backend although
we do get some submissions from Epson Japan now and then for new models. I
wonder if they would be willing to shed some light on this or provide us
some documentation on this aspect of the protocol?

Cheers,
Ralph


[sane-devel] sanei_thread

2022-08-28 Thread Ralph Little

Hi,
A few users have commented here:

https://gitlab.com/sane-project/backends/-/issues/153#note_1080066112
https://gitlab.com/sane-project/backends/-/issues/473#note_1080234318

...that the conversion of sanei_thread to use processes instead of 
threads has effectively broken scanning on the on some platforms.


Apparently, there is a reference to a long standing issue identified in 
the implementation and use of the sanei_thread API.

In particular, I think that there are a few issues:

1. There are assumptions that pthread_t is arithmetic.
2. Some backends are assuming that SANE_Pid is a pthread_t and abusing 
the abstraction
3. Despite the warnings about comparing pthread_ts directly, we do have 
a few instances where code is not using pthread_equal() or a 
sanei_thread equivalent.
4. There is no cross-platform method for determining if a SANE_Pid is 
"valid", which is where some of the above backend issues come from.


So I have tried to come up with a solution that I believe doesn't 
strictly break API compatibility although because of some of the 
aforementioned issues, there are breaking changes to some of the backends.


The idea is to replace the existing SANE_Pid with a structure:

typedef struct
{
  SANE_Bool is_valid;

#ifdef USE_PTHREAD
  pthread_t pid;
#else
  int pid;
#endif

} SANE_Pid;

Because this is now a structure, invalid direct comparison of SANE_Pid 
using == now raises a compile error.
Additionally, with the addition of a new is_valid flag, we can indicate 
if the enclosed pid member has a valid value.
The ramifications of this internal change should be entirely confined to 
sanei_thread but a few backends required some small changes.


See https://gitlab.com/sane-project/backends/-/issues/153 for some 
discussion.


I have drafted up this change, although I haven't performed much in the 
way of testing with machines yet (I will!) here:


https://gitlab.com/sane-project/backends/-/merge_requests/750

I accept that some 3rd-party builds might be a broken slightly by this 
change, but that would surely be due to one or more of the abuses of the 
API mentioned above.

I would appreciate comments on the general strategy and reviews of the code.

Cheers,
Ralph



Re: [sane-devel] Additional model support for epsonds backend

2022-08-22 Thread Ralph Little

Hi,

On 2022-08-22 18:21, Nakamura Iwao wrote:

Dear All,
Thank you for your continuous efforts for SANE project.
We have supported a new MFP additionally for epsonds backend as below:
    Additional new models (MFPs) :
Model   Backend
Epson XP-2200 Seriesepsonds

Changed Points :    Just add a new model’s ID
    Patch : We have attached patch to the latest ver. of epsonds 
as below:

Test Status :   We have completed testing with actual devices.
How to apply this patch :
$ cd [backend source folder]
$ patch -p 1 < epsonds_add_devcie.path
Then, could you please review and investigate to include this patch to 
the next update of sane-backend?

If you will have any advice, please let us know.
Best regards,
I.Nakamura / A.Yumoto


Thank you for your submission!
I have applied the patch as requested.

Cheers,
Ralph

Re: [sane-devel] Chained Network Sane?

2022-08-10 Thread Ralph Little

Hi

On 2022-08-09 20:27, Guy B wrote:
So, I went ahead and gave this a try (specifically, option B) and it 
seems to work perfectly well (both via the scanimage commandline and 
gscan2pdf). I attempted to rig up enabling this with a flag, but 
couldn't grok how sane's flag system worked from just staring at the 
code. I've included the diff below in case it is helpful. For now, 
I'll leave my dodgy "one-random custom-built so-file" setup in place, 
but +1 for making this a mainline feature and thanks for 
the assistance. It is most appreciated.




That's great. I will perhaps do a change for the net backend to allow to 
allow this to be enabled.

Probably a net.conf option.

Cheers,
Ralph


-Guy


diff --git a/backend/net.c b/backend/net.c
index d16119a81..4acb92730 100644
--- a/backend/net.c
+++ b/backend/net.c
@@ -120,6 +120,7 @@static int client_big_endian; /* 1 == big endian; 0 
== little endian */

static int server_big_endian; /* 1 == big endian; 0 == little endian */
static int depth; /* bits per pixel */
static int connect_timeout = -1; /* timeout for connection to saned */
+static SANE_Bool reshare_net = SANE_FALSE; /* if true, reshare 
network-connected */


#ifndef NET_USES_AF_INDEP
static int saned_port;
@@ -1117,6 +1118,14 @@sane_init (SANE_Int * version_code, 
SANE_Auth_Callback authorize)
  DBG (2, "sane_init: connect timeout set to %d seconds from 
env\n", connect_timeout);

}

+  DBG (2, "sane_init: evaluating environment variable 
SANE_NET_RESHARE\n");

+  env = getenv("SANE_NET_RESHARE");
+  if (env)
+    {
+  reshare_net = SANE_TRUE;
+  DBG (2, "sane_init: resharing of net scanners enabled\n");
+    }
+
  DBG (2, "sane_init: done\n");
  return SANE_STATUS_GOOD;
}
@@ -1220,7 +1229,7 @@sane_get_devices (const SANE_Device *** 
device_list, SANE_Bool local_only)


  DBG (3, "sane_get_devices: local_only = %d\n", local_only);

-  if (local_only)
+  if (local_only && !reshare_net)
{
  *device_list = empty_devlist;
  return SANE_STATUS_GOOD;

On Sun, Aug 7, 2022 at 7:39 AM Ralph Little  wrote:

Hi,

On 2022-08-02 12:46, Guy B wrote:

I'm trying to determine if this setup can actually be made to
function (and Googling has given no obvious answer).

Server A - connected to scanner via USB, exposed via network
      ↓
Server B - connected to A via the "net" interface, re-exposes
scanner to another net via "net" interface
     ↓
Server C - connects to B via "net"

The reason that I'm trying to do this is because "A" in this use
case is actually a VM running an ancient version of Ubuntu
because that's the only place I can make the binary-only drivers
work (and I don't want a 10+ year old version of Ubuntu exposed
to /any/ network). "B" is then a real machine that I want to use
to expose it to the rest of the network.

While I've had no trouble plumbing things through to "B", I can't
figure out how (or if it is possible) to re-share the network
scanner again.

-Guy


So to summarise:
    - Server A (VM) will be running the binary driver and saned,
    - Server B will be running SANE with the "net" backend
(configured to connect to Server A's saned) and also saned,
    - Server C will be running SANE with the "net" backend
(configured to connect to Server B's saned).

Although this sounds reasonable, the only issue that I can see
with this setup is that saned running on Server B will not pick up
the devices through the "net" backend.
The reason for this is that saned is intended to advertise local
devices only and when asking the "net" backend for local devices,
it will simply return with an empty list.
Partly the reason for this is to stop deadly embrace loops where
the "net" backend and saned could conceivably keep re-advertising
each other's devices in an endless loop.

Without changing code, I don't see an obvious way around this
restriction. However, there are two ways you could get around this
in your circumstance if you are willing do some minor code changes
and rebuild.

Do one of:

A. Rebuild saned with a small change to the code here around line
1851 of saned.c:

      sane_get_devices ((const SANE_Device ***) _list,
            SANE_TRUE);

to

      sane_get_devices ((const SANE_Device ***) _list,
            SANE_FALSE);

This removes the restriction on local-only devices.

or:

B. Rebuild the net backend with a small change to the code around
line 1223 of net.c:

  if (local_only)
    {
  *device_list = empty_devlist;
  return SANE_STATUS_GOOD;
    }

...by removing this code entirely.

If you are willing to give this a t

Re: [sane-devel] Chained Network Sane?

2022-08-07 Thread Ralph Little

Hi,

On 2022-08-02 12:46, Guy B wrote:
I'm trying to determine if this setup can actually be made to function 
(and Googling has given no obvious answer).


Server A - connected to scanner via USB, exposed via network
      ↓
Server B - connected to A via the "net" interface, re-exposes scanner 
to another net via "net" interface

     ↓
Server C - connects to B via "net"

The reason that I'm trying to do this is because "A" in this use case 
is actually a VM running an ancient version of Ubuntu because that's 
the only place I can make the binary-only drivers work (and I don't 
want a 10+ year old version of Ubuntu exposed to /any/ network). "B" 
is then a real machine that I want to use to expose it to the rest of 
the network.


While I've had no trouble plumbing things through to "B", I can't 
figure out how (or if it is possible) to re-share the network scanner 
again.


-Guy


So to summarise:
    - Server A (VM) will be running the binary driver and saned,
    - Server B will be running SANE with the "net" backend (configured 
to connect to Server A's saned) and also saned,
    - Server C will be running SANE with the "net" backend (configured 
to connect to Server B's saned).


Although this sounds reasonable, the only issue that I can see with this 
setup is that saned running on Server B will not pick up the devices 
through the "net" backend.
The reason for this is that saned is intended to advertise local devices 
only and when asking the "net" backend for local devices, it will simply 
return with an empty list.
Partly the reason for this is to stop deadly embrace loops where the 
"net" backend and saned could conceivably keep re-advertising each 
other's devices in an endless loop.


Without changing code, I don't see an obvious way around this 
restriction. However, there are two ways you could get around this in 
your circumstance if you are willing do some minor code changes and rebuild.


Do one of:

A. Rebuild saned with a small change to the code here around line 1851 
of saned.c:


      sane_get_devices ((const SANE_Device ***) _list,
            SANE_TRUE);

to

      sane_get_devices ((const SANE_Device ***) _list,
            SANE_FALSE);

This removes the restriction on local-only devices.

or:

B. Rebuild the net backend with a small change to the code around line 
1223 of net.c:


  if (local_only)
    {
  *device_list = empty_devlist;
  return SANE_STATUS_GOOD;
    }

...by removing this code entirely.

If you are willing to give this a try, I would say that changing the net 
backend and using that is probably the easiest solution.
To give it a go, I would clone the backends repo, make the change, build 
it, take the built net backend files (libsane-net.*) and temporarily 
replace your regular ones on Server B with the built ones so that Server 
B's saned will see them.

Probably not a good permanent solution but a place to start at least.

Actually, since we have had this question come up a couple of times in 
the past, it might be an optional feature that we could add, switched 
off by default, to the core code.


Anyway, let us know if you need help giving that a try.

Cheers,
Ralph

Re: [sane-devel] Proposal to change function signatures of a couple of sanei_usb_* functions

2022-08-06 Thread Ralph Little

Hi,

On 2022-08-06 12:04, Olivier Valentin wrote:




I propose that we change the function signature of the functions and the 
callback to include a (void *) context pointer:

SANE_Status
sanei_usb_find_devices (SANE_Int vendor, SANE_Int product, void *context,
         SANE_Status (*attach) (SANE_String_Const dev, void *context));

void
sanei_usb_attach_matching_devices (const char *name, void *context,
                SANE_Status (*attach) (const char *dev, void *context));


Hi Ralph,

Your change may impact proprietary backends (Brother, Canon, ...).

Thierry


Would it be possible to rely on the relative position of `const char *dev` 
inside the device structure by making use of `container_of()` ?

Olivier


The name that is provided comes from a private structure in the sanei*() 
library and so I don't think that the wider structure it is really 
accessible to the backend.
In this situation, my backend is iterating through a list of predefined, 
supported scanners, each with USB vendor and product values. If a match 
is found, the callback is triggered, but the backend doesn't have any 
context to determine which of the supported scanner structures it 
relates to. In my case, all of the useful information is in there and 
the new device structure that the callback creates needs to have a 
pointer to that original structure.


What I am doing now, is using the USB vendor and product values that I 
can get from sanei_usb_get_vendor_product_byname() to search again 
through the list of supported scanners to get it back again.
Other backends typically stick that pointer into a global variable for 
the callback function to refer to.


I prefer the first because I instinctively feel that using globals to 
pass context information to the callback feels sucky, although of course 
the callback is also creating a new device structure and adding it to a 
global list. That's not really avoidable but for some reason it doesn't 
feel as hacky as the global context variable.


For the moment, I will stick with one of the regular solutions.

Cheers,
Ralph



Re: [sane-devel] Proposal to change function signatures of a couple of sanei_usb_* functions

2022-08-06 Thread Ralph Little

Hi,

On 2022-08-06 10:35, Thierry Huchard wrote:


Le 6 août 2022 18:17:12 GMT+02:00, Ralph Little  a écrit :

Hi,
I'm having a go at writing my first SANE backend for a learning exercise.

I notice that a few backends that use the functions: 
sanei_usb_attach_matching_devices() and sanei_usb_find_devices() require some 
context information in the callback function to complete the find function.
This is typically because the backend is looping through a list of known device 
configurations and calling the sanei_* function on each one: the callback needs 
to know the element in that loop to complete the attach function in the 
callback.

This is typically achieved with setting some global variables to be picked up 
by the callback function, or searching again through the original loop using 
information gleaned from the devicename (such as vendor and product), both of 
which are messy and ugly hacks.

I propose that we change the function signature of the functions and the 
callback to include a (void *) context pointer:

SANE_Status
sanei_usb_find_devices (SANE_Int vendor, SANE_Int product, void *context,
         SANE_Status (*attach) (SANE_String_Const dev, void *context));

void
sanei_usb_attach_matching_devices (const char *name, void *context,
                SANE_Status (*attach) (const char *dev, void *context));


Hi Ralph,

Your change may impact proprietary backends (Brother, Canon, ...).

Thierry


That is a good point.

We could introduce additional functions with the above signatures (e.g. 
sanei_usb_find_devices2()) but I feel that to be an unsatisfactory solution.


Any other suggestions/comments welcome.

Cheers,
Ralph





[sane-devel] Proposal to change function signatures of a couple of sanei_usb_* functions

2022-08-06 Thread Ralph Little

Hi,
I'm having a go at writing my first SANE backend for a learning exercise.

I notice that a few backends that use the functions: 
sanei_usb_attach_matching_devices() and sanei_usb_find_devices() require 
some context information in the callback function to complete the find 
function.
This is typically because the backend is looping through a list of known 
device configurations and calling the sanei_* function on each one: the 
callback needs to know the element in that loop to complete the attach 
function in the callback.


This is typically achieved with setting some global variables to be 
picked up by the callback function, or searching again through the 
original loop using information gleaned from the devicename (such as 
vendor and product), both of which are messy and ugly hacks.


I propose that we change the function signature of the functions and the 
callback to include a (void *) context pointer:


SANE_Status
sanei_usb_find_devices (SANE_Int vendor, SANE_Int product, void *context,
        SANE_Status (*attach) (SANE_String_Const dev, void *context));

void
sanei_usb_attach_matching_devices (const char *name, void *context,
               SANE_Status (*attach) (const char *dev, void *context));

I would have to change existing backends that rely on this function but 
I feel that it would be an improvement and clean up the processing of 
USB device detection.


Comments?

Cheers,
Ralph



Re: [sane-devel] mystery why sane-backend umax_pp always builds

2022-07-24 Thread Ralph Little

Hi,

On 2022-07-24 10:44, r. a. schmied wrote:

On 07/22/22 09:30, Ralph Little wrote:

Hi,

On 2022-07-22 08:56, Ralph Little wrote:

Hi,

On 2022-07-21 12:19, r. a. schmied wrote:

saners

the missing '/' on line ending umax
(see rcsdiff -uBitwb configure.ac below)
might be why the umax_pp always
builds even with an envvar like
export BACKENDS='genesys net test'
passed to configure.

yet to determine 1) why the backends
umax1220u v4l xerox_mfp p5
*do not get* built along with umax_pp and
2) if the added '/' will have any actual effect.

i doubt this will have desired effect, as the
Makefile(s) do have 'BACKENDS =  genesys net test'
and do not have umax_pp (or any other backend)
in any obviously related envvar/macro.

same missing '/' and build situation exists for
sane-backends-1.0.32.86-911be
and
sane-backends-1.0.28


ras

--- configure.ac    2022/07/21 17:45:34    1.1
+++ configure.ac    2022/07/21 17:45:51
@@ -671,7 +671,7 @@
 mustek_usb mustek_usb2 nec net niash pie pieusb pint \
 pixma plustek plustek_pp qcam ricoh ricoh2 rts8891 s9036 \
 sceptre sharp sm3600 sm3840 snapscan sp15c st400 \
-    stv680 tamarack teco1 teco2 teco3 test u12 umax
+    stv680 tamarack teco1 teco2 teco3 test u12 umax \
 umax_pp umax1220u v4l xerox_mfp p5"

 # If user specifies backends manually then cause configure


OK, I looked into this a little bit.

The issue is actually caused by the tools/ directory which builds a
tool called umax_pp.
This tool has a dependency on umax_pp_low which is why, despite the
umax_pp backend being disabled, the umax_pp_low.c source is built.
There doesn't appear to be a configured way to disable this being
built so I will add something.

Thanks for raising this issue.

Cheers,
Ralph


OK, more detail on this.

The umax_pp tool in the tools directory is always built. However, if you
disable the umax_pp backend then it merely sets the umax_pp tool to not
install, yet it is still built.
I think it is fair to say that if you are disabling the umax_pp backend,
then you are likely not interested in the umax_pp tool so I have removed
the build/noinstall option.

I have added a check-in that if you disable the umax_pp backend, the
tool is not built.

Cheers,
Ralph




aloha ralph and interested saners

ralph your analysis from a black-box view looks correct.
i've got sane-backends-1.0.27 installed and tools/umax_pp
was not installed, but tools/umax_pp was compiled and linked.

for both sane-backends-1.0.28 and sane-backends-1.0.32.86-911be
tools/umax_pp was compiled and linked.  neither of these versions
have been installed yet [well 1.0.32.86-911be does not work, and
while 1.0.28 is better than 1.0.27 i keep messing with 1.0.28
to see if i can get it 'better' or at least more to my liking.

[ backend issues with lide 200 and the contrast and brightness settings
  and frontend issues [scanimage] with options and arguments that
  as a gray-beard command liner (and horrible typist) drive me crazy ]

is the 'check-in' patch simple enough for an email transmittal?
not critical, now that i understand the reason i can stop wondering
why.

ras



Sure, the change is very simple.

Look at the top of tools/Makefile.am and remove the following lines 14 
and 15:


else
noinst_PROGRAMS += umax_pp

Then configure and build again. I don't think that you would need to do 
autogen.sh again although it wouldn't hurt.


Cheers,
Ralph

Re: [sane-devel] Character encoding used for sane_strstatus() strings

2022-07-24 Thread Ralph Little

Hi,

On 2022-07-18 03:19, Povilas Kanapickas wrote:

Hi John,

On 2022-07-18 05:25, John Scott wrote:

The SANE spec says that all strings are encoded in ISO-8859-1 ("Latin-
1"). However, from inspecting the code for sane_strstatus(), it appears
that it just returns ordinary string literals, which use whatever
encoding the compiler prescribes for narrow string literals and need not
be the same.

Agreed, going by the letter of standards this is indeed a problem.


So, what character encoding should I be assuming for strings coming from
sane_strstatus() as an application writer? One solution to this dilemma
is, since sane_strstatus() appears to only use characters from ASCII in
the strings, is to use UTF-8 string literals, like this:
u8"Hello, world"

This would bump compiler requirements to C11. I don't think this is bad,
because we already require C++ for at least one popular backend so it's
unlikely we have many platforms with just ancient C compiler available.

I'm CC'ing Ralph for a second opinion of whether we can start requiring C11.

By the way, does the current assumption actually break in practice, that
is, are there compilers for which ASCII text will not encode to a subset
of ISO-8859-1?


If you can affirm that the specification needs to prevail, I can send a
merge request to adjust the string literals accordingly.

Let's wait until Ralph replies and then we can see how to proceed.

Thanks a lot for noticing this.

Regards,
Povilas
.


None of the suggestions that we have seen so far seem very portable, yet 
this situation is indeed a problem.


Since UTF-8 is pretty much the de facto string representation these 
days, would a better solution be to change the SANE spec. to specify UTF-8?
If the currently supported text strings are the same in UTF-8 and 
ISO-8859-1 then there should be no practical fallout from the change.


What would the fallout of such a change be?
Would it make frontend support simpler?
Do any of our current frontends actually care?

Cheers,
Ralph



Re: [sane-devel] Canon Pixma TS6420a works sane-backends

2022-07-24 Thread Ralph Little

Hi,

On 2022-07-22 18:00, Alfred Ganz wrote:

Ralph,

Date: Fri, 22 Jul 2022 13:51:20 -0700
To: Alfred Ganz ,
  sane-devel@alioth-lists.debian.net
Subject: Re: [sane-devel] Canon Pixma TS6420a works sane-backends


On 2022-07-22 11:43, Alfred Ganz via sane-devel wrote:

Ladies and Gentlemen,

This is just to report that after upgrading to
sane-backends-1.0.32-6.el8.x86_64
I have been able to scan with my new
Canon Pixma TS6420a which runs under TS6400
Since Pixma TS6400 is listed as not having been reported to work,
here is one instance that seems to work.

Can you confirm which resolutions you tried and if you tried Gray and Lineart
modes?

Also, could you confirm that the pixma backend was used? That would be part
of the device name, e.g. "pixma:"

Here goes:

The device supports WiFi access, but I only use a local USB interface

This is what the Prieview window frame shows:
"Preview Canon PIXMA TS6400 Series:04A918D3_01D66D"
and the interpretation is: idVendor idProduct _ iSerial

This is what the xsane window shows:
Flatbed (just this option)
Color   (Color, Gray, Lineart)
Full color range (only for Color and Gray, 10 different entries)
Resolutions (75, 150, 30, 600, 1200)

Of these I have scanned the following:
Color: Full color range only, all resolutions
Gray:  Full color range only, all resolutions
Lineart: resolutions 150, 30, 600, 1200
 resolution 75 reports operation canceled
I am no expert at this stuff, so it is hard for me to say if what
Lineart produces is what I should expect (the images look like the
preview though).

Hope this help, let me know if you would like more, AG



Thanks again for your report.
I have updated the description for this machine family along with your 
report in functionality.


This issue in lineart I have seen similarly in an older machine, the 
MX493. These machines do not support lineart directly bu are a 
processing option in the pixma backend. It has some problems.


Cheers,
Ralph




Re: [sane-devel] Canon Pixma TS6420a works sane-backends

2022-07-22 Thread Ralph Little

Hi,


On 2022-07-22 11:43, Alfred Ganz via sane-devel wrote:

Ladies and Gentlemen,

This is just to report that after upgrading to
sane-backends-1.0.32-6.el8.x86_64
I have been able to scan with my new
Canon Pixma TS6420a which runs under TS6400
Since Pixma TS6400 is listed as not having been reported to work,
here is one instance that seems to work.

If there is additional information that would help please let me
know, and if there are certain tests that could further help developent
I would be glad to help.

Thanks for the package, AG


Thanks for your report!

Can you confirm which resolutions you tried and if you tried Gray and 
Lineart modes?


Also, could you confirm that the pixma backend was used? That would be 
part of the device name, e.g. "pixma:"


Cheers,
Ralpg



Re: [sane-devel] mystery why sane-backend umax_pp always builds

2022-07-22 Thread Ralph Little

Hi,

On 2022-07-22 08:56, Ralph Little wrote:

Hi,

On 2022-07-21 12:19, r. a. schmied wrote:

saners

the missing '/' on line ending umax
(see rcsdiff -uBitwb configure.ac below)
might be why the umax_pp always
builds even with an envvar like
export BACKENDS='genesys net test'
passed to configure.

yet to determine 1) why the backends
umax1220u v4l xerox_mfp p5
*do not get* built along with umax_pp and
2) if the added '/' will have any actual effect.

i doubt this will have desired effect, as the
Makefile(s) do have 'BACKENDS =  genesys net test'
and do not have umax_pp (or any other backend)
in any obviously related envvar/macro.

same missing '/' and build situation exists for
sane-backends-1.0.32.86-911be
and
sane-backends-1.0.28


ras

--- configure.ac    2022/07/21 17:45:34    1.1
+++ configure.ac    2022/07/21 17:45:51
@@ -671,7 +671,7 @@
 mustek_usb mustek_usb2 nec net niash pie pieusb pint \
 pixma plustek plustek_pp qcam ricoh ricoh2 rts8891 s9036 \
 sceptre sharp sm3600 sm3840 snapscan sp15c st400 \
-    stv680 tamarack teco1 teco2 teco3 test u12 umax
+    stv680 tamarack teco1 teco2 teco3 test u12 umax \
 umax_pp umax1220u v4l xerox_mfp p5"

 # If user specifies backends manually then cause configure


OK, I looked into this a little bit.

The issue is actually caused by the tools/ directory which builds a 
tool called umax_pp.
This tool has a dependency on umax_pp_low which is why, despite the 
umax_pp backend being disabled, the umax_pp_low.c source is built.
There doesn't appear to be a configured way to disable this being 
built so I will add something.


Thanks for raising this issue.

Cheers,
Ralph


OK, more detail on this.

The umax_pp tool in the tools directory is always built. However, if you 
disable the umax_pp backend then it merely sets the umax_pp tool to not 
install, yet it is still built.
I think it is fair to say that if you are disabling the umax_pp backend, 
then you are likely not interested in the umax_pp tool so I have removed 
the build/noinstall option.


I have added a check-in that if you disable the umax_pp backend, the 
tool is not built.


Cheers,
Ralph




Re: [sane-devel] mystery why sane-backend umax_pp always builds

2022-07-22 Thread Ralph Little

Hi,

On 2022-07-21 12:19, r. a. schmied wrote:

saners

the missing '/' on line ending umax
(see rcsdiff -uBitwb configure.ac below)
might be why the umax_pp always
builds even with an envvar like
export BACKENDS='genesys net test'
passed to configure.

yet to determine 1) why the backends
umax1220u v4l xerox_mfp p5
*do not get* built along with umax_pp and
2) if the added '/' will have any actual effect.

i doubt this will have desired effect, as the
Makefile(s) do have 'BACKENDS =  genesys net test'
and do not have umax_pp (or any other backend)
in any obviously related envvar/macro.

same missing '/' and build situation exists for
sane-backends-1.0.32.86-911be
and
sane-backends-1.0.28


ras

--- configure.ac    2022/07/21 17:45:34    1.1
+++ configure.ac    2022/07/21 17:45:51
@@ -671,7 +671,7 @@
 mustek_usb mustek_usb2 nec net niash pie pieusb pint \
 pixma plustek plustek_pp qcam ricoh ricoh2 rts8891 s9036 \
 sceptre sharp sm3600 sm3840 snapscan sp15c st400 \
-    stv680 tamarack teco1 teco2 teco3 test u12 umax
+    stv680 tamarack teco1 teco2 teco3 test u12 umax \
 umax_pp umax1220u v4l xerox_mfp p5"

 # If user specifies backends manually then cause configure


OK, I looked into this a little bit.

The issue is actually caused by the tools/ directory which builds a tool 
called umax_pp.
This tool has a dependency on umax_pp_low which is why, despite the 
umax_pp backend being disabled, the umax_pp_low.c source is built.
There doesn't appear to be a configured way to disable this being built 
so I will add something.


Thanks for raising this issue.

Cheers,
Ralph




Re: [sane-devel] Character encoding used for sane_strstatus() strings

2022-07-19 Thread Ralph Little

Hi,

On 2022-07-18 03:19, Povilas Kanapickas wrote:

Hi John,

On 2022-07-18 05:25, John Scott wrote:

The SANE spec says that all strings are encoded in ISO-8859-1 ("Latin-
1"). However, from inspecting the code for sane_strstatus(), it appears
that it just returns ordinary string literals, which use whatever
encoding the compiler prescribes for narrow string literals and need not
be the same.

Agreed, going by the letter of standards this is indeed a problem.


So, what character encoding should I be assuming for strings coming from
sane_strstatus() as an application writer? One solution to this dilemma
is, since sane_strstatus() appears to only use characters from ASCII in
the strings, is to use UTF-8 string literals, like this:
u8"Hello, world"

This would bump compiler requirements to C11. I don't think this is bad,
because we already require C++ for at least one popular backend so it's
unlikely we have many platforms with just ancient C compiler available.

I'm CC'ing Ralph for a second opinion of whether we can start requiring C11.


I personally don't mind going to c11.
Mind you, we did just get an enquiry from someone trying to build on 
Solaris, but they have gcc 4.9 which should support it so it is probably OK.

GCC 4.9 is pretty ancient.

Cheers,
Ralph



Re: [sane-devel] sane-backend-1.0.32.86-911be for sol10u8 sparc

2022-07-14 Thread Ralph Little

Hi,

On 2022-07-14 13:26, r. a. schmied wrote:

saners

os: solaris10 update 8 sparc (bigendian) on eol sb2k
scanner: usb canon lide 200 (ids as genesys:libusb:/dev/usb:4a9.1905/0)
gcc/g++: gcc (GCC) 4.9.0
sane-backend: genesys chip gl847

while i did get valid build [no core dumps] the resulting
images are bad, will provide on request.

i've tried the usual things:
forced calibration, manually generated gamma, specific
--contrast and --brightness without any real change in
resulting image(s).

notes regarding 1.0.32.86 build:

sanei_usb.c: seems lots of variables are typed for 64 bits,
but the old solaris legacy libusb is elftyped 32 so i had
to compile for 32bits.
-- might that be issue?

genesys/genesys.h: loads and loads of messages:
warning: missing initializer for member 'SANE_...' objects
-- could very well be problem.


NOTE: sane-backends-1.0.28 same os,scanner,compiler,etc
works 'fine' so long as i specify --contrast 20 and
--brightness 20 to avoid backside printing bleed-thru.

anything i can do to help you help me, let me know either
direct email or via the mail-list.

thanks

ras
r...@acm.org



Please open an issue here so that we can track progress and keep a 
record of the information that you have provided:


https://gitlab.com/sane-project/backends/-/issues

It would be cool if you could capture build output into a file and 
attach it to the bug that you create!


Cheers,
Ralph




Re: [sane-devel] CCT Type on Epson 2 driver

2022-07-10 Thread Ralph Little

Hi,

On 2022-07-10 13:19, Nicholas Andre wrote:
Happy to help connecting it up/would love to understand a bit more 
about this driver. Does Epson collaborate with the Sane backend 
maintainer?


Yes, they do submit updates to the backend from time to time.

Cheers,
Ralph



Re: [sane-devel] CCT Type on Epson 2 driver

2022-07-10 Thread Ralph Little

Hi

On 2022-07-10 12:26, Nicholas Andre wrote:

Hey all,

I'm having trouble enabling the CCT Type option in sane (says inactive).

In the code I see:
/* XXX disabled for now */
s->opt[OPT_CCT_MODE].name = "cct-type";
s->opt[OPT_CCT_MODE].title = "CCT Profile Type";
s->opt[OPT_CCT_MODE].desc = "Color correction profile type";
s->opt[OPT_CCT_MODE].type = SANE_TYPE_STRING;
s->opt[OPT_CCT_MODE].cap |= SANE_CAP_ADVANCED | SANE_CAP_INACTIVE;
s->opt[OPT_CCT_MODE].size = max_string_size(cct_mode_list);
s->opt[OPT_CCT_MODE].constraint_type = SANE_CONSTRAINT_STRING_LIST;
s->opt[OPT_CCT_MODE].constraint.string_list = cct_mode_list;
s->val[OPT_CCT_MODE].w = CCT_AUTO;


Does this mean this feature isn't enabled? or am I missing something.

$ scanimage -d 'epson2:libusb:006:009' --mode=Color --depth=16 --source="TPU8x10" --preview=yes 
--format=tiff --color-correction="None" --cct-type="Colour negatives" --cct-profile=0  -o 
~/preview.tif
scanimage: attempted to set inactive option cct-type



It appears from looking at the code that this option is disabled for the 
moment:


    /* XXX disabled for now */
    s->opt[OPT_CCT_MODE].name = "cct-type";
    s->opt[OPT_CCT_MODE].title = "CCT Profile Type";
...

I don't see the value being used elsewhere in the backend for this 
option either so I guess it doesn't do anything at the moment.


Perhaps the current maintainer has some ideas?

Cheers,
Ralph


  1   2   3   4   5   >