SCM

[#315521] Partial support Canon PIXMA MG3000 series

View Trackers | Bugs | Export CSV

Date:
2016-10-04 16:00
Priority:
3
State:
Closed
Submitted by:
Thierry huchard (thierry1970-guest)
Assigned to:
Louis Lagendijk (llagendijk-guest)
Category:
backends (drivers)
Group:
None
Resolution:
Wont Fix
Summary:
Partial support Canon PIXMA MG3000 series

Detailed description
Added support for Canon PIXMA MG3000 series USB. The wifi does not work.

Debug USB :
~# SANE_DEBUG_PIXMA=22 scanimage -L
[sanei_debug] Setting debug level of pixma to 22.
[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.17.24
[pixma] pixma_collect_devices() found Canon PIXMA MG3000 Series at libusb:003:011
[pixma] pixma_find_scanners() found 1 devices
device `pixma:04A9180B_301C45' is a CANON Canon PIXMA MG3000 Series multi-function peripheral

Debug WIFI :
~# SANE_DEBUG_PIXMA=22 scanimage -L
[sanei_debug] Setting debug level of pixma to 22.
[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.17.24
[bjnp] udp_command: ERROR - no data received
[bjnp] bjnp_init_device_structure: Cannot read mac address, skipping this scanner
[bjnp] udp_command: ERROR - no data received
[bjnp] add_scanner: ERROR - Cannot read scanner make & model: bjnp://192.168.42.100
[pixma] pixma_find_scanners() found 0 devices

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages)
============================================================================

~# sane-find-scanner

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

# No USB scanners found. If you expected something different, make sure that
# you have loaded a kernel driver for your USB host controller and have setup
# the USB system correctly. See man sane-usb for details.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.
===============================================================================

~# ping 192.168.42.100
PING 192.168.42.100 (192.168.42.100) 56(84) bytes of data.
64 bytes from 192.168.42.100: icmp_seq=1 ttl=64 time=6.98 ms
64 bytes from 192.168.42.100: icmp_seq=2 ttl=64 time=3.13 ms
64 bytes from 192.168.42.100: icmp_seq=3 ttl=64 time=5.02 ms
^C
--- 192.168.42.100 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.137/5.046/6.981/1.570 ms

Followups: Sort comments antichronologically

Message
Date: 2016-10-05 09:29
Sender: Thierry huchard

========================================================================
[Canon MG3000 ]~# iperf -c 192.168.42.100 -u -p 8612 -b 10M
------------------------------------------------------------
Client connecting to 192.168.42.100, UDP port 8612
Sending 1470 byte datagrams, IPG target: 1176.00 us (kalman adjust)
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.42.102 port 36777 connected with 192.168.42.100 port 8612
read failed: Connection refused
[ 3] WARNING: did not receive ack of last datagram after 1 tries.
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 8.61 KBytes 7.06 Kbits/sec
[ 3] Sent 6 datagrams



[Canon MG2900 ]~# iperf -c 192.168.42.107 -u -p 8612 -b 10M
------------------------------------------------------------
Client connecting to 192.168.42.107, UDP port 8612
Sending 1470 byte datagrams, IPG target: 1176.00 us (kalman adjust)
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.42.102 port 36598 connected with 192.168.42.107 port 8612
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 11.9 MBytes 10.0 Mbits/sec
[ 3] Sent 8505 datagrams
Date: 2016-10-07 07:40
Sender: Thierry huchard

Old protocol
============
canon-mfnp 8610 tcp Canon MFNP Service [Ritsuto_Sako] [Ritsuto_Sako] 2009-05-04
canon-mfnp 8610 udp Canon MFNP Service [Ritsuto_Sako] [Ritsuto_Sako] 2009-05-04
canon-bjnp1 8611 tcp Canon BJNP Port 1 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
canon-bjnp1 8611 udp Canon BJNP Port 1 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
canon-bjnp2 8612 tcp Canon BJNP Port 2 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
canon-bjnp2 8612 udp Canon BJNP Port 2 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
canon-bjnp3 8613 tcp Canon BJNP Port 3 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
canon-bjnp3 8613 udp Canon BJNP Port 3 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
canon-bjnp4 8614 tcp Canon BJNP Port 4 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
canon-bjnp4 8614 udp Canon BJNP Port 4 [Atsushi_Nakamura] [Atsushi_Nakamura] 2003-11
imink 8615 tcp Imink Service Control [Canon_Inc] [KEN_ICHI_FUJII] 2011-10-10

New Protocol for scanner MG3000
===============================
canon-chmp tcp Canon HTTP Management [Canon_Inc_3] [Tomoyuki_Hansaki] 2014-09-03 2015-03-16 Defined TXT keys: txtvers, mpath
Date: 2016-10-07 07:45
Sender: Thierry huchard

[Canon MG3000 ]~# avahi-browse -a
+ enp3s0 IPv6 Canon MG3000 series PDL Printer local
+ enp3s0 IPv4 Canon MG3000 series PDL Printer local
+ enp3s0 IPv6 Canon MG3000 series _privet._tcp local
+ enp3s0 IPv4 Canon MG3000 series _privet._tcp local
+ enp3s0 IPv6 Canon MG3000 series _canon-chmp._tcp local
+ enp3s0 IPv4 Canon MG3000 series _canon-chmp._tcp local
+ enp3s0 IPv6 Canon MG3000 series _ipps._tcp local
+ enp3s0 IPv4 Canon MG3000 series _ipps._tcp local
+ enp3s0 IPv6 Canon MG3000 series UNIX Printer local
+ enp3s0 IPv4 Canon MG3000 series UNIX Printer local
+ enp3s0 IPv6 Canon MG3000 series _scanner._tcp local
+ enp3s0 IPv4 Canon MG3000 series _scanner._tcp local
+ enp3s0 IPv6 Canon MG3000 series Web Site local
+ enp3s0 IPv4 Canon MG3000 series Web Site local
+ enp3s0 IPv6 Canon MG3000 series Internet Printer local
+ enp3s0 IPv6 AirPrint Canon-MG3000-series @ ordissimo-C17A Internet Printer local
+ enp3s0 IPv4 Canon MG3000 series Internet Printer local
+ enp3s0 IPv4 AirPrint Canon-MG3000-series @ ordissimo-C17A Internet Printer local
Date: 2016-10-07 12:30
Sender: Thierry huchard

I forgot to add that I had added patch file "add_canon_mg3000.patch" for the taking care of USB. I regrouped all information found. It is probably rough draft a bit.
Date: 2016-10-08 12:40
Sender: Rolf Bensch

I just pushed your patch to SANEs git repository and added the necessary doc files.

Please pull the recent sources from git before you proceed with testing. If I remember correctly there were some bugfixes in the bjnp interface since the version you are testing.

Now you should see pixma backend version 0.17.34 @ the top of the log!

Please report your results.
Date: 2016-10-10 11:11
Sender: Thierry huchard

Hello,
I just finished compiling the version of git. the result is the same:

] ~# avahi-browse -a -t | grep -F 'MG3000'
+ enp3s0 IPv6 Canon MG3000 series _privet._tcp local
+ enp3s0 IPv4 Canon MG3000 series _privet._tcp local
+ enp3s0 IPv6 Canon MG3000 series PDL Printer local
+ enp3s0 IPv4 Canon MG3000 series PDL Printer local
+ enp3s0 IPv6 Canon MG3000 series UNIX Printer local
+ enp3s0 IPv4 Canon MG3000 series UNIX Printer local
+ enp3s0 IPv6 Canon MG3000 series _canon-chmp._tcp local
+ enp3s0 IPv4 Canon MG3000 series _canon-chmp._tcp local
+ enp3s0 IPv6 Canon MG3000 series _scanner._tcp local
+ enp3s0 IPv4 Canon MG3000 series _scanner._tcp local
+ enp3s0 IPv6 Canon MG3000 series Web Site local
+ enp3s0 IPv4 Canon MG3000 series Web Site local
+ enp3s0 IPv6 Canon MG3000 series Internet Printer local
+ enp3s0 IPv4 Canon MG3000 series Internet Printer local
+ enp3s0 IPv6 Canon MG3000 series _ipps._tcp local
+ enp3s0 IPv4 Canon MG3000 series _ipps._tcp local

] ~# avahi-browse -a -t | grep -F 'MG2900'
+ enp3s0 IPv6 Canon MG2900 series _canon-bjnp1._tcp local
+ enp3s0 IPv4 Canon MG2900 series _canon-bjnp1._tcp local
+ enp3s0 IPv6 Canon MG2900 series UNIX Printer local
+ enp3s0 IPv4 Canon MG2900 series UNIX Printer local
+ enp3s0 IPv6 Canon MG2900 series _scanner._tcp local
+ enp3s0 IPv4 Canon MG2900 series _scanner._tcp local
+ enp3s0 IPv6 Canon MG2900 series Web Site local
+ enp3s0 IPv4 Canon MG2900 series Web Site local

] ~# scanimage -V
scanimage (sane-backends) 1.0.26git; backend version 1.0.26

] ~# scanimage -L
device `pixma:MG2900_192.168.42.103' is a CANON Canon PIXMA MG2900 Series multi-function peripheral

========================================================================
| MG3000 not detected, UDP 8612 is not used. I guess _canon_-chmp._tcp |
========================================================================
Date: 2016-10-10 17:07
Sender: Rolf Bensch

OK. This is an issue for the BJNP developers.
Date: 2016-11-05 18:56
Sender: Louis Lagendijk

My apologies for the delay: I have been ill and on holiday.

Sane does not use mDNS, but it would still be interesting to see what the content of the MG3000 series _privet._tcp local is. (avahi-discover can show you it's content. I still expect something like:
0000004681A9.local/192.168.159.11:8612
but it may contain something else...

Please also provide a logfile of scanimage:
EXPORT SANE_DEBUG_BJNP=4
scanimage -L > log

I assume that the iperfs are done from the same machine so that the firewall cannot get in the way for port 8612 TCP/UDP

/Louis
Date: 2016-11-07 10:45
Sender: Thierry huchard

No problem, I was weekend.
Herewith the requested information.
I remain at your disposal for any further information.

Thierry
Date: 2016-11-07 10:47
Sender: Thierry huchard

I put 4 attachments.
Date: 2016-11-07 17:48
Sender: Louis Lagendijk

Indeed only the MG2900 is detected the 3000 does not react al all. It seems not to support the BJNP protocol, at least not on port 8612. Do you have Windows installed? If so, please make a Wireshark trace on the address of the printer, and please attach it here. I can then have a look and see if it looks vaguely similar to BJNP. The traffic will most likely use port 80 (see the output for _scanner._tcp in the avahi log:
Type de service : _scanner._tcp
Nom du service : Canon MG3000 series
Nom de domaine : local
Interface : enp3s0 IPv4
Adresse : 2BAED3000000.local/192.168.42.107:80
TXT UUID = 00000000-0000-1000-8000-60128B2BAED3
TXT mdl = MG3000 series
TXT ty = Canon MG3000 series
TXT adminurl = http://2BAED3000000.local.
TXT mfg = Canon
TXT txtvers = 1

For BJNP scanners that contains port 8612.....

Date: 2016-11-08 08:56
Sender: Thierry huchard

Attached is a filtered file track on the IP of the printer.

Thierry
Date: 2016-11-08 13:22
Sender: Louis Lagendijk

This trace does not seem to have much similarity to the BJNP protocol. I am afraid that a complete re-design of the network code may be required. Did you try a scan from Windows and capture the network traffic?

BR, Louis
Date: 2016-11-08 14:03
Sender: Thierry huchard

Attachment of the track during scanning.

Thierry
Date: 2017-01-30 08:31
Sender: Thierry huchard

Hello,
New for the MG3000 driver.
Canon finally provided a driver.
I put the link to you where the sources are. I also enclose the archive.
This will help you, perhaps.

http://www.canon-europe.com/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mg_series/pixma_mg3050.aspx?type=drivers&language=EN&os=LINUX#disclaimer
Date: 2017-03-18 07:07
Sender: Thierry huchard

Same problem with wifi: https://alioth.debian.org/tracker/index.php?func=detail&aid=315658&group_id=30186&atid=410366
Date: 2017-05-05 18:53
Sender: Louis Lagendijk

Sorry, there is no more I can do as your scanner does not support BJNP.
Cheers, Louis
Date: 2017-06-25 11:15
Sender: Thierry huchard

I did not see your comment.
I think we're going to write a backend using the binary canon library. I have several Canon that have the same worries. The access code for this library is available.
thank you for watching
Date: 2017-06-26 19:45
Sender: Louis Lagendijk

Hi Thierry,
can you please test with avahi-discover and click on the MG3000 entry under scanner._tcp entry and check what it says for the address (at the bottom of the screen? For my MB5050 it says:
Address: 0000004681A9.local/192.168.159.11:8612
As you see it says 8612 for my scanner. I would be interested to see what is returned for the MG3000.....

BR, Louis
Date: 2017-06-29 15:39
Sender: Thierry huchard

Here is the result:

// IPV4
Type de service : _scanner._tcp
Nom du service : Canon MG3000 series
Nom de domaine : local
Interface : wlan1 IPv4
Adresse : 2BAED3000000.local/192.168.14.146:80
TXT UUID = 00000000-0000-1000-8000-60128B2BAED3
TXT mdl = MG3000 series
TXT ty = Canon MG3000 series
TXT adminurl = http://2BAED3000000.local.
TXT mfg = Canon
TXT txtvers = 1

// IPV6
Type de service : _scanner._tcp
Nom du service : Canon MG3000 series
Nom de domaine : local
Interface : wlan1 IPv6
Adresse : 2BAED3000000.local/192.168.14.146:80
TXT UUID = 00000000-0000-1000-8000-60128B2BAED3
TXT mdl = MG3000 series
TXT ty = Canon MG3000 series
TXT adminurl = http://2BAED3000000.local.
TXT mfg = Canon
TXT txtvers = 1

Thierry
Date: 2017-06-29 16:28
Sender: Louis Lagendijk

Thanks, it looks as if Canon changed things quite a bit.
I suspect that they replaced the protocol completely. You may want to try the following line in /etc/sane.d/pixma.conf:
bjnp:///192.168.14.146:80 and see if that works. I would not expect som by who knows?
Date: 2017-06-30 08:09
Sender: Thierry huchard

No scanner response.

Thierry
Date: 2017-07-09 19:30
Sender: Erich Schubert

For network scanning, this device appears to use some Microsoft web service SOAP protocol in the tcpdump?

WS-SCAN: https://msdn.microsoft.com/en-us/library/windows/hardware/ff547963(v=vs.85).aspx

So it may be possible to write a generic driver for such devices.

My Canon PIXMA TS5050 appears to use a similar, but different protocol from HP/Apple: AirScan.
Date: 2017-08-07 15:02
Sender: Thierry huchard

Hello,
Here is a first version of the sane backend using the canon library.
Directed by Bertie, a trainee in Master.

url : https://github.com/Ordissimo/scangearmp2

Thierry
Date: 2017-08-08 06:39
Sender: Thierry huchard

tested with ane-backends 1.0.27

Attached Files:

Attachments:
Size Name Date By Download
807 bytesadd_canon_mg3000.patch2016-10-04 16:00thierry1970-guestadd_canon_mg3000.patch
3 KiBmg2900-net.log2016-11-07 10:45thierry1970-guestmg2900-net.log
9 KiBavahi-dicover.log2016-11-07 10:45thierry1970-guestavahi-dicover.log
872 bytesmg3000-usb.log2016-11-07 10:45thierry1970-guestmg3000-usb.log
2 KiBmg3000-net.log2016-11-07 10:45thierry1970-guestmg3000-net.log
195 KiBtrace-mg3000.pcapng2016-11-08 08:56thierry1970-guesttrace-mg3000.pcapng
84 KiBtrace-scan-mg3000.pcapng2016-11-08 14:03thierry1970-guesttrace-scan-mg3000.pcapng
343 KiBscangearmp2-source-3.40-1.tar.gz2017-01-30 08:32thierry1970-guestscangearmp2-source-3.40-1.tar.gz

Changes:

Field Old Value Date By
status_idOpen2017-05-05 18:54llagendijk-guest
close_dateNone2017-05-05 18:54llagendijk-guest
ResolutionNone2017-05-05 18:53llagendijk-guest
File Added7337: scangearmp2-source-3.40-1.tar.gz2017-01-30 08:32thierry1970-guest
File Added7273: trace-scan-mg3000.pcapng2016-11-08 14:03thierry1970-guest
File Added7271: trace-mg3000.pcapng2016-11-08 08:56thierry1970-guest
File Added7267: mg2900-net.log2016-11-07 10:45thierry1970-guest
File Added7268: mg3000-net.log2016-11-07 10:45thierry1970-guest
File Added7269: mg3000-usb.log2016-11-07 10:45thierry1970-guest
File Added7270: avahi-dicover.log2016-11-07 10:45thierry1970-guest
assigned_toroben-guest2016-10-10 17:07roben-guest
assigned_tollagendijk-guest2016-10-08 12:04roben-guest
assigned_toroben-guest2016-10-08 12:01roben-guest
assigned_tonone2016-10-07 11:33kitno-guest
File Added7241: add_canon_mg3000.patch2016-10-04 16:00thierry1970-guest
Powered By FusionForge