• Xerox C315 MFP + Ubuntu

    From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Sun Mar 10 16:54:46 2024
    From Newsgroup: alt.os.linux

    After a decade or more of cursing my Canon PIXMA iP4000 inkjet printer
    any time I needed to print anything because the nozzles had become
    blocked since I last used it, I've now bought a rather large and very
    heavy Xerox C315 laser multi-function printer/scanner/copier/fax
    connected via ethernet. I've spent the last 3 days setting it up,
    including:

    + 2 x W7, 1 x W10 laptops can now both print & scan from it via Web
    Services for Devices (WSD).

    [Aside: I have seen it claimed that, if needed, my two XP laptops, which
    are 32-bit, could print to it by sharing it from one of the others which
    are all 64-bit, but I don't believe that because there still would be
    the 32/64 bit drivers issue - when I tried to share the Canon via XP,
    I could not print to it from W7 for the same reason as I could not
    connect it directly to the W7 PC in the first place, because I had no
    64-bit drivers for it, which was one of the two reasons why I still
    needed XP, to print, and is now removed anyway. The other was likewise
    my old HP Scanjet, which I still might need occasionally to use, as it's
    the only scanner from which I can completely remove the lid to scan
    large documents piecemeal and stitch the results together.]

    + It can now scan to a share on my QNAP NAS.

    + Likewise to an email attachment.

    + After installing the Debian driver ...

    https://www.support.xerox.com/en-gb/product/xerox-c315-multifunction-printer/content/146849

    ... I can print from Ubuntu 18, but can NOT scan from it, and this
    problem, which has consumed a large proportion of the three days since delivery, is the subject of the rest of this post ...

    Apparently this is quite a common problem with these MFP's, regardless
    of make. I have been reading posts over the last 5-10 years of others outlining similar problems with makes including HP, Samsung, etc. Here
    are some examples of what I've been trawling through:

    https://askubuntu.com/questions/1100908/xerox-workcenter-3215-scanner-isnt-recognized-on-18-04
    https://unix.stackexchange.com/questions/71849/can-a-linux-computer-receive-scanned-images-from-a-scanner-using-wsd-web-servic
    https://askubuntu.com/questions/1262946/ubuntu-20-04-network-printer-works-but-scanner-not-detected

    This is a summary of what I've tried so far:

    I wondered if the firewall was preventing communication with the MFP, at
    least as far as TCP/IP ports used for scanning were concerned, but
    disabling it with ...
    ufw disable
    ... made no difference, the MFP scanner still couldn't be found.

    I've tried installing libusb-0.1-4 as described in the first post above,
    but it made no difference. Indeed, superficially at least, why would
    it, when my MFP is connected via the ethernet, not USB as was his? But
    I thought I might as well try it anyway.

    Also from that post, the debug environment setting SANE_DLL_DEBUG=5
    doesn't seem to make any difference, for example I don't seem to get
    anything extra, let alone useful, out of the test command mentioned in
    some of the posts that I've read. The output from ...
    SANE_DLL_DEBUG=5 scanimage -L
    ... is exactly the same as from ...
    scanimage -L
    ... ie nada/zilch found.

    Both the next two posts describe editing a file in /etc/sane.d,
    epkowa.conf in the first, and xerox_mfg.conf in the second, to add lines
    of the form ...

    # Xerox (R) C315 MFP
    tcp <ip-address> [<port>]

    ... as per ...

    http://www.sane-project.org/man/sane-xerox_mfp.5.html

    ... which I have done, trying both without and with several specific
    port numbers, all with the firewall still disabled and rebooting after
    each edit, but nothing has worked.

    The MFP's IP address is fixed by the router, is displayed on the
    printer's interface, and pinging it from Ubuntu gets the expected
    response, so there is no possibility of that being wrong, which just
    leaves the question of which port(s) to try ...

    Searching this site ...
    https://www.speedguide.net/ports.php
    ... for ports mentioning Xerox gets 9 hits, of which only one, 2157,
    looked likely, but that didn't work.

    Searching the firewall rules on a W7 machine which is able to scan from
    the MFP finds ports 3702, 5357, & 5358 are involved in WSD
    communications, but none of those worked either.

    Printing out the settings from the MFP &/or loading them via its web
    interface reveals that there is the setting ...
    Settings, Network/Ports, Scan to PC Port Range: 9751:12000
    ... but 9751 did work either. Moreover, it seems to disagree with ...
    Settings, Network/Ports, TCP/IP, TCP/IP Port Access
    ... which lists the port status, open or closed, of a number of ports on
    the MFP, but the above range is not listed as being in either state.
    However, that same list also reveals that the following are open ...
    TCP 65001 WS-Discovery
    TCP 65004 WSD Scan Service
    ... but neither of those worked either.

    Apart from this one significant problem, the machine seems to be very
    good, but I'm grinding my teeth about this issue. Can anyone help?

    TIA
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Andy Burns@usenet@andyburns.uk to alt.os.linux,uk.comp.os.linux on Sun Mar 10 17:18:39 2024
    From Newsgroup: alt.os.linux

    Java Jive wrote:

    Apart from this one significant problem, the machine seems to be very
    good, but I'm grinding my teeth about this issue.  Can anyone help?

    I've got to "look at" a Xerox MFP that got upset by an updated HP
    driver, it'll be in a Widows environment, but if I find anything (esp
    port numbers) that ought to apply to linux, I'll let you know ...
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Sun Mar 10 17:35:16 2024
    From Newsgroup: alt.os.linux

    On 10/03/2024 17:18, Andy Burns wrote:
    Java Jive wrote:

    Apart from this one significant problem, the machine seems to be very
    good, but I'm grinding my teeth about this issue.  Can anyone help?

    I've got to "look at" a Xerox MFP that got upset by an updated HP
    driver, it'll be in a Widows environment, but if I find anything (esp
    port numbers) that ought to apply to linux, I'll let you know ...

    Thanks as always, Andy.
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Sun Mar 10 20:05:27 2024
    From Newsgroup: alt.os.linux

    Further information ...

    On 10/03/2024 16:54, Java Jive wrote:

    + After installing the Debian driver ...

    https://www.support.xerox.com/en-gb/product/xerox-c315-multifunction-printer/content/146849


    .... I can print from Ubuntu 18, but can NOT scan from it, and this
    problem, which has consumed a large proportion of the three days since delivery, is the subject of the rest of this post ...

    Apparently this is quite a common problem with these MFP's, regardless
    of make.  I have been reading posts over the last 5-10 years of others outlining similar problems with makes including HP, Samsung, etc.  Here
    are some examples of what I've been trawling through:

    https://askubuntu.com/questions/1100908/xerox-workcenter-3215-scanner-isnt-recognized-on-18-04

    https://unix.stackexchange.com/questions/71849/can-a-linux-computer-receive-scanned-images-from-a-scanner-using-wsd-web-servic

    https://askubuntu.com/questions/1262946/ubuntu-20-04-network-printer-works-but-scanner-not-detected


    This is a summary of what I've tried so far:

    I wondered if the firewall was preventing communication with the MFP, at least as far as TCP/IP ports used for scanning were concerned, but
    disabling it with ...
        ufw disable
    .... made no difference, the MFP scanner still couldn't be found.

    I've tried installing libusb-0.1-4 as described in the first post above,
    but it made no difference.  Indeed, superficially at least, why would
    it, when my MFP is connected via the ethernet, not USB as was his?  But
    I thought I might as well try it anyway.

    Also from that post, the debug environment setting SANE_DLL_DEBUG=5
    doesn't seem to make any difference, for example I don't seem to get anything extra, let alone useful, out of the test command mentioned in
    some of the posts that I've read.  The output from ...
        SANE_DLL_DEBUG=5 scanimage -L
    .... is exactly the same as from ...
        scanimage -L
    .... ie nada/zilch found.

    Both the next two posts describe editing a file in /etc/sane.d,
    epkowa.conf in the first, and xerox_mfg.conf in the second, to add lines
    of the form ...

        # Xerox (R) C315 MFP
        tcp <ip-address> [<port>]

    .... as per ...

        http://www.sane-project.org/man/sane-xerox_mfp.5.html

    .... which I have done, trying both without and with several specific
    port numbers, all with the firewall still disabled and rebooting after
    each edit, but nothing has worked.

    The MFP's IP address is fixed by the router, is displayed on the
    printer's interface, and pinging it from Ubuntu gets the expected
    response, so there is no possibility of that being wrong, which just
    leaves the question of which port(s) to try ...

    Searching this site ...
        https://www.speedguide.net/ports.php
    .... for ports mentioning Xerox gets 9 hits, of which only one, 2157,
    looked likely, but that didn't work.

    Searching the firewall rules on a W7 machine which is able to scan from
    the MFP finds ports 3702, 5357, & 5358 are involved in WSD
    communications, but none of those worked either.

    Printing out the settings from the MFP &/or loading them via its web interface reveals that there is the setting ...
        Settings, Network/Ports, Scan to PC Port Range:  9751:12000
    .... but 9751 did work either.  Moreover, it seems to disagree with ...
        Settings, Network/Ports, TCP/IP, TCP/IP Port Access
    .... which lists the port status, open or closed, of a number of ports
    on the MFP, but the above range is not listed as being in either state. However, that same list also reveals that the following are open ...
        TCP 65001 WS-Discovery
        TCP 65004 WSD Scan Service
    .... but neither of those worked either.

    Apart from this one significant problem, the machine seems to be very
    good, but I'm grinding my teeth about this issue.  Can anyone help?

    I thought it would be an interesting check to attach a scanner via USB, specifically my 20 year old HP Scanjet, to see if it would work, which
    it did ...

    scanimage -L responded with:
    device 'hp5400:libusb:004:002' is a Hewlett-Packard Flatbed Scanner

    Simple Scan set the scanner mechanism going apparently 'scanning' the
    source document, but the result was an image consisting entirely of noise!?

    xsane scanned a document successfully.

    This suggests that the wider sane system is apparently functional, the
    problem seems to lie specifically with the part that deals with scanning
    over the network.
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Sun Mar 10 23:09:45 2024
    From Newsgroup: alt.os.linux

    On 10/03/2024 20:05, Java Jive wrote:

    Further information ...

    I've now tried plugging the MFP directly in to a USB port on the Ubuntu
    PC ...
    lsusb
    ... shows ...
    Bus 001 Device 004: ID 0924:9806 Xerox
    ... but adding ...
    # Xerox C315 MFP
    usb 0x0924 0x9806
    ... to ...
    /etc/sane.d/xerox_mfp.conf
    ... didn't allow ...
    scanimage -L
    ... to find it.

    Further, as per this page:

    https://askubuntu.com/questions/927265/xerox-workcentre-3025-scanner-is-not-working-ubuntu-17-04/1328892

    + I've added the users to the lp group.

    - The suggested command, which looks wrong to me anyway, ...
    sudo ln -sfr /usr/lib/sane/* /usr/lib/x86_64-linux-gnu/sane
    ... cannot work because the first directory doesn't exist, although the
    second does. I tried running what I thought would make more sense ...
    sudo ln -s /usr/lib/x86_64-linux-gnu/sane /usr/lib/sane
    ... but that didn't help either.

    - This ...
    simple-scan "smfp:net;<MFP_IP_ADDRESS>"
    ... does not work, the scanner is not found.
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Mon Mar 11 01:19:22 2024
    From Newsgroup: alt.os.linux

    On 10/03/2024 20:05, Java Jive wrote:

    Further information ...

    At last I've managed to obtain some debugging information which shows
    that the MFP is actually being contacted, but is not responding in the
    manner expected. This page gives a different debugging environment
    variable, which, unlike the previous one, works:

    https://manpages.ubuntu.com/manpages/xenial/man5/sane-xerox_mfp.5.html

    "<user>@<machine>:home# SANE_DEBUG_XEROX_MFP=4 scanimage -L
    [sanei_debug] Setting debug level of xerox_mfp to 4.
    [xerox_mfp] sane_init: Xerox backend (build 13), version != null,
    authorize != null
    [xerox_mfp] sane_xerox_mfp_get_devices: 0x7fff0450b3d0, 0
    [xerox_mfp] list_one_device: tcp 192.168.1.127
    [xerox_mfp] tcp_dev_open: open tcp 192.168.1.127
    [xerox_mfp] :: dev_command(INQUIRY[0x12], 70)
    [xerox_mfp] tcp_dev_request: wait for 1024 bytes
    [xerox_mfp] tcp_dev_request: error Resource temporarily unavailable,
    bytes requested: 1024, bytes read: 0
    [xerox_mfp] dev_command: illegal response len 0, need 70
    [xerox_mfp] tcp_dev_close: closing dev 0x563011ff3d30
    [xerox_mfp] list_one_device: dev_inquiry(tcp 192.168.1.127): Error
    during device I/O

    No scanners were identified. If you were expecting something different,
    check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation
    which came with this software (README, FAQ, manpages)."

    There seems to be a discrepancy in the above as to whether the expected response should have been 70 bytes long, or 1024, but anyway it seems
    from the above that the MFP is found, is sent a message, but either does
    not reply at all, or else its reply is missed by the PC.

    I tried setting tcpdump going in another terminal window and giving the
    above command again. The result is here (WARNING: lots of hex bytes):

    www.macfh.co.uk/Temp/tcp.log

    From what I can see, the printer is responding, but the PC is failing
    to recognise the response. Particularly, if in
    /etc/sane.d/xerox_mfp.conf I add a port number known to be open in the
    MFP, 65001 (WS-Discovery), then you see that port number go out in the
    hex immediately after the IP as the following sequence ...
    C0 A8 xx xx C2 B4 FD E9
    IP .. .. .. *. .. Port
    ... (* where I presume the bytes C2 B4 are a standard separator), but
    this happens 8 times only near the start of the file, beginning at
    offset 0150 ending at 03A0, while the same IP address as above occurs 16
    times in the file, and the more meaningful communication to & from the
    printer seems to occur towards the end, beginning around offset 09D0,
    and is repeated a number of times, as if the PC queries, the MFP
    responds, the PC fails to recognise the response, and so restarts this sequence, which accordingly repeats a few times.

    Anyone able to suggest exactly what is failing and how I may be able to
    fix it?
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Paul@nospam@needed.invalid to alt.os.linux,uk.comp.os.linux on Sun Mar 10 22:44:35 2024
    From Newsgroup: alt.os.linux

    On 3/10/2024 9:19 PM, Java Jive wrote:
    On 10/03/2024 20:05, Java Jive wrote:

    Further information ...

    At last I've managed to obtain some debugging information which shows that the MFP is actually being contacted, but is not responding in the manner expected.  This page gives a different debugging environment variable, which, unlike the previous one, works:

    https://manpages.ubuntu.com/manpages/xenial/man5/sane-xerox_mfp.5.html

    "<user>@<machine>:home# SANE_DEBUG_XEROX_MFP=4 scanimage -L
    [sanei_debug] Setting debug level of xerox_mfp to 4.
    [xerox_mfp] sane_init: Xerox backend (build 13), version != null, authorize != null
    [xerox_mfp] sane_xerox_mfp_get_devices: 0x7fff0450b3d0, 0
    [xerox_mfp] list_one_device: tcp 192.168.1.127
    [xerox_mfp] tcp_dev_open: open tcp 192.168.1.127
    [xerox_mfp] :: dev_command(INQUIRY[0x12], 70)
    [xerox_mfp] tcp_dev_request: wait for 1024 bytes
    [xerox_mfp] tcp_dev_request: error Resource temporarily unavailable, bytes requested: 1024, bytes read: 0
    [xerox_mfp] dev_command: illegal response len 0, need 70
    [xerox_mfp] tcp_dev_close: closing dev 0x563011ff3d30
    [xerox_mfp] list_one_device: dev_inquiry(tcp 192.168.1.127): Error during device I/O

    No scanners were identified. If you were expecting something different,
    check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation
    which came with this software (README, FAQ, manpages)."

    There seems to be a discrepancy in the above as to whether the expected response should have been 70 bytes long, or 1024, but anyway it seems from the above that the MFP is found, is sent a message, but either does not reply at all, or else its reply is missed by the PC.

    I tried setting tcpdump going in another terminal window and giving the above command again.  The result is here (WARNING: lots of hex bytes):

        www.macfh.co.uk/Temp/tcp.log

    From what I can see, the printer is responding, but the PC is failing to recognise the response.  Particularly, if in /etc/sane.d/xerox_mfp.conf I add a port number known to be open in the MFP, 65001 (WS-Discovery), then you see that port number go out in the hex immediately after the IP as the following sequence ...
        C0 A8 xx xx C2 B4 FD E9
        IP .. .. .. *. .. Port
    ... (* where I presume the bytes C2 B4 are a standard separator), but this happens 8 times only near the start of the file, beginning at offset 0150 ending at 03A0, while the same IP address as above occurs 16 times in the file, and the more meaningful communication to & from the printer seems to occur towards the end, beginning around offset 09D0, and is repeated a number of times, as if the PC queries, the MFP responds, the PC fails to recognise the response, and so restarts this sequence, which accordingly repeats a few times.

    Anyone able to suggest exactly what is failing and how I may be able to fix it?


    First the host uses BJNP and gets no response to repeated (Canon) "Discover" packets.

    Then it tries Query Multicast (QM) to the MFP machine.

    https://networkengineering.stackexchange.com/questions/53160/what-does-the-output-of-this-tcpdump-mean

    "This scheme is called DNS-based Service Discovery (DNS-SD)"

    I can see this in Packet 43.

    Packet 43 ScannerAvailable=1

    [Picture]

    https://i.postimg.cc/m2dgsq0s/Packet43.gif

    That picture also includes an http:// reference to the device.
    Not that this means anything.

    So far, it's got as far as asking for details.

    *******

    I got this, by taking your TCPDUMP file and feeding
    it directly into Wireshark. Which was able to parse it.

    Paul
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From David W. Hodgins@dwhodgins@nomail.afraid.org to alt.os.linux,uk.comp.os.linux on Sun Mar 10 22:48:57 2024
    From Newsgroup: alt.os.linux

    On Sun, 10 Mar 2024 21:19:22 -0400, Java Jive <java@evij.com.invalid> wrote: <snip>
    <snip>
    I tried setting tcpdump going in another terminal window and giving the
    above command again. The result is here (WARNING: lots of hex bytes):
    www.macfh.co.uk/Temp/tcp.log

    From what I can see, the printer is responding, but the PC is failing
    to recognise the response. Particularly, if in
    /etc/sane.d/xerox_mfp.conf I add a port number known to be open in the
    MFP, 65001 (WS-Discovery), then you see that port number go out in the
    hex immediately after the IP as the following sequence ...
    C0 A8 xx xx C2 B4 FD E9
    IP .. .. .. *. .. Port
    ... (* where I presume the bytes C2 B4 are a standard separator), but
    this happens 8 times only near the start of the file, beginning at
    offset 0150 ending at 03A0, while the same IP address as above occurs 16 times in the file, and the more meaningful communication to & from the printer seems to occur towards the end, beginning around offset 09D0,
    and is repeated a number of times, as if the PC queries, the MFP
    responds, the PC fails to recognise the response, and so restarts this sequence, which accordingly repeats a few times.

    Anyone able to suggest exactly what is failing and how I may be able to
    fix it?

    Use "wireshark tcp.log &" to view the file in wireshark.

    I don't think it's the scanner responding to your computer.
    The scanner command discover is sent 12 times to a mix of ipv4/ipv6 addresses, with no response, followed by a variety of queries. The arp responses at the start are likely coming from the router.

    My printer/scanner is connected using usb. I've added my id to the groups lp, saned, and scanner. I'm running Mageia. I don't know what groups your distribution is using. Check with "grep -e sane -e lp -e scan /etc/group".
    Add your id to any groups that shows. Logout/in for the group changes to
    take effect, and try it again.

    Regards, Dave Hodgins
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Theo@theom+news@chiark.greenend.org.uk to alt.os.linux,uk.comp.os.linux on Mon Mar 11 11:23:28 2024
    From Newsgroup: alt.os.linux

    In uk.comp.os.linux Java Jive <java@evij.com.invalid> wrote:
    On 10/03/2024 20:05, Java Jive wrote:

    Further information ...

    ... but adding ...
    # Xerox C315 MFP
    usb 0x0924 0x9806
    ... to ...
    /etc/sane.d/xerox_mfp.conf
    ... didn't allow ...
    scanimage -L
    ... to find it.

    Were you running scanimage as root, to avoid any permissions issues?

    If it works as root, you can then fix permisisons later (either a udev
    rule or putting users into the group set by an existing udev rule)

    FWIW Sane don't list the WorkCentre 3025 as supported: http://www.sane-project.org/sane-mfgs.html#Z-XEROX

    Did you install the Xerox driver for it: https://www.support.xerox.com/en-us/product/workcentre-3025/downloads?language=en&platform=linux

    It's very old (2014) so it might not work with a current version of Sane.

    - This ...
    simple-scan "smfp:net;<MFP_IP_ADDRESS>"
    ... does not work, the scanner is not found.

    It appears 'smfp' is the Xerox closed source old driver, and xerox_mfp is
    the open source Sane one. Possibly the above instructions are for the Xerox driver.

    Theo
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Theo@theom+news@chiark.greenend.org.uk to alt.os.linux,uk.comp.os.linux on Mon Mar 11 11:29:04 2024
    From Newsgroup: alt.os.linux

    In uk.comp.os.linux Theo <theom+news@chiark.greenend.org.uk> wrote:
    FWIW Sane don't list the WorkCentre 3025 as supported: http://www.sane-project.org/sane-mfgs.html#Z-XEROX

    Did you install the Xerox driver for it: https://www.support.xerox.com/en-us/product/workcentre-3025/downloads?language=en&platform=linux

    It's very old (2014) so it might not work with a current version of Sane.

    Apologies, I misunderstood your model number. The C315 doesn't appear to
    have Linux scanner drivers - there's a .deb to download but it only seems to have printer drivers in it. So the old 3025 driver is a red herring.


    - This ...
    simple-scan "smfp:net;<MFP_IP_ADDRESS>"
    ... does not work, the scanner is not found.

    It appears 'smfp' is the Xerox closed source old driver, and xerox_mfp is
    the open source Sane one. Possibly the above instructions are for the Xerox driver.

    But this is still true - for your printer there's no smfp driver, so
    anything related to smfp doesn't apply to you.

    Theo
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Mon Mar 11 14:54:44 2024
    From Newsgroup: alt.os.linux

    On 11/03/2024 11:29, Theo wrote:
    In uk.comp.os.linux Theo <theom+news@chiark.greenend.org.uk> wrote:
    FWIW Sane don't list the WorkCentre 3025 as supported:
    http://www.sane-project.org/sane-mfgs.html#Z-XEROX

    Did you install the Xerox driver for it:
    https://www.support.xerox.com/en-us/product/workcentre-3025/downloads?language=en&platform=linux

    It's very old (2014) so it might not work with a current version of Sane.

    Apologies, I misunderstood your model number.

    Understood.

    The C315 doesn't appear to
    have Linux scanner drivers - there's a .deb to download but it only seems to have printer drivers in it.

    Which would explain why I can print but not scan.

    - This ...
    simple-scan "smfp:net;<MFP_IP_ADDRESS>"
    ... does not work, the scanner is not found.

    It appears 'smfp' is the Xerox closed source old driver, and xerox_mfp is
    the open source Sane one. Possibly the above instructions are for the Xerox >> driver.

    But this is still true - for your printer there's no smfp driver, so
    anything related to smfp doesn't apply to you.

    Ah! That would explain why simple-scan, even when it thinks it's
    scanned something successfully from the HP Scanjet, shows only an image
    full of noise!

    Thanks for your input.
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Mon Mar 11 15:28:47 2024
    From Newsgroup: alt.os.linux

    Thanks to all for the help, particularly Paul & David W. Hodgins, and apologies for not answering earlier in the day, I had some problems
    getting Wireshark installed on the problem machine, but solved them in
    the end. Answering both Paul & David here ...

    On 11/03/2024 02:44, Paul wrote:

    On 3/10/2024 9:19 PM, Java Jive wrote:

    On 10/03/2024 20:05, Java Jive wrote:

    Further information ...

    At last I've managed to obtain some debugging information which shows that the MFP is actually being contacted, but is not responding in the manner expected.  This page gives a different debugging environment variable, which, unlike the previous one, works:

    https://manpages.ubuntu.com/manpages/xenial/man5/sane-xerox_mfp.5.html

    "<user>@<machine>:home# SANE_DEBUG_XEROX_MFP=4 scanimage -L
    [sanei_debug] Setting debug level of xerox_mfp to 4.
    [xerox_mfp] sane_init: Xerox backend (build 13), version != null, authorize != null
    [xerox_mfp] sane_xerox_mfp_get_devices: 0x7fff0450b3d0, 0
    [xerox_mfp] list_one_device: tcp 192.168.1.127
    [xerox_mfp] tcp_dev_open: open tcp 192.168.1.127
    [xerox_mfp] :: dev_command(INQUIRY[0x12], 70)
    [xerox_mfp] tcp_dev_request: wait for 1024 bytes
    [xerox_mfp] tcp_dev_request: error Resource temporarily unavailable, bytes requested: 1024, bytes read: 0
    [xerox_mfp] dev_command: illegal response len 0, need 70
    [xerox_mfp] tcp_dev_close: closing dev 0x563011ff3d30
    [xerox_mfp] list_one_device: dev_inquiry(tcp 192.168.1.127): Error during device I/O

    No scanners were identified. If you were expecting something different,
    check that the scanner is plugged in, turned on and detected by the
    sane-find-scanner tool (if appropriate). Please read the documentation
    which came with this software (README, FAQ, manpages)."

    There seems to be a discrepancy in the above as to whether the expected response should have been 70 bytes long, or 1024, but anyway it seems from the above that the MFP is found, is sent a message, but either does not reply at all, or else its reply is missed by the PC.

    I tried setting tcpdump going in another terminal window and giving the above command again.  The result is here (WARNING: lots of hex bytes):

        www.macfh.co.uk/Temp/tcp.log

    I've now done a capture both without and with a port being specified,
    and it seemed to make more sense for the above link to be the one
    without rather than with, so the contents at the above link have
    changed. The original capture with port 65001 specified is now at
    www.macfh.co.uk/Temp/tcp_65001.log

    From what I can see, the printer is responding, but the PC is failing to recognise the response.  Particularly, if in /etc/sane.d/xerox_mfp.conf I add a port number known to be open in the MFP, 65001 (WS-Discovery), then you see that port number go out in the hex immediately after the IP as the following sequence ...
        C0 A8 xx xx C2 B4 FD E9
        IP .. .. .. *. .. Port
    ... (* where I presume the bytes C2 B4 are a standard separator), but this happens 8 times only near the start of the file, beginning at offset 0150 ending at 03A0, while the same IP address as above occurs 16 times in the file, and the more meaningful communication to & from the printer seems to occur towards the end, beginning around offset 09D0, and is repeated a number of times, as if the PC queries, the MFP responds, the PC fails to recognise the response, and so restarts this sequence, which accordingly repeats a few times.

    Anyone able to suggest exactly what is failing and how I may be able to fix it?

    First the host uses BJNP and gets no response to repeated (Canon) "Discover" packets.

    Then it tries Query Multicast (QM) to the MFP machine.

    https://networkengineering.stackexchange.com/questions/53160/what-does-the-output-of-this-tcpdump-mean

    "This scheme is called DNS-based Service Discovery (DNS-SD)"

    I can see this in Packet 43.

    Packet 43 ScannerAvailable=1

    [Picture]

    https://i.postimg.cc/m2dgsq0s/Packet43.gif

    That picture also includes an http:// reference to the device.
    Not that this means anything.

    So far, it's got as far as asking for details.

    *******

    I got this, by taking your TCPDUMP file and feeding
    it directly into Wireshark. Which was able to parse it.

    Thanks both for this tip, I've now installed Wireshark on the Ubuntu 18
    laptop and this W7 one.

    I see that in the version with no port specified ...

    www.macfh.co.uk/Temp/tcp.log

    ... packets 18 & 19 are a query sent out by the PC from port 57856 to
    the MFP at port 9400 & the MFP's reply, obviously with the ports
    reversed ...

    18 3.288534 192.168.1.125 192.168.1.127 TCP 74 57856 → 9400 [SYN] Seq=0
    Win=64240 Len=0 MSS=1460 SACK_PERM TSval=2041594345 TSecr=0 WS=128
    19 3.288879 192.168.1.127 192.168.1.125 TCP 74 9400 → 57856 [SYN, ACK]
    Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM TSval=1196555602 TSecr=2041594345 WS=128

    ... while in the version with port 65001 specified ...

    www.macfh.co.uk/Temp/tcp_65001.log

    ... the corresponding packets are 5 & 6 and the corresponding ports are
    49844 & 65001 ...

    5 4.828852 192.168.1.125 192.168.1.127 TCP 74 49844 → 65001 [SYN] Seq=0
    Win=64240 Len=0 MSS=1460 SACK_PERM TSval=440195005 TSecr=0 WS=128
    6 4.829208 192.168.1.127 192.168.1.125 TCP 74 65001 → 49844 [SYN, ACK]
    Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM TSval=1147221443 TSecr=440195005 WS=128

    ... Note that in both cases the corresponding reply has Len=0, while the original debugging log suggests that the PC was expecting something
    rather more substantial, either 70 or 1024:

    "<user>@<machine>:home# SANE_DEBUG_XEROX_MFP=4 scanimage -L
    [sanei_debug] Setting debug level of xerox_mfp to 4.
    [xerox_mfp] sane_init: Xerox backend (build 13), version != null,
    authorize != null
    [xerox_mfp] sane_xerox_mfp_get_devices: 0x7fff0450b3d0, 0
    [xerox_mfp] list_one_device: tcp 192.168.1.127
    [xerox_mfp] tcp_dev_open: open tcp 192.168.1.127
    [xerox_mfp] :: dev_command(INQUIRY[0x12], 70)
    [xerox_mfp] tcp_dev_request: wait for 1024 bytes
    [xerox_mfp] tcp_dev_request: error Resource temporarily unavailable,
    bytes requested: 1024, bytes read: 0
    [xerox_mfp] dev_command: illegal response len 0, need 70
    [xerox_mfp] tcp_dev_close: closing dev 0x563011ff3d30
    [xerox_mfp] list_one_device: dev_inquiry(tcp 192.168.1.127): Error
    during device I/O"

    So I think in both cases the attempted handshake is getting as far as
    the initial query being sent to the MFP, and the MFP responding, but the
    MFP's response is not as expected, but whether that is the fault of the
    MFP or the PC sane software I'm not sure. The long history of scanners showing this problem suggests that perhaps the problem is with the sane software, but there again, some of them have been made to work somehow
    or other, suggesting it's the fault of the MFP.

    Unless some super helpful reply comes in, I don't think I can do much
    more, except to push the above information under the nose of Xerox and
    suggest to them in the strongest possible terms that they might like to
    fix the problem.

    Thanks to all for the input.
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From J.O. Aho@user@example.net to alt.os.linux,uk.comp.os.linux on Mon Mar 11 16:41:45 2024
    From Newsgroup: alt.os.linux

    On 11/03/2024 15.54, Java Jive wrote:
    On 11/03/2024 11:29, Theo wrote:

    The C315 doesn't appear to
    have Linux scanner drivers - there's a .deb to download but it only
    seems to
    have printer drivers in it.

    Which would explain why I can print but not scan.

    There seems to have been some success with C235 at least based on a
    thread at the Mint forum, seems to require you to install sane-airscan

    read the full thread at: https://forums.linuxmint.com/viewtopic.php?t=364633


    Otherwise you can setup a ftp and store scanned documents to the ftp
    and from there then do what you need with the image (crop, rotate, what
    ever).
    --
    //Aho
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Theo@theom+news@chiark.greenend.org.uk to alt.os.linux,uk.comp.os.linux on Mon Mar 11 16:05:51 2024
    From Newsgroup: alt.os.linux

    In uk.comp.os.linux Java Jive <java@evij.com.invalid> wrote:
    "<user>@<machine>:home# SANE_DEBUG_XEROX_MFP=4 scanimage -L
    [sanei_debug] Setting debug level of xerox_mfp to 4.
    [xerox_mfp] sane_init: Xerox backend (build 13), version != null,
    authorize != null
    [xerox_mfp] sane_xerox_mfp_get_devices: 0x7fff0450b3d0, 0
    [xerox_mfp] list_one_device: tcp 192.168.1.127
    [xerox_mfp] tcp_dev_open: open tcp 192.168.1.127
    [xerox_mfp] :: dev_command(INQUIRY[0x12], 70)
    [xerox_mfp] tcp_dev_request: wait for 1024 bytes
    [xerox_mfp] tcp_dev_request: error Resource temporarily unavailable,
    bytes requested: 1024, bytes read: 0
    [xerox_mfp] dev_command: illegal response len 0, need 70
    [xerox_mfp] tcp_dev_close: closing dev 0x563011ff3d30
    [xerox_mfp] list_one_device: dev_inquiry(tcp 192.168.1.127): Error
    during device I/O"

    So I think in both cases the attempted handshake is getting as far as
    the initial query being sent to the MFP, and the MFP responding, but the MFP's response is not as expected, but whether that is the fault of the
    MFP or the PC sane software I'm not sure. The long history of scanners showing this problem suggests that perhaps the problem is with the sane software, but there again, some of them have been made to work somehow
    or other, suggesting it's the fault of the MFP.

    The above's use of INQUIRY[0x12] suggests that Sane is trying to speak SCSI over TCP.

    I don't know a whole lot about network scanning, but it seems there are a number of protocols which aren't SCSI-based. So not surprised it's failing
    to talk to them. This has more details:

    https://wiki.debian.org/SaneOverNetwork

    Unless some super helpful reply comes in, I don't think I can do much
    more, except to push the above information under the nose of Xerox and suggest to them in the strongest possible terms that they might like to
    fix the problem.

    If they don't support scanning on Linux then not sure it's going to help.

    Theo
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Java Jive@java@evij.com.invalid to alt.os.linux,uk.comp.os.linux on Tue Mar 12 11:42:55 2024
    From Newsgroup: alt.os.linux

    On 11/03/2024 15:41, J.O. Aho wrote:

    On 11/03/2024 15.54, Java Jive wrote:

    On 11/03/2024 11:29, Theo wrote:

    The C315 doesn't appear to
    have Linux scanner drivers - there's a .deb to download but it only
    seems to
    have printer drivers in it.

    Which would explain why I can print but not scan.

    There seems to have been some success with C235 at least  based on a
    thread at the Mint forum, seems to require you to install sane-airscan

    read the full thread at:
    https://forums.linuxmint.com/viewtopic.php?t=364633

    As that seemed promising, I thought I'd give it a try. However, I
    couldn't install the sane-airscan package on Ubuntu 18 because of a
    library conflict. So I tried in-place upgrading to 20, but the result
    was the same, so now I'm on 22, and 'it just works'! Both printing &
    scanning now working fine.

    Thanks very much for that tip.

    The only downside is the that the two upgrades made a mess of my customisations, which, along with the double upgrades, is why I've been
    slow in coming back to you, as I've had to spend some tedious time
    putting everything back to how I want it - at least I've got the user desktops back now; just the awful login screen left to do, but it'll
    have to wait for now.

    Otherwise you can  setup a ftp and store scanned documents to the ftp
    and from there then do what you need with the image (crop, rotate, what ever).

    I'd already successfully set up the ability of the MFP to scan to a
    share on my QNAP NAS as a backstop against not being able to scan from
    some of my systems, partly because a thread from 2017 suggested that alternative solution to a woman with a similar problem with a Samsung
    MFP of not being able to scan from Linux. However, now this will only
    be needed from the XP PCs, which is an unlikely eventuality in any case.

    Thanks again.
    --

    Fake news kills!

    I may be contacted via the contact address given on my website: www.macfh.co.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From J.O. Aho@user@example.net to alt.os.linux,uk.comp.os.linux on Tue Mar 12 17:26:51 2024
    From Newsgroup: alt.os.linux

    On 12/03/2024 12.42, Java Jive wrote:
    On 11/03/2024 15:41, J.O. Aho wrote:

    read the full thread at:
    https://forums.linuxmint.com/viewtopic.php?t=364633

    As that seemed promising, I thought I'd give it a try.  However, I
    couldn't install the sane-airscan package on Ubuntu 18 because of a
    library conflict.  So I tried in-place upgrading to 20, but the result
    was the same, so now I'm on 22, and 'it just works'!  Both printing & scanning now working fine.

    Thanks very much for that tip.

    Just happen to find it when I was trying to find the xerox universal configuration tool, which seems to been the way with older MFP could be
    used in Linux.


    The only downside is the that the two upgrades made a mess of my customisations, which, along with the double upgrades, is why I've been
    slow in coming back to you, as I've had to spend some tedious time
    putting everything back to how I want it  -  at least I've got the user desktops back now; just the awful login screen left to do, but it'll
    have to wait for now.

    I used to make a backup of my /etc in the old days, then I could always
    take the old config files from there is something was messed up (of
    course not every config is stored there), now I just have a snapshot to
    take the files from and also only use rolling release distros, so don't
    need those upgrades.



    Otherwise you can  setup a ftp and store scanned documents to the ftp
    and from there then do what you need with the image (crop, rotate,
    what ever).

    I'd already successfully set up the ability of the MFP to scan to a
    share on my QNAP NAS as a backstop against not being able to scan from
    some of my systems, partly because a thread from 2017 suggested that alternative solution to a woman with a similar problem with a Samsung
    MFP of not being able to scan from Linux.  However, now this will only
    be needed from the XP PCs, which is an unlikely eventuality in any case.

    I just added that as a fall back, as didn't really know all the details
    and could have been something overseen.

    Great to hear you got it to work in the end.
    --
    //Aho

    --- Synchronet 3.20a-Linux NewsLink 1.114