[sane-devel] MP600R doesn't work
Louis Lagendijk
louis at fazant.net
Mon Sep 10 20:32:49 UTC 2012
On Sun, 2012-09-09 at 20:15 +0200, Frode V. Fjeld wrote:
> Louis Lagendijk <louis at fazant.net> writes:
>
> > [...] Please try the code from GIT
>
> Thank you so much, but I'm sorry to say it still doesn't quite
> work. Here's the log from scanimage -T:
>
...some log lines stripped....
> [pixma] Scanner model found: Name MP600R(Canon PIXMA MP600R) matches MP600R
> [pixma] Select returned, time left 0.499992....
> [pixma] Discover response:
> [pixma] 00000000:42 4a 4e 50 82 01 00 00 00 00 00 00 00 00 00 10
> [pixma] 00000010:00 01 08 00 06 04 00 00 85 84 48 64 c0 a8 01 26
> [pixma] Forward lookup for printer succeeded, using as hostname
> [pixma] bjnp_allocate_device(bjnp://printer:8612) 1
> [pixma] setup_udp_socket: Setting up a UDP socket, dest: 192.168.1.38 port 8612
> [pixma] Discover response:
> [pixma] 00000000:42 4a 4e 50 82 01 00 00 00 00 00 00 00 00 00 10
> [pixma] 00000010:00 01 08 00 06 04 00 00 85 84 48 64 c0 a8 01 26
> [pixma] Scanner at bjnp://printer:8612 was added before, good!
> [pixma] scanner discovery finished...
> [pixma] pixma_collect_devices() found Canon PIXMA MP600R at bjnp://printer:8612
> [pixma] pixma_open(): Canon PIXMA MP600R
> [pixma] sanei_bjnp_open(bjnp://printer:8612, 0):
> [pixma] bjnp_allocate_device(bjnp://printer:8612) 1
> [pixma] setup_udp_socket: Setting up a UDP socket, dest: 192.168.1.38 port 8612
> [pixma] Discover response:
> [pixma] 00000000:42 4a 4e 50 82 01 00 00 00 00 00 00 00 00 00 10
> [pixma] 00000010:00 01 08 00 06 04 00 00 85 84 48 64 c0 a8 01 26
> [pixma] sanei_bjnp_activate (0)
> [pixma] Job details
> [pixma] 00000000:42 4a 4e 50 02 10 00 00 00 02 00 00 00 00 01 88
> [pixma] 00000010:00 00 00 00 00 00 00 00 00 4b 00 61 00 72 00 6f
> [pixma] 00000020:00 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000030:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000040:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000050:00 00 00 00 00 00 00 00 00 66 00 72 00 6f 00 64
> [pixma] 00000060:00 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000070:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000080:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000090:00 00 00 00 00 00 00 00 00 50 00 72 00 6f 00 63
> [pixma] 000000a0:00 65 00 73 00 73 00 20 00 49 00 44 00 20 00 3d
> [pixma] 000000b0:00 20 00 32 00 33 00 38 00 38 00 33 00 00 00 00
> [pixma] 000000c0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 000000d0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 000000e0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 000000f0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000100:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000110:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000120:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000130:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000140:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000150:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000160:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000170:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000180:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [pixma] 00000190:00 00 00 00 00 00 00 00 c0 3e 56 01 00 00 00 00
> [pixma] 000001a0:2f 00 00 00 00 00 00 00
> [pixma] setup_udp_socket: Setting up a UDP socket, dest: 192.168.1.38 port 8612
> [pixma] udp_command: select failed: timed out
a slow response from the scanner, but we can recover from it....
> [pixma] Job details response:
> [pixma] 00000000:42 4a 4e 50 82 10 85 02 00 02 00 00 00 00 00 04
> [pixma] 00000010:00 00 00 00
> [pixma] bjnp_open_tcp: Setting up a TCP socket, dest: 192.168.1.38 port 8612
> [pixma] bjnp_set_timeout to 20000
> [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16)
> [pixma] bjnp_write: sending 0x10 = 16 bytes
> [pixma] 00000000:42 4a 4e 50 02 21 00 00 00 03 00 00 00 00 00 10
> [pixma] 00000010:f3 20 00 00 00 00 00 00 00 00 00 00 00 00 00 10
> [pixma] bjnp_recv_header: receiving response header
> [pixma] TCP response header(scanner data = 4 bytes):
> [pixma] 00000000:42 4a 4e 50 82 21 00 00 00 03 00 00 00 00 00 04
> [pixma] bjnp_recv_data: receiving response data
> [pixma] bjnp_recv_data: read response payload (4 bytes max)
> [pixma] Received TCP response payload (4 bytes):
> [pixma] 00000000:00 00 00 10
> [pixma] OUT T=6.567 len=16
> [pixma] 00000000:f3 20 00 00 00 00 00 00 00 00 00 00 00 00 00 10
> [pixma]
> [pixma] bjnp_set_timeout to 20000
> [pixma] bjnp_read_bulk(0, bufferptr, 0x18 = 24)
> [pixma] bjnp_read_bulk: 0x0 = 0 bytes available at start
> [pixma] Received 0x0 = 0 bytes, backend requested 0x18 = 24 bytes
> [pixma] No (more) scanner data available, requesting more( blocksize = 2048 =800
> [pixma] bjnp_send_read_req sending command
> [pixma] 00000000:42 4a 4e 50 02 20 00 00 00 04 00 00 00 00 00 00
> [pixma] bjnp_recv_header: receiving response header
> [pixma] TCP response header(scanner data = 0 bytes):
> [pixma] 00000000:42 4a 4e 50 82 20 83 00 00 04 00 00 00 00 00 00
> [pixma] returning 0 bytes, backend expexts 24
This is probably where it goes wrong: these is no data returned to the
status command sent before (f320). Can you please try what happens if
your replace the line 2076
break;
in pixma_bjnp.c by
sleep(1);
continue;
or
cd < dir where you have your sane-backends checkedout>
patch -p1 < <path to the patch>
If this helps I need to extend the patch before I will commit it.
Wit this patch we retry the read command untill we get some response. It
would be interesting to see if this helps.
If this fails, can you please try the USB connection to make sure this
is not a problem in the actual backend?
Thanks for trying. As I do not have access to the MP600R device, I can
only guess what is happening....
kind regards, Louis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zero-lenght-response-retry.patch
Type: text/x-patch
Size: 415 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120910/a23e7503/attachment.bin>
More information about the sane-devel
mailing list