sane-pixma(5)
π sane-pixma(5) π
SANE Scanner Access Now Easy
β¨ NAME β¨
sane-pixma β SANE backend for Canon Multi-Function Printers and CanoScan Scanners
πΈ DESCRIPTION πΈ
okay so bestie, the sane-pixma library is literally the SANE (Scanner Access Now Easy) backend that gives you access to Canon PIXMA / i-SENSYS / imageCLASS / imageRUNNER multi-function devices (all-in-one printers, you know the vibe) and the Canon CanoScan Flatbed/TPU scanners. The backend implements both the USB interface and network interface (using Canon's BJNP and MFNP protocols). The network interface supports scanners over IPv4 as well as IPv6 (MFNP over IPv6 is untested, so don't @ me).
Currently, the following models work with this backend (and they ate, no cap):
PIXMA E410, E510, E3600, E4500PIXMA G600, G2000, G2010, G2030, G2070, G2100, G3030, G3070PIXMA G3080, G3090, G4000, G4070, G4080, G4511PIXMA GX1000, GX2000, GX3000, GX4000, GX6000, GX6500, GX7000PIXMA MG2100, MG2200, MG2400, MG2500, MG2900, MG3000, MG3100PIXMA MG3200, MG3500, MG3600, MG4200, MG5100, MG5200, MG5300PIXMA MG5400, MG5500, MG5600, MG5700, MG6100, MG6200, MG6300PIXMA MG6400, MG7100, MG7500, MG7700, MG8200PIXMA MP140, MP150, MP160, MP170, MP180, MP190PIXMA MP210, MP220, MP230, MP240, MP250, MP260, MP270, MP280PIXMA MP360, MP370, MP390PIXMA MP450, MP460, MP470, MP480, MP490, MP495PIXMA MP500, MP510, MP520, MP530, MP540, MP550, MP560PIXMA MP600, MP600R, MP610, MP620, MP630, MP640PIXMA MP700, MP710, MP730, PIXMA MP750 (no grayscale)PIXMA MP800, MP800R, MP810, MP830PIXMA MP960, MP970, MP980, MP990PIXMA MX300, MX310, MX330, MX340, MX350, MX360, MX370PIXMA MX410, MX420, MX470, MX510, MX520, MX530, MX700, MX720PIXMA MX850, MX860, MX870, MX882, MX885, MX890, MX920, MX7600PIXMA TC-20M, TC-5200MPIXMA TR4500, TR4600, TR4700PIXMA TS2400, TS2600, TS3100, TS3300, TS3450, TS3451, TS3452PIXMA TS3500, TS3600, TS3700, TS5000, TS5100, TS5150, TS5350iPIXMA TS5400, TS6100, TS6200, TS7530, TS7450i ,TS8000, TS8200PIXMA TS8530, TS8630, TS8800PIXUS MP10imageCLASS MF634Cdw, MF733CdwimageCLASS MF3110, MF3240, MF4010, MF4018imageCLASS MF4120, MF4122, MF4140, MF4150imageCLASS MF4270, MF4350d, MF4370dn, MF4380dnimageCLASS MF4410, MF4430, MF4570dw, MF4660, MF4690imageCLASS MF5730, MF5770, MF6550, MPC200imageCLASS D420, D480, D530, D570i-SENSYS MF210, MF230, MF240, MF440, MF620, MF630, MF640i-SENSYS MF645C, MF730, MF731/733, MF741/743i-SENSYS MF3010, MF4320d, MF4330d, MF4500, MF4700, MF4800i-SENSYS MF6100, MF8030, MF8200C, MF8300imageRUNNER 1018/1022/1023, 1020/1024/1025, 1133CanoScan 8800F, 9000F, 9000F Mark IICanoScan LiDE 300, 400MAXIFY MB2000, MB2100, MB2300, MB2700, MB5000, MB5100, MB5400
The following models are not well tested and/or the scanner sometimes hangs and must be switched off and on. (iykyk, it's giving chaos)
PIXMA MP760, MP770, MP780, MP790
The following models may use the same Pixma protocol as those listed above, but have not yet been reported to work (or not). They are declared in the backend so that they get recognized and activated. Feedback in the sane-devel mailing list welcome. (bestie, if you have one of these, pls report back π)
PIXMA E400, E460, E470, E480, E500, E560, E600, E610PIXMA E3100, E3300, E3400, E4200PIXMA G2020, G2060, G3020, G3060, G7000, G7080PIXMA MG4100, MG6500, MG6600, MG6800, MG6900, MG8100PIXMA MP375R, MP493, MP740PIXMA MX320, MX390, MX430, MX450, MX490, MX710PIXMA G3000, G3010, G4010, G6000, G6080, G7000, GM4000, GM4080PIXMA TR7500, TR7530, TR7600, TR7800, TR8500, TR8530, TR8580TR8600PIXMA TR8630, TR9530PIXMA TS3400, TS5100, TS6000, TS6130, TS6180, TS6230, TS6280,TS6300PIXMA TS6330, TS6330, TS6380, TS6400, TS6630, TS6730, TS7330,TS7400,PIXMA TS7430, TS7600i, TS7700, TS7700A, TS7700i, TS8100, TS8130PIXMA TS8180, TS8230, TS8280, TS8300, TS8330, TS8380, TS8700,TS9000PIXMA TS9100, TS9180, TS9500, TS9580PIXUS MP5, XK50, XK60, XK70, XK80, XK90, XK100, XK110, XK120,XK130PIXUS XK500imageCLASS MF720, MF810/820, MF5630, MF5650, MF5750, MF8170cimageCLASS MPC190, D550i-SENSYS MF110, MF220, MF260, MF410, MF420, MF510, MF520, MF740,MF750i-SENSYS MF5880dn, MF5900, MF6680dn, MF8500CMAXIFY MB5300
The following models may use partly the same Pixma protocol as other devices listed above, but may still need some work. They are declared in the backend as experimental and need the environment variable PIXMA_EXPERIMENT=1 to get recognized and activated. Snoop logs are required to further investigate, please contact the sane-devel mailing list. (fr fr, they need your help)
-- none --
The backend supports (a whole vibe):
- resolutions of 75, 150, 300, 600, 1200, 2400, 4800, and 9600 DPI (some maybe buggy),
- color and grayscale mode, as well as lineart on certain models,
- a custom gamma table,
- Automatic Document Feeder, Simplex and Duplex,
- Transparency Unit, 24 or 48 bits depth. Infrared channel on certain models.
The device name for USB devices is in the form pixma:xxxxyyyy_zzzzz where x, y and z are vendor ID, product ID and serial number respectively.
Example: pixma:04A91709_123456 is a MP150.
Device names for BJNP/MFNP devices is in the form pixma:aaaa_bbbbb where aaaa is the scanners model and bbbb is the hostname or ip-adress.
Example: pixma:MF4800_192.168.1.45 is a MF4800 Series multi-function peripheral.
This backend, based on cloning original Canon drivers protocols, is in a production stage. Design has been carried out without any applicable manufacturer documentation, probably never available. However, we have tested it as well as we could, but it may not work in all situations. You will find an up-to-date status at the project homepage. (See below). Users feedback is essential to help improve features and performances. (so pls, bestie, send feedback π)
π OPTIONS π
Besides "well-known" options (e.g. resolution, mode etc.) sane-pixma backend also provides the following options, i.e. the options might change in the future.
The button status can be polled i.e. with scanimage -A.
Button scan is disabled on MAC OS X due to darwin libusb not handling timeouts in usb interrupt reads, but may work when using the network protocol.
adf-waitβ This option enables and sets the time in seconds waiting for a document inserted into the Automatic Document Feeder. The maximum allowed waiting time is 3600 sec (= 1 hour). (so basically, it waits for your doc, max one hour)button-controlledβ This option can be used by applications (likescanadf(1)andscanimage(1)) in batch mode, for example when you want to scan many photos or multiple-page documents. If it is enabled (i.e. is set to true or yes), the backend waits before every scan until the user presses the "SCAN" button (for MP150) or the color-scan button (for other models). Just put the first page in the scanner, press the button, then the next page, press the button and so on. When you finished, press the gray-scan button. (For MP150 you have to stop the frontend by pressing Ctrl-C for example.) (iconic batch mode energy)button-update(deprecated) β (write only) In the past this option was required to be set to force reading of the button status forbutton-1andbutton-2. Thesane-pixmabackend no longer requires this option to be used: if no fresh data is available, it will be now requested automatically from the scanner. This option is left for backward compatibility reasons. (so like, it's retired but still here for the OGs)button-1button-2β (read only) These options will return the value of the respective buttons. Value 0 means that the button was not pressed, 1 is returned when the button was pressed. Some scanners, with more than two buttons, send the button number as target.originalβ (read only) Returns the value of the type or size of original to be scanned if the scanner provides that data. Known values of type: 1 = document, 2 = photo, 5 = film. Known values of size: 1 = A4, 2 = Letter, 8 = 10x15, 9 = 13x18, b = auto. Not all scanners can provide this data.targetβ (read only) Returns the value of the target of the scan operation if the scanner provides that data. The values depend on the scanner type. Known values: 1 = save to disk, 2 = save to pdf, 3 = send to email, 4 = send to application or 1 = JPEG, 2 = TIFF, 3 = PDF, 4 = Compact PDF. For some scanners this value is equivalent to the number of the pressed button. Not all scanners can provide this data.scan-resolutionβ (read only) Returns the resolution of the scan operation if the scanner provides that data. Known values: 1 = 75 dpi, 2 = 150 dpi, 3 = 300 dpi, 4 = 600 dpi. Not all scanners can provide this data.document-typeβ (read only) Returns the type of the scanned document if the scanner provides that data. Known values: 1 = Document, 2 = Photo, 3 = Auto scan. Not all scanners can provide this data.adf-statusβ (read only) Returns the status of the document feeder if the scanner provides that data. Known values: 1 = ADF empty, 2 = ADF filled. Not all scanners can provide this data.adf-orientationβ (read only) Returns the scan orientation of the medium scanned from ADF if the scanner provides that data. Known values: 1 = Portrait, 2 = Landscape. Not all scanners can provide this data.
πΎ FILES πΎ
/usr/lib64/sane/libsane-pixma.aβ the static library that implements this backend, periodt./usr/lib64/sane/libsane-pixma.soβ the shared library that implements this backend (it shows up on systems that support dynamic loading)./etc/sane.d/pixma.confβ the backend config file (also peep the description ofSANE_CONFIG_DIRbelow).
The file holds an optional list of networked scanners using the BJNP or MFNP protocols (see below for the deets on networking support for scanners). Normally you only list scanners here that cannot be auto-detected because they're on a different subnet. If you do not use Linux and your OS does not allow enumeration of interfaces (i.e. it does not support the getifaddrs() function) you also may need to add your scanner here as well.
Scanners shall be listed in the configuration file as follows:
<method>://<host>[:port][/timeout=<value>]
methodindicates the protocol used.bjnpis used for inkjet multi-functionals andmfnpis used for laser multi-functionals.hostis the hostname or IP address of the scanner, e.g.bjnp://10.0.1.4for IPv4,bjnp://[2001:888:118e:18e2:21e:8fff:fe36:b64a]for a literal IPv6-address orbjnp://myscanner.mydomain.orgfor a hostname.portis optional and is normally implied by the method. Port8610is the standard port for mfnp,8612for bjnp.timeoutscanner-specific timeout value for the network protocol. The value is in ms.
Define each scanner each on a separate line.
More globally-applicable timeouts can be set using the bjnp-timeout parameter as follows:
bjnp-timeout=<value>
A timeout defined using bjnp-timeout will apply to the following scanner definitions in the file. If required, the bjnp-timeout setting can be defined multiple times, where each setting will apply only to the scanners that follow the setting. The last setting is used for auto-discovered scanners. If not explicitly set, the default 1000ms setting will apply.
Setting timeouts should only be required in exceptional cases.
If so desired, networking can be disabled as follows:
networking=noβ If the first non-commented line contains this entry all networking will be disabled. All further statements in the configuration file will be ignored.auto_detection=noβ This line will cause auto-detection to be skipped. Explicitly defined network scanners will still be probed.
π USB SUPPORT π
USB scanners will be auto-detected and require no configuration.
π NETWORKING SUPPORT π
The sane-pixma backend supports network scanners using the so called Canon BJNP and MFNP protocols.
Canon seems to be dropping support for these protocols in recent scanners. To verify if your scanner supports one of these protocols, check the content of the _scanner._tcp service entry in mDNS/DNS-SD (using for example avahi-discover(1)). If that does not list port 8610 or 8612 your scanner probably does not support the mfmp or bjnp protols.
Both IPv4 and IPv6 are supported, but IPv6 is as yet untested with MFNP. Please report your results on the mailing list.
Configuration is normally not required. The sane-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 sane-pixma configuration file (see above).
π₯ FIREWALLING FOR NETWORKED SCANNERS π₯
The sane-pixma backend communicates with port 8610 for MFNP or port 8612 for BJNP on the scanner. So you will have to allow outgoing traffic TO port 8610 or 8612 on the common subnet for scanning.
Scanner detection is slightly more complicated. The sane-pixma backend sends a broadcast on all direct connected subnets it can find (provided your OS allows for enumeration of all network interfaces). The broadcast is sent FROM port 8612 TO port 8610 or 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. This applies to both MFNP and BJNP.
So in short: open the firewall for all traffic from your computer to port 8610 (for MFNP) or 8612 (for BJNP) AND to port 8612 (for both BJNP and MFNP) 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.
π ENVIRONMENT π
SANE_DEBUG_PIXMAβ If the library was compiled with debug support enabled, this environment variable controls the debug level for this backend itself. Higher value increases the verbosity and includes the information printed at the lower levels.0print nothing (default)1print error and warning messages (recommended)2print informational messages3print debug-level messages4print verbose debug-level messages11dump USB traffic21full dump USB traffic
SANE_DEBUG_BJNPβ If the library was compiled with debug support enabled, this environment variable controls the debug level for the BJNP and MFNP network protocols for this backend. Higher value increases the verbosity and includes the information printed at the lower levels.0print nothing (default)1Print error and warning messages (recommended)2Print high level function tracing information3Print more detailed protocol tracing information4Print protocol headers5Print full protocol contents
PIXMA_EXPERIMENTβ Setting to a non-zero value will enable experimental support for further models. You should also setSANE_DEBUG_PIXMAto11.SANE_CONFIG_DIRβ This environment variable specifies the list of directories that may contain the configuration file. On *NIX systems, the directories are separated by a colon (:), under OS/2, they are separated by a semi-colon (;). If this variable is not set, the configuration file is searched in two default directories: first, the current working directory (".") and then in/etc/sane.d. If the value of the environment variable ends with the directory separator character, then the default directories are searched after the explicitly specified directories. For example, settingSANE_CONFIG_DIRto"/tmp/config:"would result in directoriestmp/config,., and/etc/sane.dbeing searched (in this order).
π SEE ALSO π
In case of trouble with a recent Pixma model, try the latest code for the sane-pixma backend, available in the Sane git repository at: https://gitlab.com/sane-project/backends.git
You can also post into the Sane-devel mailing list for support.
π AUTHORS π
Wittawat Yamwong, Nicolas Martin, Dennis Lou, Louis Lagendijk, Rolf Bensch
We would like to thank all testers and helpers. Without them we could not be able to write subdrivers for models we don't have. See also the project homepage.
and that's the tea, bestie π this whole page is from sane-pixma(5), dated 15 Aug 2020 β¨π«Ά
π¦ where this page comes from
- fedora 43: sane-backends 1.4.0-4.fc43 Β· GPL-2.0-or-later WITH SANE-exception AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND IJG AND MIT
- fedora 44: sane-backends 1.4.0-6.fc44 Β· GPL-2.0-or-later WITH SANE-exception AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND IJG AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms