[sane-devel] Testing for Canon PIXMA MG5420

Rolf Bensch rolf at bensch-online.de
Thu Apr 6 09:18:54 UTC 2017


Hi James,

I'll fix the 1200/2400 dpi issue at the same time when we'll fixed
button controlled scanning.

Your scanner has 2 buttons for button controlled scanning. I need the
response data from each button.

On the scan menu of your scanner you can select the Doc.type. I also
need the response data from each Doc.type's options.

Please select the Doc.type option, push one of the 2 buttons and then
request the scan command with "$ SANE_DEBUG_PIXMA=11 scanimage -A".

I only need the info of the selected option, the pushed button and the
lines starting with "[pixma]". To indentify the buttons I need a scan
with the same options for each button. After this you can test the
Doc.type options with any button you like.

Please consider that for your scanner button controlled scanning isn't
implementey yet. I need all requested info to fix the code.

Many thanks for your help.

Cheers,
Rolf

Am 05.04.2017 um 01:49 schrieb James Duvall:
> Rolf,
> 
> I checked the buttons on my Pixma MG5420.  The data you requested is
> pasted at the end of this email (connected via usb only, wifi
> disabled).  I did get output similar to what you posted, but I still
> can't figure out how to initiate scanning by pushing the buttons on the
> scanner.  At the T=14.283 log entry, it looks like it maybe captures the
> button press, but nothing happened.
> 
> Also, I re-checked all scanning resolutions and the 1200 and 2400 dpi
> resolutions do not work.  The scanner will accept these modes and
> produce a file (png in my test), but it appears to be multiple scans
> layered on top of each other.  This is not terribly surprising to me
> since the windows driver only allows me to scan up to 600 dpi.  The
> 75/150/300/600 dpi modes all work great.
> 
> Cheers,
> james
> 
> ##command
> james at Al-Khwarizmi:~# SANE_DEBUG_PIXMA=11 scanimage -A
> 
> ##log of output
> [sanei_debug] Setting debug level of pixma to 11.
> [pixma] pixma is compiled with pthread support.
> [pixma] pixma version 0.17.32
> [pixma] pixma_collect_devices() found Canon PIXMA MG5400 Series at
> libusb:003:003
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] bjnp_init_device_structure: Cannot read mac address, skipping
> this scanner
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] add_scanner: ERROR - Cannot read scanner make & model:
> bjnp://192.168.0.3
> [pixma] pixma_find_scanners() found 1 devices
> [pixma] pixma_collect_devices() found Canon PIXMA MG5400 Series at
> libusb:003:003
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] bjnp_init_device_structure: Cannot read mac address, skipping
> this scanner
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] add_scanner: ERROR - Cannot read scanner make & model:
> bjnp://192.168.0.3
> [pixma] pixma_open(): Canon PIXMA MG5400 Series
> [pixma] *mp150_open***** This is a generation 4 scanner.  *****
> 
> All options specific to device `pixma:04A91764_408543':
>   Scan mode:
>     --resolution auto||75|150|300|600|1200|2400dpi [75]
>         Sets the resolution of the scanned image.
>     --mode auto|Color|Gray|Lineart [Color]
>         Selects the scan mode (e.g., lineart, monochrome, or color).
>     --source Flatbed [Flatbed]
>         Selects the scan source (such as a document-feeder). Set source
> before
>         mode and resolution. Resets mode and resolution to auto values.
>     --button-controlled[=(yes|no)] [no]
>         When enabled, scan process will not start immediately. To proceed,
>         press "SCAN" button (for MP150) or "COLOR" button (for other
> models).
>         To cancel, press "GRAY" button.
>   Gamma:
>     --custom-gamma[=(auto|yes|no)] [yes]
>         Determines whether a builtin or a custom gamma-table should be used.
>     --gamma-table auto|0..255,...
>         Gamma-correction table.  In color mode this option equally
> affects the
>         red, green, and blue channels simultaneously (i.e., it is an
> intensity
>         gamma table).
>     --gamma auto|0.299988..5 [2.2]
>         Changes intensity of midtones
>   Geometry:
>     -l auto|0..216.069mm [0]
>         Top-left x position of scan area.
>     -t auto|0..297.011mm [0]
>         Top-left y position of scan area.
>     -x auto|0..216.069mm [216.069]
>         Width of scan-area.
>     -y auto|0..297.011mm [297.011]
>         Height of scan-area.
>   Buttons:
>     --button-update
>         Update button state
> [pixma] INTR T=5.240 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> [pixma] INTR T=5.496 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
>     --button-1 <int> [0] [read-only]
>         Button 1
>     --button-2 <int> [0] [read-only]
>         Button 2
>     --original <int> [0] [read-only]
>         Type of original to scan
>     --target <int> [0] [read-only]
>         Target operation type
>     --scan-resolution <int> [0] [read-only]
>         Scan resolution
>   Extras:
>     --threshold auto|0..100% (in steps of 1) [inactive]
>         Select minimum-brightness to get a white point
>     --threshold-curve auto|0..127 (in steps of 1) [inactive]
>         Dynamic threshold curve, from light to dark, normally 50-65
> 
> [pixma] pixma_close(): Canon PIXMA MG5400 Series
> 
> ##command
> james at Al-Khwarizmi:~# SANE_DEBUG_PIXMA=11 scanimage
> --button-controlled=yes >> testimage
> 
> ##log of output
> [sanei_debug] Setting debug level of pixma to 11.
> [pixma] pixma is compiled with pthread support.
> [pixma] pixma version 0.17.32
> [pixma] pixma_collect_devices() found Canon PIXMA MG5400 Series at
> libusb:003:003
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] bjnp_init_device_structure: Cannot read mac address, skipping
> this scanner
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] add_scanner: ERROR - Cannot read scanner make & model:
> bjnp://192.168.0.3
> [pixma] pixma_find_scanners() found 1 devices
> [pixma] pixma_collect_devices() found Canon PIXMA MG5400 Series at
> libusb:003:003
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] bjnp_init_device_structure: Cannot read mac address, skipping
> this scanner
> [bjnp] setup_udp_socket: ERROR - connect failed- Network is unreachable
> [bjnp] udp_command: ERROR - Can not setup socket
> [bjnp] add_scanner: ERROR - Cannot read scanner make & model:
> bjnp://192.168.0.3
> [pixma] pixma_open(): Canon PIXMA MG5400 Series
> [pixma] *mp150_open***** This is a generation 4 scanner.  *****
> [pixma] [pixma] Reader task started
> Reader task id=139816746080000 (threaded)
> [pixma] ==== Button-controlled scan mode is enabled.
> [pixma] ==== To proceed, press 'SCAN' or 'COLOR' button. To cancel,
> press 'GRAY' or 'END' button.
> [pixma] INTR T=5.707 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> [pixma] INTR T=5.963 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> [pixma] INTR T=6.731 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> [pixma] INTR T=14.283 len=32
> [pixma]  00000000:00 00 00 00 01 01 03 01  01 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] INTR T=17.739 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> [pixma] INTR T=28.746 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> [pixma] INTR T=39.754 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> [pixma] INTR T=50.761 len=32
> [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] WARNING:send_time() disabled!
> 
> 
> 
> On Tuesday, April 4, 2017 2:41 AM, Rolf Bensch <rolf at bensch-online.de>
> wrote:
> 
> 
> Hi James,
> Many thanks for your report.
> Your scanner has already been listed as supported in the listing for the
> SANE Development (git) Version
> (http://www.sane-project.org/lists/sane-backends-cvs.html#S-PIXMA).
> You can check if the backend (pixma) implementation supports button
> controlled scanning with your scanner:
> (1) Connect your scanner via USB, disconnect WiFi
> (2) Push any button, which should trigger a scan
> (3) Request the pushed button on a console with:
> $ SANE_DEBUG_PIXMA=11 scanimage -A
> The response should contain data similar like this:
>   Buttons:
>     --button-update
>         Update button state
> [pixma] INTR T=1.270 len=32
> [pixma]  00000000:00 30 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
>     --button-1 <int> [1] [read-only]
>         Button 1
>     --button-2 <int> [0] [read-only]
>         Button 2
>     --original <int> [0] [read-only]
>         Type of original to scan
>     --target <int> [3] [read-only]
>         Target operation type
>     --scan-resolution <int> [0] [read-only]
>         Scan resolution
> If the response doesn't contain lines starting with [pixma], your
> scanner doesn't support button controlled scanning.
> If you can see lines starting with [pixma], please report this data for
> all available buttons.
> Hope this helps.
> Cheers,
> Rolf
> 
> Am 30.03.2017 um 00:06 schrieb James Duvall:
>> I have a Canon PIXMA MG5420 printer/scanner that seems to mostly work
>> with sane-pixma backend.  Support for the MG5400 series is still
>> listed as unconfirmed in the documentation.  I would be happy to test
>> my device and report any results.
>>
>> I am running Ubuntu 16.10 (yakkety) amd64
>> In the Ubuntu package release (sane-utils
>> 1.0.25+git20150528-1ubuntu2), the systemd configuration for saned is
>> broken, but it works fine with the updated build from
>> ppa:rolfbensch/sane-git.  I am using the following:
>> sane 1.0.14-11 amd64
>> libsane 1.0.26-git20160712
>> sane-utils 1.0.26-git20160712
>>
>> I primarily use the scanner over a wifi network, and most features
>> seem to work
>> Here is what works:
>> scanning from Simple Scan 3.22.0.1
>> scanning from XSane 0.999
>> All resolutions (75, 150, 300, 600, 1200, 2400 dpi)
>>
>> Here is what doesn't work:
>> button controlled scanning
>> initiating scanning from the scanner control panel
>>
>> For the items that don't work, it is entirely possible that I just
>> don't understand how to configure these features correctly.  With my
>> win7 box with the proprietary Canon IJ network tool installed, I am
>> able to select my computer as a destination for the scanned file, then
>> initiate the scan by hitting either the "Start Color" or "Start B&W"
>> buttons on the pixma front panel.  I am normally unable to see my
>> Ubuntu box on this destination list.  However, if I enter
>> scanimage -d pixma:MG5400_192.168.0.3 --button-controlled=yes > tempimage
>> My Ubuntu box will temporarily appear in the destination list. 
>> However, I am still unable to initiate the scan.
>>
>> I don't know anything about the BJNP protocol except what I read in
>> the sane-pixma documentation, but I am happy to learn and help you test.
>>
>> Regards,
>> James
> 
> 
> 



More information about the sane-devel mailing list