Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response
More testing - checking permissions to the scanner: [matt@localhost sane.d]$ lsusb Bus 002 Device 005: ID 04a9:174b Canon, Inc. (plus others) [matt@localhost sane.d]$ ls -l /dev/bus/usb/002/005 crw-rw-r-- 1 root lp 189, 132 Oct 25 15:47 /dev/bus/usb/002/005 It looks like root and group "lp" have read write access to the scanner. So I added both me and the "saned" user is in the lp group. But I still can't get scanimage -L to pick up the USB connection without sudo access. Don't know if this is useful extra info or not! On Tue, Oct 25, 2016 at 3:31 PM, matt clark <lique...@gmail.com> wrote: > Hi again, after the last test I reinstalled sane without the scanbd > bits, want to see if I can get this working without it. The output > from the command above is at http://pastebin.com/1h6gDTQV > > It looks from that as though sane is picking up both the network > connection to the scanner/printer and the USB connection. Not sure if > that helps diagnose? If I run the same command without sudo access it > doesn't pick up the USB version. > > Cheers > Matt > > On Tue, Oct 25, 2016 at 3:12 PM, matt clark <lique...@gmail.com> wrote: >> Hi Rolf, thanks for replying - sorry I missed it last week. The >> response to that command (running as su) is >> >> scanimage: no SANE devices found >> >> I am guessing it's something wrong with the scanbd setup since I can >> see that it's installed using the /usr/local/etc/scanbd/sane.d config >> file. The only line that is not commented out in my >> /etc/sane.d/saned.conf file is >> >> localhost >> >> Would appreciate your thoughts. >> -- sane-devel mailing list: sane-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to sane-devel-requ...@lists.alioth.debian.org
Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response
Hi again, after the last test I reinstalled sane without the scanbd bits, want to see if I can get this working without it. The output from the command above is at http://pastebin.com/1h6gDTQV It looks from that as though sane is picking up both the network connection to the scanner/printer and the USB connection. Not sure if that helps diagnose? If I run the same command without sudo access it doesn't pick up the USB version. Cheers Matt On Tue, Oct 25, 2016 at 3:12 PM, matt clark <lique...@gmail.com> wrote: > Hi Rolf, thanks for replying - sorry I missed it last week. The > response to that command (running as su) is > > scanimage: no SANE devices found > > I am guessing it's something wrong with the scanbd setup since I can > see that it's installed using the /usr/local/etc/scanbd/sane.d config > file. The only line that is not commented out in my > /etc/sane.d/saned.conf file is > > localhost > > Would appreciate your thoughts. > > On Wed, Oct 19, 2016 at 9:13 PM, Rolf Bensch <r...@bensch-online.de> wrote: >> Hi Matt, >> >> Sorry for the late response. >> >> The command line must run without >> 'SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d'. Maybe you don't have the >> user rights to access your scanner via USB. Please try following: >> (1) push any button >> (2) sudo su -c "SANE_DEBUG_PIXMA=11 scanimage -A" >> >> Please send me the complete log response. >> >> Cheers, >> Rolf >> >> Am 13.10.2016 um 23:29 schrieb matt clark: >>> Hi Rolf, the "buttons" section in the code shows this: >>> >>> Buttons: >>> --button-update >>> Update button state >>> --button-1 [0] [read-only] >>> Button 1 >>> --button-2 [0] [read-only] >>> Button 2 >>> --original [0] [read-only] >>> Type of original to scan >>> --target [0] [read-only] >>> Target operation type >>> --scan-resolution [0] [read-only] >>> Scan resolution >>> >>> None of the binary code you mentioned. Does this mean there is no >>> sane support for the buttons? Note that I had to use the command >>> SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d SANE_DEBUG_PIXMA=11 >>> scanimage -A to make it work. I pushing both buttons, and sending it >>> via USB (yes it's connected) and the "localhost saned" option which is >>> I assume sending via network. >>> >>> On Fri, Oct 14, 2016 at 7:16 AM, Rolf Bensch <r...@bensch-online.de> wrote: >>>> Hi Matt, >>>> >>>> Have you tested that your scanner resp. the backend sends data @ a push >>>> button event? >>>> >>>> Please test on the console: >>>> (1) push any button >>>> (2) $ SANE_DEBUG_PIXMA=11 scanimage -A >>>> (3) check the response; I'm especially interested in following lines: >>>> >>>> Buttons: >>>> --button-update >>>> Update button state >>>> [pixma] INTR T=1.343 len=32 >>>> [pixma] :00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >>>> [pixma] 0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >>>> [pixma] >>>> --button-1 [1] [read-only] >>>> Button 1 >>>> --button-2 [0] [read-only] >>>> Button 2 >>>> --original [0] [read-only] >>>> Type of original to scan >>>> --target [2] [read-only] >>>> Target operation type >>>> --scan-resolution [0] [read-only] >>>> Scan resolution >>>> >>>> Please repeat (1) ... (3) for all scan buttons. >>>> >>>> Maybe you need to test your scanner USB connected to the pc. I haven't >>>> tested push buttons wireless yet. >>>> >>>> If you don't get lines starting with [pixma], your scanner has no button >>>> support from SANE. >>>> >>>> If you get lines starting with [pixma] with more data as shown above (I >>>> have a different scanner) and without data output below at the >>>> parameters --button-1 ... --scan-resolution, what I suppose, then please >>>> send me your "Buttons:" logs and I'll fix the backend code. >>>> >>>> Hope this helps. >>>> >>>> Cheers, >>>> Rolf >>>> >>>> Am 13.10.2016 um 13:23 schrieb Wilhelm: >>>>> Oh,
Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response
Hi Rolf, thanks for replying - sorry I missed it last week. The response to that command (running as su) is scanimage: no SANE devices found I am guessing it's something wrong with the scanbd setup since I can see that it's installed using the /usr/local/etc/scanbd/sane.d config file. The only line that is not commented out in my /etc/sane.d/saned.conf file is localhost Would appreciate your thoughts. On Wed, Oct 19, 2016 at 9:13 PM, Rolf Bensch <r...@bensch-online.de> wrote: > Hi Matt, > > Sorry for the late response. > > The command line must run without > 'SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d'. Maybe you don't have the > user rights to access your scanner via USB. Please try following: > (1) push any button > (2) sudo su -c "SANE_DEBUG_PIXMA=11 scanimage -A" > > Please send me the complete log response. > > Cheers, > Rolf > > Am 13.10.2016 um 23:29 schrieb matt clark: >> Hi Rolf, the "buttons" section in the code shows this: >> >> Buttons: >> --button-update >> Update button state >> --button-1 [0] [read-only] >> Button 1 >> --button-2 [0] [read-only] >> Button 2 >> --original [0] [read-only] >> Type of original to scan >> --target [0] [read-only] >> Target operation type >> --scan-resolution [0] [read-only] >> Scan resolution >> >> None of the binary code you mentioned. Does this mean there is no >> sane support for the buttons? Note that I had to use the command >> SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d SANE_DEBUG_PIXMA=11 >> scanimage -A to make it work. I pushing both buttons, and sending it >> via USB (yes it's connected) and the "localhost saned" option which is >> I assume sending via network. >> >> On Fri, Oct 14, 2016 at 7:16 AM, Rolf Bensch <r...@bensch-online.de> wrote: >>> Hi Matt, >>> >>> Have you tested that your scanner resp. the backend sends data @ a push >>> button event? >>> >>> Please test on the console: >>> (1) push any button >>> (2) $ SANE_DEBUG_PIXMA=11 scanimage -A >>> (3) check the response; I'm especially interested in following lines: >>> >>> Buttons: >>> --button-update >>> Update button state >>> [pixma] INTR T=1.343 len=32 >>> [pixma] :00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >>> [pixma] 0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >>> [pixma] >>> --button-1 [1] [read-only] >>> Button 1 >>> --button-2 [0] [read-only] >>> Button 2 >>> --original [0] [read-only] >>> Type of original to scan >>> --target [2] [read-only] >>> Target operation type >>> --scan-resolution [0] [read-only] >>> Scan resolution >>> >>> Please repeat (1) ... (3) for all scan buttons. >>> >>> Maybe you need to test your scanner USB connected to the pc. I haven't >>> tested push buttons wireless yet. >>> >>> If you don't get lines starting with [pixma], your scanner has no button >>> support from SANE. >>> >>> If you get lines starting with [pixma] with more data as shown above (I >>> have a different scanner) and without data output below at the >>> parameters --button-1 ... --scan-resolution, what I suppose, then please >>> send me your "Buttons:" logs and I'll fix the backend code. >>> >>> Hope this helps. >>> >>> Cheers, >>> Rolf >>> >>> Am 13.10.2016 um 13:23 schrieb Wilhelm: >>>> Oh, mixed the values ... >>>> >>>> action btest { >>>> filter = "^button.*" >>>> numerical-trigger { >>>> from-value = 0 >>>> to-value = 1 >>>> } >>>> desc = "Scan to file" >>>> script = "test.script" >>>> } >>>> >>>> >>>> Am 13.10.2016 um 11:16 schrieb Wilhelm: >>>>> Matt, you need something like this in your config: >>>>> >>>>> action btest { >>>>> filter = "^button.*" >>>>> numerical-trigger { >>>>> from-value = 1 >>>>>
Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response
Hi Rolf, the "buttons" section in the code shows this: Buttons: --button-update Update button state --button-1 [0] [read-only] Button 1 --button-2 [0] [read-only] Button 2 --original [0] [read-only] Type of original to scan --target [0] [read-only] Target operation type --scan-resolution [0] [read-only] Scan resolution None of the binary code you mentioned. Does this mean there is no sane support for the buttons? Note that I had to use the command SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d SANE_DEBUG_PIXMA=11 scanimage -A to make it work. I pushing both buttons, and sending it via USB (yes it's connected) and the "localhost saned" option which is I assume sending via network. On Fri, Oct 14, 2016 at 7:16 AM, Rolf Bensch <r...@bensch-online.de> wrote: > Hi Matt, > > Have you tested that your scanner resp. the backend sends data @ a push > button event? > > Please test on the console: > (1) push any button > (2) $ SANE_DEBUG_PIXMA=11 scanimage -A > (3) check the response; I'm especially interested in following lines: > > Buttons: > --button-update > Update button state > [pixma] INTR T=1.343 len=32 > [pixma] :00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [pixma] 0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [pixma] > --button-1 [1] [read-only] > Button 1 > --button-2 [0] [read-only] > Button 2 > --original [0] [read-only] > Type of original to scan > --target [2] [read-only] > Target operation type > --scan-resolution [0] [read-only] > Scan resolution > > Please repeat (1) ... (3) for all scan buttons. > > Maybe you need to test your scanner USB connected to the pc. I haven't > tested push buttons wireless yet. > > If you don't get lines starting with [pixma], your scanner has no button > support from SANE. > > If you get lines starting with [pixma] with more data as shown above (I > have a different scanner) and without data output below at the > parameters --button-1 ... --scan-resolution, what I suppose, then please > send me your "Buttons:" logs and I'll fix the backend code. > > Hope this helps. > > Cheers, > Rolf > > Am 13.10.2016 um 13:23 schrieb Wilhelm: >> Oh, mixed the values ... >> >> action btest { >> filter = "^button.*" >> numerical-trigger { >> from-value = 0 >> to-value = 1 >> } >> desc = "Scan to file" >> script = "test.script" >> } >> >> >> Am 13.10.2016 um 11:16 schrieb Wilhelm: >>> Matt, you need something like this in your config: >>> >>> action btest { >>> filter = "^button.*" >>> numerical-trigger { >>> from-value = 1 >>> to-value = 0 >>> } >>> desc = "Scan to file" >>> script = "test.script" >>> } >>> >>> -- >>> Wilhelm >>> >>> Am 13.10.2016 um 09:09 schrieb matt clark: >>>> Thanks Wilhelm. I had changed that while trying to debug the problem, >>>> not sure why this would be a problem. Have reverted to the >>>> scanbd.conf from source, with modifications to sane.d directory and >>>> comment out the unnecessary manufacturer scanner.d profiles. revised >>>> config is attached - apologies for the length of code. >>>> >>>> --- >>>> >>>> /* >>>> * $Id: scanbd.conf 213 2015-10-05 06:52:50Z wimalopaan $ >>>> * >>>> * scanbd - KMUX scanner button daemon >>>> * >>>> * Copyright (C) 2008 - 2015 Wilhelm Meier (wilhelm.me...@fh-kl.de) >>>> * >>>> * This program is free software; you can redistribute it and/or modify >>>> * it under the terms of the GNU General Public License as published by >>>> * the Free Software Foundation; either version 2 of the License, or >>>> * (at your option) any later version. >>>> * >>>> * This program is distributed in the hope that it will be useful, >>>> * but WITHOUT ANY WARRANTY; without even the implied warranty of >>>> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>>> * GNU General
Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response
Thanks Wilhelm. I had changed that while trying to debug the problem, not sure why this would be a problem. Have reverted to the scanbd.conf from source, with modifications to sane.d directory and comment out the unnecessary manufacturer scanner.d profiles. revised config is attached - apologies for the length of code. --- /* * $Id: scanbd.conf 213 2015-10-05 06:52:50Z wimalopaan $ * * scanbd - KMUX scanner button daemon * * Copyright (C) 2008 - 2015 Wilhelm Meier (wilhelm.me...@fh-kl.de) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ # global settings global { # turn on debugging # log to console debug = true # debug logging # 1=error, 2=warn, 3=info, 4-7=debug debug-level = 7 # drop priviliges to this user #= # Linux (most distributions use the saned user): # user= saned # ArchLinux (ArchLinux doesn't have saned user) # user= daemon # *BSD # user= root user= saned # Group to be used #= # Linux (most distributions use the lp group to access scanners) # group = lp # ArchLinux (ArchLinux uses the scanner group) # group = scanner # # *BSD (no group lp here, use daemon instead) # group = daemon # root # group = lp # the saned executable for manager-mode saned = "/usr/sbin/saned" saned_opt = {} # string-list saned_env = { "SANE_CONFIG_DIR=/etc/scanbd/sane.d" } # list of environment vars for saned # Scriptdir specifies where scanbd normally looks for scripts. # The scriptdir option can be defined as: # - a path relative to the configuations (/etc/scanbd) directory # - an abosolute path # Examples: # scriptdir = scripts # sets scriptdir to /etc/scanbd/scripts. # scriptdir = /some/path # sets scriptdir to the specified absolute path # Default scriptdir is /etc/scanbd, this is normally appropriate scriptdir = /etc/scanbd/scripts # Scripts to execute upon device insertion/removal. # It can be necessary to load firmware into the device when it is first # inserted. For example, scanbuttond backend does not know how to load # scanner firmware, and it can be rectified by making a custom script. # A simple command like "scanimage -L" in an example insert.script # invokes saned and it loads the appropriate firmware if necessary. # These scripts receive environmental variables named in the "environment" subsection: # SCANBD_DEVICE - device name (fixed string "dbus device" for dbus notification) # SCANBD_ACTION - "insert" or "remove", so one script can be used. # device_insert_script = "insert.script" # device_remove_script = # scanbuttond_backends_dir sets the path where scanbd looks for the scanbuttond backends # It can be defined as relative path, starting from the scanbd config directory or # as an absolute path # Default is /scanbd/scanbutond/backends # Example # scanbuttond_backends_dir = "/usr/local/lib/scanbd/scanbuttond/backends" # poll timeout in [ms] # (for polling the devices) timeout = 500 pidfile = "/var/run/scanbd.pid" # env-vars for the scripts environment { # pass the device label as below in this env-var device = "SCANBD_DEVICE" # pass the action label as below in this env-var action = "SCANBD_ACTION" } # function definitions # values of the options are simply passed via env-vars function function_knob { filter = "^message.*" desc = "The value of the function knob / wheel / selector" env= "SCANBD_FUNCTION" } function function_mode { filter = "^mode.*" desc = "Color mode" env= "SCANBD_FUNCTION_MODE" } multiple_actions = true # allow multiple actions per option (up to the total amount of options) # action definitions
Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response
Here's the original message again, removing the formatting from the original forum website version that didn't seem to work. Lots of the original content went missing. Sorry for the double post if it did work for you originally. I've also added my config file to the end of this message, so it's huge. --- I've had a Canon MG8150 attached to my network for ages and decided to hook it up to my network box (Fedora 23), basically hoping to automatically save scans to my network drive when I press the scan button on the machine. I followed various articles around the place to try and set this up but I seem to have failed. Here's a summary of where I'm up to - would love some help troubleshooting the problem: - Have installed sane-backends-devel via dnf, and scanbd 1.4.4 from source (using default configure / gmake approach, no options). - Copied the /etc/sane.d/* files to /usr/local/etc/scanbd/sane.d/ - added a symbolic link from /etc/scanbd to /usr/local/etc/scanbd just in case anything refers to that. I prefer working in usr to etc directly. - Changed /etc/sane.d/saned.conf to only allow localhost - Changed /usr/local/etc/scanbd/sane.d/saned.conf to allow all local network clients - Changed /etc/sane.d/net.conf to have 2 lines, connect_timeout = 3 and localhost - Changed /etc/sane.d/dll.conf to have only net - Changed /etc/local/etc/scanbd/sane.d/dll.conf to comment out net, and remove the unnecessary references (just kept pixma) - Saved scanbd_dbus to /etc/dbus-1/system.d/scandb_dbus.conf - Create systemd files /usr/lib/systemd/system/scanbd.service and scanbm.socket. Only change is to add the revised sane.d config directory. scanbd.service: [Unit] Description=Scanner button polling Service [Service] Type=simple ExecStart=/usr/local/sbin/scanbd -f -c /usr/local/etc/scanbd/scanbd.conf #ExecReload=? Environment=SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d StandardInput=null StandardOutput=syslog StandardError=syslog #NotifyAccess=? [Install] WantedBy=multi-user.target Also=scanbm.socket Alias=dbus-de.kmux.scanbd.server.service My scanbd.conf file is default, with some minor amendments. See the bottom of the message for full copy. When the scanner is started either manually or via the service, it appears to work ok but never picks up a button press. The log always seems to show a value of zero for the button polling response. Outputs: Test printer exists and is connected: [matt@localhost scanbd]$ lsusb Bus 002 Device 003: ID 04a9:174b Canon, Inc. Test scanimage can find printer: [matt@localhost scanbd]$ SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d scanimage -L device `pixma:MG8100_192.168.1.49' is a CANON Canon PIXMA MG8100 multi-function peripheral Scanimage can also send test greyscale.tiff to the network drive. sane-find-scanner also finds the scanner, albeit only if signed in as root. [matt@localhost scanbd]$ sudo sane-find-scanner found USB scanner (vendor=0x04a9 [Canon], product=0x174b [MG8100 series]) at libusb:002:003 I've saved the log from scanbd to pastebin because it's huge. http://pastebin.com/T6RHVsdV I dont know if there's anything interesting in all that. I couldn't find any errors. At the end of the log you can see that it just repeats a polling cycle, but the values for the buttons never change no matter how much I press them. Has anyone got any thoughts on how I could get this working? Finally, added conf files as requested by Wilhelm: [matt@localhost scanbd]$ cat /usr/local/etc/scanbd/scanbd.conf /* * $Id: scanbd.conf 213 2015-10-05 06:52:50Z wimalopaan $ * * scanbd - KMUX scanner button daemon * * Copyright (C) 2008 - 2015 Wilhelm Meier (wilhelm.me...@fh-kl.de) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ # global settings global { # turn on debugging # log to console debug = true # debug logging # 1=error, 2=warn, 3=info, 4-7=debug debug-level = 4 # drop priviliges to this user #= # Linux (most distributions use the saned user): # user= saned # ArchLinux (ArchLinux doesn't have saned user) # user= daemon # *BSD # user= root user= saned # Group to be used #= # Linux (most