You are not logged in.

#1 2020-04-29 14:30:20

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

[Solved] Canon Pixma TS6120 Printer Issues

See this post for a solution.

Recently I was experimenting with different desktop environments (KDE, GNOME) and when I decided I would stick with my current DE, I removed the meta packages associated with those DEs. It seems like this process broke my printing/scanning capabilities. Prior to this I could successfully print (but only through libreoffice hmm) and I could scan through simple scan. I think it might be important to note that the device is of an All-In-One design.
Be advised it has been a few days since this started so I may recount some things inaccurately

Packages

I do not remember the exact commands I used to remove the meta-packages. Hopefully this log will be sufficient to discover this and identify any programs that I removed that were needed for printing.

Scanning

Prior to this incident, I could scan using Simple Scan. Now, however, I can only scan through ScanGearMP2. I tried XSane and it did not discover any scanners. (This is also the case with Simple Scan)

Printing

Previously, I printed via LibreOffice since printing from Firefox was unsuccessful. I don't know if it would've worked to print by a command since I never tried it sad. Early in this installation's lifetime, I spent days trying and trying to get printing up and running, but I failed and neglected to create a forum post then. I don't know the cause, but the problem seemed to resolve itself. (Maybe I installed some GNOME-related utility and it automagically set up the printer?) The printer panel has options for Bonjour, LPR, RAW, Pictbridge, as well as WSD, LLMNR, IPSec. However when I enable LPR, Bonjour and RAW, and I run

CUPS_DEBUG_LEVEL=2 /usr/lib/cups/backend/snmp @LOCAL 2>&1 | tee snmp.log

as outlined in http://localhost:631/help/network.html I get this output. It didn't say that AppSocket was supported in the panel.
When I run

lpinfo --include-schemes dnssd -v

there is no output, even though bonjour is enabled on the printer.
I know that the printer's has a static ip of

192.168.0.44

and when I enter that into Firefox, it reaches the printer's page with ink levels and such. On a seperate page there are options to log in as admin.  I don't know this password or username, I would have to ask or use the defaults (IDK if its been set off the defaults).
It seems like there is something wrong with my network/network configuration.

Drivers

I've searched through the normal places where I would get drivers for a Canon Pixma TS6100 Series Printer, such as OpenPrinting's database, but I didn't find any driver for it. On the Canon Website there are .deb .rpm and source .tar.xz available to download besides all the other driver installers. I downloaded the source file, extracted it and located within it many .ppd files for my printer and others. Is a .ppd all I need to print? Do I need some kind of 'filter'? Does a filter have a special file extension? I am willing to dedicate my time for a while to making an AUR package for these printers as clearly it's needed. I've not made an AUR package before, it would help if once this issue is resolved, you can help direct me to the proper guide or resources on making such a package.

Further Info

It should be noted that I followed ArchWiki articles CUPS and Avahi so far. Is Avahi problematic? I only installed it for the DNSSD capability. Would I do better with some alternative?


I would appreciate help greatly. If you can direct me to logs or command outputs that I've missed, that would also be appreciated. Thanks.

Last edited by kinru (2020-05-09 17:29:26)

Offline

#2 2020-04-29 15:02:11

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

Looks like a cnijfilter2 printer driver .
Try using https://aur.archlinux.org/packages/cnijfilter2/ or https://aur.archlinux.org/packages/cnijfilter2-bin/ as a template for a PKGBUILD for the v5.50 version .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2020-04-29 16:03:24

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

Sorry but I don't understand what you're saying... Are you saying to install the AUR package cnijfilter2, cnijfilter2-bin, or to make an AUR package of the 'v5.50 Version'? Version v.5.50 of what? If it matters, I use the pikaur aur helper.

Offline

#4 2020-04-30 13:01:33

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

The driver for your printer as listed on the canon site is cnijfilter2-source-5.50-1.tar.gz .

If you look up canon pacakges in AUR you'll see that many occur twice : one built from source and another built from a canon-provided binaries.
There have been cases were a printer only worked with one of those builds, but not with the other.

Aur currently has cnijfilter2-5.90-1 (source build) and cnijfilter2-bin 5.10-2 (binary build) .
The -bin package hasbn't been updated since 2018, while the source based package was updated last in december 2019 .

The cnijfilter 5.90 source does list ppds for the TS6100, TS6130 and TS6180 , but not the 6120 .
I downloaded the 5.50 source and it shows the same.

I suggest for now you build & install the cnijfilter2 5.90-1 aur package .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2020-04-30 14:18:47

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

I'm having a problem installing the cnijfilter2 package. The output of

pikaur -S cnijfilter2 -v --rebuild

is here. At the very end it says

error: failed to commit transaction (conflicting files)
cnijfilter2: /usr/share/cups/model/canone460.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canone480.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonib4000.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonip110.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmb2000.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmb2300.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmb5000.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmb5300.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmg2900.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmg5600.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmg6600.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmg7500.ppd exists in filesystem
cnijfilter2: /usr/share/cups/model/canonmx490.ppd exists in filesystem
Errors occurred, no packages were upgraded.

Do I have to find these .pdds and delete them or do something else?
I tried installing cnijfilter2-bin as well, and it successfully installed.
About the driver name, I think that for my printer, drivers for so called "TS6100" will work, since back when the printer was working, the print dialogue displayed the printer as "Canon TS6100 Series Printer". Therefore, I think a driver for TS6100 is sufficient, but I'm not 100% on if that will work.
P.S. - I noticed that some people on the cnijfilter2 AUR page comments might've had some trouble as well installing it.

Offline

#6 2020-05-01 11:31:12

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

That suggests you already had something installed for the driver, possibly installed through other means then pacman.

post outputs of

$ pacman -Qo /usr/share/cups/model/canone460.ppd
$ pacman -Qs cnij

Also make sure you only have one filter package installed, either -bin or source version .
Even if they don't have file conflicts, they do the same thing.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2020-05-01 14:31:32

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

Ok, the output of

 pacman -Qo /usr/share/cups/model/canone460.ppd 

is

 error: No package owns /usr/share/cups/model/canone460.ppd 

and

 pacman -Qs cnij 

returns no results.
I should note that I have the source file extracted in my ~/Downloads folder. Could it be detecting those .pdds?

Offline

#8 2020-05-01 14:50:08

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

No, but maybe you ran an installer sometime in the past.

It does seem safe to move/delete the canon related files in /usr/share/cups/model/ .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2020-05-01 16:27:20

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

Great! So I deleted those conflicting files within /usr/share/cups/model and cnjifilter2 successfully installed! I was able to add the printer through the CUPS Page and I can print a test page, from LibreOffice, and from Firefox. Strangely I can't print from Google Docs, only save to file, but I think that's a problem with Docs.
Scanning remains nonfunctional with xsane. The CLI output when xsane is run from the terminal is as follows:

[12:19:10.847031] [bjnp] udp_command: ERROR - no data received (timeout = 10000)
[12:19:10.847100] [bjnp] bjnp_init_device_structure: Cannot read mac address, skipping this scanner

Sane supposedly supports 'PIXMA TS6100 Series'. That is the name of the printer driver which is functioning currently. The scanner is also listed under the AirPrint Page. There is an AUR package for AirPrint support Sane AirScan and I am looking into it. I would prefer to use the normal SANE drivers if possible rather than relying on AirPrint. It should be possible since the scanner worked previously (and currently through the scangearmp2 utility.)
Sane Supported List
Sane Pixma Man Page

Offline

#10 2020-05-02 14:27:05

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

sane supported list wrote:

]
All resolutions supported (up to 2400DPI). WiFi not working.

The error message suggests the printer is connected over network, is that correct ?

Also check NETWORKING SUPPORT & FIREWALLING FOR NETWORKED SCANNERS on the man page, maybe something is blocking connection.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#11 2020-05-02 14:36:27

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

Yes, the printer is connected over the network. The connection is through one router. The network is IPv4 and I don't believe I have a firewall. I used the ipscan utility and I found the IP of my printer and its MAC address. I also manually configured according to the Sane PIXMA man page and detecting/adding the scanner was still not possible. I would add that scangearmp2 can't detect the scanner, but it uses a configuration from a while ago and scans.

Offline

#12 2020-05-02 15:42:01

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

output of pacman -Qi scangearmp2  ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#13 2020-05-02 16:25:23

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

So I've investigated further...
I don't remember setting them up, but nftables and firewalld are installed and configured. I guess I've been using nftables this whole time. In firewalld, under zones then public and services, I ticked the sane box. Then under ports, I added 8610 TCP and 8612 TCP. Still the scanner is not detected, however when I run xsane, there is no longer an output (the scanner is on). Obviously I'm no expert at networking, so there could be a mis-configuration somewhere or I could be using iptables by mistake. Either way, ipscan still reports the scanner's ip and MAC.

Offline

#14 2020-05-02 16:27:19

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

Here is the output of pacman -Qi scangearmp2

Name            : scangearmp2
Version         : 3.90-1
Description     : Canon ScanGear MP v2 scanner driver.
Architecture    : x86_64
URL             : https://www.canon.co.uk
Licenses        : GPL  custom:canon
Groups          : None
Provides        : scangearmp2
Depends On      : gtk2  libusb
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 532.49 KiB
Packager        : Unknown Packager
Build Date      : Sun 08 Dec 2019 10:48:38 AM EST
Install Date    : Sun 26 Apr 2020 09:35:00 PM EDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

Offline

#15 2020-05-03 10:48:30

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

Then under ports, I added 8610 TCP and 8612 TCP

ipscan still reports the scanner's ip and MAC


Found an interesting article at https://support.usa.canon.com/kb/index? … =ART109227
Your pixma TS6120 is one of the printers for which it's valid.

The table makes clear that bjnp requires TCP port 8612 AND UDP port 8612 to be open.
The FIREWALLING FOR NETWORKED SCANNERS section of the manpage indicates outgoing traffic and ingoing traffic both need to be allowed.

I suggest you (temporarily) disable/stop firewalld , nftables and iptables to verify if you can detect the scanner without any firewall settings interfering.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#16 2020-05-03 16:06:08

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

So the commands run were:

systemctl stop firewalld
systemctl stop nftables

(they succeeded)
and

systemctl stop iptables

(this one failed)

The output of

systemctl status iptabls
● iptables.service - IPv4 Packet Filtering Framework
     Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

So I think those 3 are disabled. After this xsane does detect the printer!! big_smile It has many many more options than before when it was autodetected. After that, I monitored the scanning for scanners process through wireshark. When I filter for ip.src == 192.168.0.44 I see there is quite a lot of communication via SSDP, MDNS, TCP, and HTTP/XML.
When I filter ip.src == 192.168.0.50 (my IP) I see communication by BJNP, SNMP, MDNS, UDP, TCP, HTTP. There is also TLSv1.3 but that is going to a destination IP that I didn't know was on the network.
I enabled a very long list of ports to try to get it working with firewall. Here are TCP ones I opened: 8612 5357 443 80 161 162 8611 5353 1900 5355. The UDP ones I opened were: 8612 5357 161 1662 5454 1900 5355. I'm not sure what you mean by enabling ingoing and outgoing traffic. Doesn't opening the port do this? I remember from iptables that there were 'filters' for INPUT and OUTPUT. In firewall-config the zones it has are "block, dmz, drop, external, home, internal, libvirt, public, trusted, work". Under each zone there are sections "services, ports, protocols, source ports, masquerading, port forwarding, icmp firlter, rich rules, interfaces, sources". I enabled these ports under the 'Ports' section (is it called a chain or something like that?). To clarify a little, after I turned the firewall back on xsane doesn't discover any printers.

Offline

#17 2020-05-04 03:38:24

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

This is all very wacky...
First, I just want to clarify my firewall situation. Iptables package is not installed, iptables service is disabled and stopped. nftables package is installed, nftables service is started and enabled. firewalld package is installed and firewalld service is started and enabled. networkmanager is installed and its service is enabled, started. My ethernet interface is set to use the 'home' zone where I'm setting rules. Currently opened ports are: 80 TCP, 33436 TCP, 8610 TCP, 8612 TCP, 1900 TCP, 5357 TCP, 1900 UDP, 5353 UDP, 3702 UDP, 5355 UDP, 8612 UDP, 5357 UDP.
The scanner is connected to the home network and my firewall appears to be stopping scanning. I think printing works fine.
I captured packets through the process of detecting the scanner without the firewall enabled. Here is a firefox send with the .pcapng. Its set to 100 downloads and 7 days. If there is a better way to host this file for the forums please let me know. Once the scanner was detected with xsane I could select scanning from 3 options: 191.168.0.44:80, 192.168.0.44:443, Airscan. I would prefer not to disable my firewall totally since the network's owner is not very "tech savvy" and I don't know if there is an external firewall in place.

Offline

#18 2020-05-04 11:54:25

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

In order to share logs (especially long ones) we usually advise a pastebin client .

We have established now the printing & scanning software does work, but firewall settings block part of the functionality.

nftables is very powerful and firewalld is a frontend that tries to make things easier to setup .
Unfortunately it's very easy to set a firewall too restrictive.

I found another interesting article https://wiki.debian.org/SaneOverNetwork … he_Network


For now, remove all of those open ports and open only udp 8610 & udp 8612 .

Last edited by Lone_Wolf (2020-05-04 11:54:49)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#19 2020-05-04 15:28:46

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

I am aware that the best way to share logs is by pastebin, but that was a file that could be opened by wireshark directly for convenience.
As you suggested, I closed all of those ports and opened only port 8610 UDP and 8612 UDP. I saw in the article it was recommended to run

sudo systemctl restart firewalld

for the changes to be enacted. xsane fails to discover the device.

Offline

#20 2020-05-05 11:36:33

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

Let's try another approach, keep ports as is for now.

edit /etc/sane.d/pixma.conf

add

auto_detection=no
bjnp://ip.address.of.scanner

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#21 2020-05-05 14:41:35

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

I added this to my /etc/sane.d/pixma.conf
Then I ran xsane again.
This is the output in the terminal:

[10:34:11.947104] [bjnp] udp_command: ERROR - no data received (timeout = 10000)
[10:34:11.947222] [bjnp] bjnp_init_device_structure: Cannot read mac address, skipping this scanner

Offline

#22 2020-05-05 17:03:32

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

Next try : make sure sane uses correct port

bjnp://ip.address.of.scanner:8612

If that also fails, try to verify whether outgoing udp 8612 traffic is blocked or the problem is with incoming traffic.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#23 2020-05-05 20:39:35

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

Ok, so I added :8612 as suggested. After that I used Wireshark on my computer's ethernet interface to analyze the traffic. I'm getting 3 "Destination Unreachable (Port Unreachable)" Packets, each after the BJNP packets. They originate at the scanner's ip and their destination is my computer's ip at port 8612. I guess this means my computer is blocking port 8612, even though both 8612 TCP and 8612 UDP appear open on firewall-config.

Offline

#24 2020-05-06 13:31:38

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Canon Pixma TS6120 Printer Issues

That appears to be the case, yes.

Some of your options :

- get firewalld to do what you want, maybe with help of their community  ,

- switch to a simpler nftables frontend. like ufw / gufw , https://wiki.archlinux.org/index.php/Un … d_Firewall

- ditch frontends and use nftables directly, starting with f.e. /etc/nftables.conf from nftables package.
Not easy, but you will be in control completely.

#!/usr/bin/nft -f
# ipv4/ipv6 Simple & Safe Firewall
# you can find examples in /usr/share/nftables/

table inet filter {
  chain input {
    type filter hook input priority 0;

    # allow established/related connections
    ct state {established, related} accept

    # early drop of invalid connections
    ct state invalid drop

    # allow from loopback
    iifname lo accept

    # allow icmp
    ip protocol icmp accept
    meta l4proto ipv6-icmp accept

    # allow ssh
    tcp dport ssh accept

    # everything else
    reject with icmpx type port-unreachable
  }
  chain forward {
    type filter hook forward priority 0;
    drop
  }
  chain output {
    type filter hook output priority 0;
  }

}

# vim:set ts=2 sw=2 et:

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#25 2020-05-06 16:19:30

kinru
Member
From: East Coast USA
Registered: 2019-03-23
Posts: 99

Re: [Solved] Canon Pixma TS6120 Printer Issues

If I could understand it, I would definitely go with nftables directly, but it seems so complicated that I might never reach proficiency. I looked into ufw. It seems like an iptables frontend, not an nftables one. Am I wrong about that?
There is a ton of firewall vocabulary I've never heard before in setting up an nftables firewall. In the archwiki, for example, it expects you know these terms. It seems like I need to make a lot of rules to have a secure firewall and have all my programs function correctly. I'm going to look into nftables more but it looks like a massive pain.

Offline

Board footer

Powered by FluxBB