Re: [sane-devel] Canoscan Unsupported

2019-11-02 Thread Ralph Little

Hi,

On 2019-10-31 12:09 p.m., Povilas Kanapickas wrote:


I plan to work on 4400F and 5600F in the near future. I have access to
all of the above scanners.



I seem to now own a Canoscan 3000F and 4400F now. :D
Like London buses, you wait ages then 3 come at the same time.

Cheers,
Ralph



Re: [sane-devel] Canon ImageClass MF644Cdw

2019-11-02 Thread Louis Lagendijk
On Sat, 2019-11-02 at 17:41 +0100, Rolf Bensch wrote:
> Hi Louis,
> 
> Do you have any ideas about this issue?
> 
> Cheers,
> Rolf
> 
I have this on my list for next week: I am having a few issues with my
Maxify 5450 that I need to fix first to get a stable platform to test
(although my ethernet switches may be causing some of the issues). once
that is done I am planning to look into open Sane/BJNP issues.

It would help if I could get a wireshark dump so I can try to
understand what is happening


BR, Louis 
> Am 01.11.19 um 00:31 schrieb Ralph Little:
> > Hi,
> > 
> > On Thu, Oct 31, 2019 at 4:12 PM David McMahon  > > wrote:
> > 
> > 
> > Thanks for the clue!  Looking on that on the settings page of
> > the
> > printer, the hostname is the default of "Canoncbcab3" which
> > seems
> > harmless enough.  I changed it to "Can" to see if that changed
> > anything, but still getting the buffer overflow.
> > If you have a link handy to that part of the code, can you
> > point me
> > to it?  Maybe it's something else right after the strcpy().
> >  
> > 
> > 
> > Hmm, that might have been slightly misleading.
> > 
> > I'm looking at backend/pixma_bjnp.c at line 801, which is where we
> > see
> > the last successful debug message from the function
> > get_scanner_id():
> > 
> > "get_scanner_id: Scanner model = "
> > 
> > It returns to the only place it is called, line 1817 in
> > add_scanner().
> > We don't get the error message (at line 1819) so it must next call
> > the
> > function determine_scanner_serial() which attempts to determine a
> > "serial number" for the scanner.
> > This could be one of a selection of things, so that might be the
> > culprit, since it does some strcpy() calls in there, although we
> > don't
> > have any debug messages in there, so we don't really know how far
> > it got
> > before the buffer overrun struck :(
> > 
> > If it were me chasing this, I would add some more dbg messages to
> > see
> > how far it got, perhaps one after the call to
> > determine_scanner_serial()
> > to see if it returned to start off with. If it didn't some dbg in
> > the
> > function determine_scanner_serial() to see what it decided.
> > 
> > Cheers,
> > Ralph





Re: [sane-devel] Canon ImageClass MF644Cdw

2019-11-02 Thread Rolf Bensch
Hi Louis,

Do you have any ideas about this issue?

Cheers,
Rolf

Am 01.11.19 um 00:31 schrieb Ralph Little:
> Hi,
> 
> On Thu, Oct 31, 2019 at 4:12 PM David McMahon  > wrote:
> 
> 
> Thanks for the clue!  Looking on that on the settings page of the
> printer, the hostname is the default of "Canoncbcab3" which seems
> harmless enough.  I changed it to "Can" to see if that changed
> anything, but still getting the buffer overflow.
> If you have a link handy to that part of the code, can you point me
> to it?  Maybe it's something else right after the strcpy().
>  
> 
> 
> Hmm, that might have been slightly misleading.
> 
> I'm looking at backend/pixma_bjnp.c at line 801, which is where we see
> the last successful debug message from the function get_scanner_id():
> 
> "get_scanner_id: Scanner model = "
> 
> It returns to the only place it is called, line 1817 in add_scanner().
> We don't get the error message (at line 1819) so it must next call the
> function determine_scanner_serial() which attempts to determine a
> "serial number" for the scanner.
> This could be one of a selection of things, so that might be the
> culprit, since it does some strcpy() calls in there, although we don't
> have any debug messages in there, so we don't really know how far it got
> before the buffer overrun struck :(
> 
> If it were me chasing this, I would add some more dbg messages to see
> how far it got, perhaps one after the call to determine_scanner_serial()
> to see if it returned to start off with. If it didn't some dbg in the
> function determine_scanner_serial() to see what it decided.
> 
> Cheers,
> Ralph



Re: [sane-devel] Canoscan Lide 90

2019-11-02 Thread Ralph Little

Hi,

On 2019-11-02 4:55 a.m., Povilas Kanapickas wrote:

Is the CanoScan LIDE 90 still unsupported (as it says in the supported

If so, is it worth getting hold of one for dev work?
Do you have one Povilas?

Currently, yes, the scanner is completely not supported, but I have the
scanner and will soon look into it. Internets say it has GL842 chip
inside, which means that it'll need a lot of work in order to be
supported, as currently there's no other supported scanners using that chip.


Gotcha.


 From my side I would recommend looking into GL646 scanners. I only had
HP 2300 for testing, but I did a lot of changes in the area and thus
probably broke many of the other scanners. The breakage would be
relatively simple to fix and not very hard to find using bisecting, so
it's a great way to have an impact with little effort and to learn the
genesys backend in the process. The only reason why I didn't do that
myself was that it's almost impossible to find used GL646 scanners for
sale in my country and I didn't look into eBay yet as I have a lot of
other scanners in the queue.


OK, that sounds like a plan. I will get a list from the genesys backend 
and go on the hunt.

Picking up a Canoscan 3000f this afternoon. Hopefully that works out.

Cheers,
Ralph




Re: [sane-devel] Canon ImageClass MF644Cdw

2019-11-02 Thread Kip Shaffer
Thank you Louis!  As mentioned further back in the thread, Rolf's latest
PPA worked well without anything in the file 'pixma.conf' (except for an
error generated at the end of reading from the sheet feeder).  But I
thought it might be helpful to test the mfnp:// protocol directive for the
sake of completeness.  It did not seem to work.

To start, here is what happens with an empty pixma.conf file:
$ sudo scanimage -L
device `pixma:MF642C/643C/644C_192.168.1.111' is a CANON Canon i-SENSYS
MF640 Series multi-function peripheral

Next, we will add this to pixma.conf: mfnp://MF640_192.168.1.111
$ sudo scanimage -L
[bjnp] bjnp_allocate_device: ERROR - Cannot resolve host:
MF640_192.168.1.111 port 8612
(it then goes on to find the printer anyway on its own)

This is curious for a couple reasons.  1) Why does the error start with
[bjnp] when I specified mfnp?  2) Why does it think that MF640_ is part of
the host name when the documentation shows putting the model number ahead
of the IP address?

Lastly, we will attempt to fix point 2 above by using only the IP
address: mfnp://192.168.1.111
$ sudo scanimage -L
[bjnp] udp_command: ERROR - no data received (timeout = 1)
[bjnp] bjnp_init_device_structure: Cannot read mac address, skipping this
scanner
[bjnp] udp_command: ERROR - no data received (timeout = 1)
[bjnp] add_scanner: ERROR - Cannot read scanner make & model: mfnp://
192.168.1.111:8612/timeout=1
(again, it goes on to find the printer anyway on its own, presumably with
no help from the pixma.conf file)

Again, the output is prefixed with [bjnp], and it doesn't seem like it is
able to communicate correctly.  Let's generate some debugging:
$ sudo SANE_DEBUG_BJNP=5 scanimage -L 2>&1
[sanei_debug] Setting debug level of bjnp to 5.
[bjnp] sanei_bjnp_find_devices, pixma backend version: 0.25.0
[bjnp] sanei_bjnp_find_devices: Adding scanner from pixma.conf: mfnp://
192.168.1.111
[bjnp] bjnp_allocate_device(mfnp://192.168.1.111:8612/timeout=1) 0
[bjnp] get_scanner_name: Name for 192.168.1.111 not found : Name or service
not known
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 192.168.1.111  port
8612
[bjnp] udp_command: ERROR - recv failed: Connection refused[bjnp]
udp_command: ERROR - recv failed: Connection refused[bjnp] udp_command:
ERROR - recv failed: Connection refused[bjnp] udp_command: ERROR - no data
received (timeout = 1)
[bjnp] bjnp_init_device_structure: Cannot read mac address, skipping this
scanner
[bjnp] bjnp_allocate_device: Scanner not yet in our list, added it:
192.168.1.111:8612
[bjnp] get_scanner_id: Get scanner identity
[bjnp]  :4d 46 4e 50 02 30 00 00  00 01 00 00 00 00 00 00
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 192.168.1.111  port
8612
[bjnp] udp_command: ERROR - recv failed: Connection refused[bjnp]
udp_command: ERROR - recv failed: Connection refused[bjnp] udp_command:
ERROR - recv failed: Connection refused[bjnp] udp_command: ERROR - no data
received (timeout = 1)
[bjnp] get_scanner_id: ERROR - Failed to retrieve scanner identity:
[bjnp] add_scanner: ERROR - Cannot read scanner make & model: mfnp://
192.168.1.111:8612/timeout=1
[bjnp] sanei_bjnp_find_devices: Added all configured scanners, now do auto
detection...

It continues with the auto detection (included for reference)
[bjnp] prepare_socket: lo is not a valid IPv4 interface, skipping...
[bjnp] prepare_socket: eth0 is IPv4 capable, sending broadcast, socket = 39
[bjnp] prepare_socket: lo is not a valid IPv6 interface, skipping...
[bjnp] prepare_socket: eth0 is IPv6 capable, sending broadcast, socket = 40
[bjnp] sanei_bjnp_find_devices: Select returned, time left 0.46
[bjnp] sanei_find_devices: Discover response:
[bjnp]  :4d 46 4e 50 82 01 00 00  00 00 00 00 00 00 00 10
[bjnp]  0010:00 01 80 00 06 04 f4 a9  97 c9 3d 62 c0 a8 01 6f
[bjnp] get_scanner_name: Name for 192.168.1.111 not found : Name or service
not known
[bjnp] bjnp_allocate_device(mfnp://192.168.1.111:8610/timeout=1) 1
[bjnp] get_scanner_name: Name for 192.168.1.111 not found : Name or service
not known
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 192.168.1.111  port
8610
[bjnp] bjnp_get_scanner_mac_address: Discover response:
[bjnp]  :4d 46 4e 50 82 01 00 00  00 00 00 00 00 00 00 10
[bjnp]  0010:00 01 80 00 06 04 f4 a9  97 c9 3d 62 c0 a8 01 6f
[bjnp] bjnp_allocate_device: Scanner not yet in our list, added it:
192.168.1.111:8610
[bjnp] get_scanner_id: Get scanner identity
[bjnp]  :4d 46 4e 50 02 30 00 00  00 01 00 00 00 00 00 00
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 192.168.1.111  port
8610
[bjnp] get_scanner_id: scanner identity:
[bjnp]  :4d 46 4e 50 82 30 00 00  00 01 00 00 00 00 00 5a
[bjnp]  0010:4d 46 47 3a 43 41 4e 4f  4e 3b 43 4d 44 3a 4d 46
[bjnp]  0020:4e 50 31 2c 4d 75 6c 74  69 50 41 53 53 20 32 2e
[bjnp]  0030:31 3b 4d 44 4c 3a 4d 46  36 34 32 43 2f 36 34 33
[bjnp]  0040:43 2f 36 34 34 43 3b 43  4c 53 

Re: [sane-devel] Canoscan Lide 90

2019-11-02 Thread Povilas Kanapickas
Hi Ralph,

On 11/1/19 8:05 PM, Ralph Little wrote:
> Hi,
> Is the CanoScan LIDE 90 still unsupported (as it says in the supported
> scanner list)?
> If so, is it worth getting hold of one for dev work?
> Do you have one Povilas?

Currently, yes, the scanner is completely not supported, but I have the
scanner and will soon look into it. Internets say it has GL842 chip
inside, which means that it'll need a lot of work in order to be
supported, as currently there's no other supported scanners using that chip.

>From my side I would recommend looking into GL646 scanners. I only had
HP 2300 for testing, but I did a lot of changes in the area and thus
probably broke many of the other scanners. The breakage would be
relatively simple to fix and not very hard to find using bisecting, so
it's a great way to have an impact with little effort and to learn the
genesys backend in the process. The only reason why I didn't do that
myself was that it's almost impossible to find used GL646 scanners for
sale in my country and I didn't look into eBay yet as I have a lot of
other scanners in the queue.

Regards,
Povilas