Canon imageCLASS D480 network scanner

I have a Canon imageCLASS D480 FAX/printer/scanner attached to our router for all our computers to remotely access and use as a network FAX/printer/scanner. I have downloaded/installed its UFR II/UFR II LT Printer Driver for Linux V3.20 driver on my Dell Inspiron 3252 running OpenSuSE LEAP 42.1. So far, I can remotely print to the Canon imageCLASS D480 FAX/printer/scanner. What I like to do next is to configure this computer to be able to remotely access the scanner. So, I launched YaST2 and go into Hardware → Scanner and it could not detect the Canon imageCLASS D480 FAX/printer/scanner (No scanner was detected and no active scanner or driver exists). So, I clicked the Add button to manually add a scanner and YaST2 prompted with a list of scanners (including the Canon imageCLASS D480 FAX/printer/scanner driver). So, I selected this driver and click the Next button. Now, YaST2 shows the driver is pixma with a no scanner recognized by this driver message. Failing that, I clicked the Other button and selected Scanning via Network option. Then, I entered the IP Address of the Canon imageCLASS D480 FAX/printer/scanner into the fields of both Server and Client settings and clicked OK button (if I had firewall enabled, YaST2 will pop up a small window with a message to configure the firewall to open the ports for the scanner). After this, YaST2 swtiched back to the Scanner configuration page to show the driver is pixma with a no scanner recognized by this driver message. In other words, it failed to communicate with the Canon imageCLASS D480 FAX/printer/scanner. At this point, I am really clueless and would open for some helps and/or suggestions on how to get my computer to be able to remotely access and/or perform scan the Canon imageCLASS D480 FAX/printer/scanner…

BTW and just out of curiosity, if I physically move and connect the Canon imageCLASS D480 FAX/printer/scanner to my computer through a USB port, then YaST2 can detect and make the scanner work without a problem. In other words, this shows the UFR II/UFR II LT Printer Driver for Linux V3.20 driver works, but this is not what I want to achieve.

The sane-pixma backend supports this scanner

man sane-pixma

This may be applicable for a networked Canon scanner

/etc/sane.d/pixma.conf
The backend configuration file (see also description of SANE_CONFIG_DIR below). The files contains an optional list of scanners. Normally only scanners that can not be
auto-detected because they are on a different subnet shall be listed here. If your OS does not allow enumeration of interfaces (i.e. it does not support the getifaddrs()
function) you may need to add your scanner here as well. Scanners shall be listed as:

          bjnp://<host>
          where host is the hostname or IP address of the scanner, e.g. bjnp://10.0.1.4  for  IPv4,  bjnp://[2001:888:118e:18e2:21e:8fff:fe36:b64a]  for  a  literal  IPv6-address  or
          bjnp://myscanner.mydomain.org. Define each scanner on a new line.

It may be that a firewall is preventing auto-detection by the SANE backend.

With regards to the local machine firewall

NETWORKING SUPPORT
The pixma backend supports network scanners using the so called Canon BJNP protocol. Both IPv4 and IPv6 are supported.

   Configuration is normally not required.  The pixma backend will auto-detect your scanner if it is within the same subnet as your computer if your OS does support this.
   If your scanner can not be auto-detected, you can add it to the pixma configuration file (see above).

FIREWALLING FOR NETWORKED SCANNERS
The sane pixma backend communicates with port 8612 on the scanner. So you will have to allow outgoing traffic TO port 8612 on the common subnet for scanning.

   Scanner  detection  is  slightly  more complicated. The pixma backend sends a broadcast on all direct connected subnets it can find (provided your OS allows for enumeration of all
   netowrk interfaces). The broadcast is sent FROM port 8612 TO port 8612 on the broadcast address of each interface.  The outgoing packets will be  allowed  by  the  rule  described
   above.
   Responses  from  the scanner are sent back to the computer TO port 8612.  Connection tracking however does not see a match as the response does not come from the broadcast address
   but from the scanners own address.  For automatic detection of your scanner, you will therefore have to allow incoming packets TO port 8612 on your computer.
   So in short: open the firewall for all traffic from your computer to port 8612 AND to port 8612 to your computer.
   With the firewall rules above there is no need to add the scanner to the pixma.conf file, unless the scanner is on a network that is not directly connected to your computer.

My Canon imageCLASS D480 FAX/printer/scanner is attached to the same LAN and statically assigned with an IP Address of 10.0.0.9. Also, I temporarily disabled (turned off) Firewall service and added bjnp://10.0.0.9:8612 (also tried bjnp://10.0.0.9) to my /etc/sane.d/pixma.conf file. Unfortunately, YaST2 -> Hardware -> Scanner still can not detect the network scanner.

There should be no need to use YaST to configure the scanner. Can you scan using xsane, simple-scan, or any other scanning utility?

BTW, is the scanner detected with

scanimage -L

Unfortunately, all of the scan utilities, i.e. xsane, simple-scan, and scanimage -L, does not work to detect the network scanner.

[suse@linux-rf8f:/home/local/PEOPLE/suse 104%] ~ xsane
[bjnp] udp_command: no data received
[bjnp] Cannot read mac address, skipping this scanner
[bjnp] udp_command: no data received
[bjnp] Cannot read scanner make & model: bjnp://10.0.0.9:8612
[suse@linux-rf8f:/home/local/PEOPLE/suse 105%] ~ simple-scan
[bjnp] udp_command: no data received
[bjnp] Cannot read mac address, skipping this scanner
[bjnp] udp_command: no data received
[bjnp] Cannot read scanner make & model: bjnp://10.0.0.9:8612
1.020u+0.236s=1:01.86e(2.0%) TDSavg=0k+0k+0k max=45272k 0+32io 0pf+0sw
[suse@linux-rf8f:/home/local/PEOPLE/suse 106%] ~ scanimage -L
[bjnp] udp_command: no data received
[bjnp] Cannot read mac address, skipping this scanner
[bjnp] udp_command: no data received
[bjnp] Cannot read scanner make & model: bjnp://10.0.0.9:8612

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).
[suse@linux-rf8f:/home/local/PEOPLE/suse 107%] ~

When physically I brought and connected the scanner from other room to any of the USB ports, dmesg shows the device is detected (see below).

 1293.941975] usb 1-5.4: new high-speed USB device number 14 using xhci_hcd
 1294.067058] usb 1-5.4: New USB device found, idVendor=04a9, idProduct=26ed
 1294.067089] usb 1-5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 1294.067097] usb 1-5.4: Product: D460-490
 1294.067104] usb 1-5.4: Manufacturer: Canon Inc.
 1294.067110] usb 1-5.4: SerialNumber: SJ3012960944Q
 1294.084958] usblp 1-5.4:1.1: usblp0: USB Bidirectional printer dev 14 if 1 alt 0 proto 2 vid 0x04A9 pid 0x26ED
 1294.094328] usblp 1-5.4:1.2: usblp1: USB Bidirectional printer dev 14 if 2 alt 0 proto 2 vid 0x04A9 pid 0x26ED

Then, I launched YaST2 → Hardware → Scanner and it detected to install the scanner. Unlike previously as mentioned above in my OP (where I clearly said the scanner works through USB port), now YaST2 complains with the following error messages when I clicked the Other button and selected Test option.

Test with scanimage -d pixma:04A926ED_SJ3012960944Q -v failed
The results are:

scanimage: scanning image of size 640x877 pixels at 24 bits/pixel
scanimage: acquiring RGB frma
scanimage: min/max graylevel value = 255/0
scanimage: sane_read: Device busy

I don’t know what could have caused sane to say the device is busy. Now, not only my computer can not remotely access the scanner, but also can not locally access it through a USB port. :frowning:

With regards to the USB connectivity, try power cycling the multifunction device and see if that helps. If it is connected from boot, does it then get detected properly? Do you have a mixture of USB 3.0 and 2.0 ports on this computer? Try changing USB port. Any different?

With regards to network connectivity, I’m wondering if the router may be blocking the UDP broadcasts…

[bjnp] udp_command: no data received
[bjnp] Cannot read mac address, skipping this scanner
[bjnp] udp_command: no data received
[bjnp] Cannot read scanner make & model: bjnp://10.0.0.9:8612

You might want to check the router configuration accordingly.

Do an nmap scan with

nmap 10.0.0.9

Another diagnostic step worth pursuing is to assign your machine a static IP address and connect an ethernet cable directly between it and the printer/scanner. Can you then scan successfully?

I got this resolved. Apparently, the scanner has two modes, i.e. Network scanning and USB scanning. It was set to Network scanning. After toggling to USB scanning, the scanner now works through USB port.

With regards to network connectivity, I’m wondering if the router may be blocking the UDP broadcasts…

[bjnp] udp_command: no data received
[bjnp] Cannot read mac address, skipping this scanner
[bjnp] udp_command: no data received
[bjnp] Cannot read scanner make & model: bjnp://10.0.0.9:8612

You might want to check the router configuration accordingly.

Do an nmap scan with

nmap 10.0.0.9

I toggled to Network scanning mode and did the nmap test with and/or without Firewall and the results are the same as shown below which does not show any 8612 port.

1. With Firewall
[root@linux-rf8f:/home/local/PEOPLE/suse 3%] # nmap 10.0.0.9

Starting Nmap 6.47 ( http://nmap.org ) at 2016-06-06 23:52 EDT
Nmap scan report for 10.0.0.9
Host is up (0.0021s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
80/tcp   open  http
515/tcp  open  printer
9011/tcp open  unknown
9100/tcp open  jetdirect
MAC Address: 00:1E:8F:XX:YY:ZZ (Canon)

Nmap done: 1 IP address (1 host up) scanned in 90.55 seconds

2. Without Firewall
[root@linux-rf8f:/home/local/PEOPLE/suse 4%] # nmap 10.0.0.9

Starting Nmap 6.47 ( http://nmap.org ) at 2016-06-06 23:57 EDT
Nmap scan report for 10.0.0.9
Host is up (0.0022s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
80/tcp   open  http
515/tcp  open  printer
9011/tcp open  unknown
9100/tcp open  jetdirect
MAC Address: 00:1E:8F:XX:YY:ZZ (Canon)

Nmap done: 1 IP address (1 host up) scanned in 85.65 seconds
[root@linux-rf8f:/home/local/PEOPLE/suse 5%] #

Another diagnostic step worth pursuing is to assign your machine a static IP address and connect an ethernet cable directly between it and the printer/scanner. Can you then scan successfully?
Are you saying both the scanner and computer configured with a static IP Address and connect them directly between their Ethernet ports?

Ah, good to know. :slight_smile:

Try the following

nmap -sU -p 8611,8612 --script bjnp-discover 10.0.0.9

Are you saying both the scanner and computer configured with a static IP Address and connect them directly between their Ethernet ports?

Yes, just to eliminate the router as a cause of the problems.

I tried the above and it does not look good as shown below. It looks like myCanon imageCLASS D480 FAX/printer/scanner does not respond to 8612 port.

[root@linux-rf8f:/home/local/PEOPLE/suse 2%] # nmap -sU -p 8611,8612 --script bjnp-discover 10.0.0.9

Starting Nmap 6.47 ( http://nmap.org ) at 2016-06-07 08:37 EDT
Nmap scan report for 10.0.0.9
Host is up (0.0023s latency).
PORT     STATE  SERVICE
8611/udp closed canon-bjnp1
8612/udp closed canon-bjnp2
MAC Address: 00:1E:8F:XX:YY:ZZ (Canon)

Nmap done: 1 IP address (1 host up) scanned in 0.58 seconds
[root@linux-rf8f:/home/local/PEOPLE/suse 3%] #

Yes, just to eliminate the router as a cause of the problems.

Same result here with a direct connection between the RJ45 ports from compuer to the scanner.

[root@linux-rf8f:/home/local/PEOPLE/suse 13%] # nmap -sU -p 8611,8612 --script bjnp-discover 10.0.0.9

Starting Nmap 6.47 ( http://nmap.org ) at 2016-06-07 08:46 EDT
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers w
ith --dns-servers
Nmap scan report for 10.0.0.9
Host is up (0.0024s latency).
PORT     STATE  SERVICE
8611/udp closed canon-bjnp1
8612/udp closed canon-bjnp2
MAC Address: 00:1E:8F:XX:YY:ZZ (Canon)

Nmap done: 1 IP address (1 host up) scanned in 0.57 seconds
[root@linux-rf8f:/home/local/PEOPLE/suse 14%] #

Yes, that output suggests that the scanner can’t be communicated with via port 8612, so not using the BJNP protocol. As a result, the pixma backend is not capable of communicating with the D480 model via the network.

If you really desire scanning over the network, the only possibility that I can see working, is to consider using a SANE server as described here

https://en.opensuse.org/SDB:Configuring_Scanners#Scanning_via_Network
https://wiki.archlinux.org/index.php/SANE#Sharing_your_scanner_over_a_network

A small Raspberry Pi (or similar) could be used to achieve this. It could also double as a CUPS print server configured with a RAW printing queue.

It is interesting that your earlier port scan did show that the device is listening on port 9011. This page suggests that port is associated with ‘Canon ScanGear Tool and Scanning’. Another reference mentions 'Canon Common Peripheral Controlling Architecture; using a range of ports including this one. The pixma backend is unlikely to be compatible with whatever protocol it is using unfortunately.

Unfortunately, you are right.

If you really desire scanning over the network, the only possibility that I can see working, is to consider using a SANE server as described here

https://en.opensuse.org/SDB:Configuring_Scanners#Scanning_via_Network
https://wiki.archlinux.org/index.php/SANE#Sharing_your_scanner_over_a_network

A small Raspberry Pi (or similar) could be used to achieve this. It could also double as a CUPS print server configured with a RAW printing queue.
I had that thought before, except using some inexpensive old PogoPlug Pro or Seagate GoFLEX Home/Net.

It is interesting that your earlier port scan did show that the device is listening on port 9011. This page suggests that port is associated with ‘Canon ScanGear Tool and Scanning’. Another reference mentions 'Canon Common Peripheral Controlling Architecture; using a range of ports including this one. The pixma backend is unlikely to be compatible with whatever protocol it is using unfortunately.
Since your mention of port 9011, I did some simple tests using telnet to confirm that those ports 9011 and 9014 are indeed open and do respond to telnet as shown below, but neither ports work with bjnp protocol, unfortunately.

[suse@linux-rf8f:/home/local/PEOPLE/suse/works 115%] ~ telnet 10.0.0.9 9011
Trying 10.0.0.9...
Connected to 10.0.0.9.
Escape character is '^]'.
^]
telnet> q
Connection closed.
[suse@linux-rf8f:/home/local/PEOPLE/suse/works 116%] ~ telnet 10.0.0.9 9014
Trying 10.0.0.9...
Connected to 10.0.0.9.
Escape character is '^]'.
^]
telnet> q
Connection closed.
[suse@linux-rf8f:/home/local/PEOPLE/suse/works 117%] ~ scanimage -L
[bjnp] udp_command: no data received
[bjnp] Cannot read mac address, skipping this scanner
[bjnp] udp_command: no data received
[bjnp] Cannot read scanner make & model: bjnp://10.0.0.9:9011
device `pixma:04A926ED_SJ3012960944Q' is a CANON Canon imageCLASS D480 multi-function peripheral
[suse@linux-rf8f:/home/local/PEOPLE/suse/works 118%] ~ scanimage -L
[bjnp] udp_command: no data received
[bjnp] Cannot read mac address, skipping this scanner
[bjnp] udp_command: no data received
[bjnp] Cannot read scanner make & model: bjnp://10.0.0.9:9014
device `pixma:04A926ED_SJ3012960944Q' is a CANON Canon imageCLASS D480 multi-function peripheral
[suse@linux-rf8f:/home/local/PEOPLE/suse/works 119%] ~

The other option is perhaps to compile my own sane package from the latest sane git repository to see if my Canon imageCLASS D480 FAX/printer/scanner will respond to mfnp protocol as pointed out here.

The other option is perhaps to compile my own sane package from the latest sane git repository to see if my Canon imageCLASS D480 FAX/printer/scanner will respond to mfnp protocol as pointed out here.

I’m not convinced that your scanner is using MFNP. It is generally associated with port 8610, (and port 8612 for BJNP).

https://github.com/kkaempf/sane-backends/blob/master/doc/sane-pixma.man
http://lists.alioth.debian.org/pipermail/sane-devel/2014-February/032093.html

IC. Anyway, thank you for the links.

I’d consider the idea of setting up a SANE server if you want your Linux device(s) to have access to the network-attached scanner.

Currently, I have a Seagate GoFLEX Home running on LEDE with a built-in of FreeSWITCH + FusionPBX + NFS + Samba + etc. as my server. When I get some spare time, I will rebuild LEDE to include CUPS + UFR II/UFR II LT printer/scanner driver + Xsane + etc. For the time being, I just moved my Canon imageCLASS D480 FAX/printer/scanner near to my computer so I can connect them altogether with a USB cable. This is not the solution I would want nor expect, but it temporarily gets the jobs done.