<div dir="ltr">One more thing to add, maybe WSD will be an easier option.<div><br></div><div>It's possible to enable WSD support for this scanner.</div><div><br></div><div>In that case, I also can scan in "Remote scanner" mode through the sane-airscan backend.</div><div>I can also start scanning to the windows machines from the scanner through WSD (when I select "Scan" -> "Computer", all windows machines in my local network appear, even ones without Canon drivers, unlike it was with MFNP-only mode).</div><div><br></div><div>However, when I do `scanimage --device-name=airscan:w0:mf4780w -A` similarly to what I attempted with MFNP mode, no new lines appear in the list of destinations.</div><div>Also `scanimage -A` doesn't show the state of buttons in this case.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 15, 2021 at 11:43 AM Alexander Lyashuk <<a href="mailto:mooskagh@gmail.com">mooskagh@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi sane-devel,<br><br>I have a Canon i-Sensys MF4780w network scanner/printer.<br><br>It has two ways to start scanning:<br>- "Remote scanner" / "pull mode", when you enable that mode on the device and then continue on the computer.<br>- "Computer" / "push mode", where you select the destination and initiate scanning from the scanner itself.<br><br>My scanner works well in "Remote scanner" mode (through the pixma backend, I've added "mfnp://<a href="http://10.162.0.7/" target="_blank">10.162.0.7</a>" to pixma.conf).<br>I'd like to be able to initiate the scans from the scanner (in "Computer"/push mode) though, so that I can set up a headless server which will upload documents to Google Drive.<br><br>So far I failed to set it up that way, and I wonder whether there is any hope.<br><br>When I select "Scan" -> "Computer" on my scanner,<br>- First I have to select the destination.<br>- Then I select the mode (Color/BnW/Custom1/Custom2).<br><br>I checked what Windows does to appear in the list of destinations, and it seems that it sends an MFNP message to the scanner every 5 seconds and so.<br><br>I tried to do the same from Linux by calling `scanimage -A` in the loop. When I did that, a selectable extra empty line indeed appeared in the list of destinations on the scanner. I checked the messages from Windows and Linux in network sniffer and it appears that Windows sends the hostname in ASCII format, while on Linux it's UTF-16, that's the likely reason why the scanner cannot display the destination name properly.<br>I wouldn't mind having an empty line as a hostname though as long as it would work.<br><br>When I select "Scan" -> "Computer" -> "empty line" -> "Custom 1" (or BnW/Custom2/Color), both --button-1 and --button-2 still show value [0] in `scanimage -A`, so I cannot find any way to know I should start scanning.<br><br>I also tried to use scanbd, but it appears not to be able to find the scanner at all:<br><br>[root]# SANE_CONFIG_DIR=/usr/local/etc/scanbd/ ./scanbd -f -d7<br>./scanbd: reading config file /usr/local/etc/scanbd/scanbd.conf<br>./scanbd: debug on: level: 7<br>./scanbd: dropping privs to uid root<br>./scanbd: dropping privs to gid scanner<br>./scanbd: drop privileges to gid: 96<br>./scanbd: Running as effective gid 96<br>./scanbd: drop privileges to uid: 0<br>./scanbd: Running as effective uid 0<br>./scanbd: dbus_init<br>./scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'<br>./scanbd: SANE_CONFIG_DIR=/usr/local/etc/scanbd/<br>./scanbd: sane version 1.0<br>./scanbd: Scanning for local-only devices<br>./scanbd: start_sane_threads<br>./scanbd: no devices, not starting any polling thread<br>./scanbd: start dbus thread<br>./scanbd: Not Primary Owner (-1)<br>./scanbd: Name Error (Connection ":1.219" is not allowed to own the service "de.kmux.scanbd.server" due to security policies in the configuration file)<br>./scanbd: udev init<br>./scanbd: get udev monitor<br>./scanbd: udev fd is non-blocking, now setting to blocking mode<br>./scanbd: start udev thread<br>./scanbd: udev thread started<br><br>Note the string "Scanning for local-only devices", does it mean it doesn't attempt to scan network devices?<br><br>Any suggestions on what to try next would be very appreciated.<br><br>Thanks!<div></div><div><br></div></div>
</blockquote></div>