Solved Permissions problem for Epson Scanner

I have an Epson CX7400. I have installed xsane and its dependencies. As root, I can scan; the scanner is supported. I have been following https://www.freebsd.org/doc/handbook/scanners.html where the following is shown:

Code:
# scanimage -L
device 'epson2:libusb:/dev/usb:/dev/ugen0.2' is a Epson GT-8200 flatbed scanner

But I get:

Code:
device `epson2:libusb:001:002' is a Epson CX7400 flatbed scanner

Therefore, I'm not not sure how to modify /etc/devfs.rules. Any help would be appreciated.
 
This problem is fixed now:
Code:
dmesg > file
grep -i epson file

Output:
Code:
ugen1.2: <EPSON> at usbus1
da0: <EPSON Stylus Storage 1.00> Removable Direct Access SCSI-2 device

Added to /etc/devfs.rules:
Code:
add path ugen1.2 mode 0660 group usb
add path usb/1.2.0 mode 0666 group usb
 
Can someone amplify the above answer by anund please.
I cannot get it to work, and worse still don't understand the logic (out of my depth I fear).
Thanks,
 
Can someone amplify the above answer by anund please.
I cannot get it to work, and worse still don't understand the logic (out of my depth I fear).
Thanks,
  1. dmesg > file # run the dmesg(8), output shows if scanner was detected, and on what device node. That output is redirected to a file that can be read later by other utilities - it's just ASCII text, after all.
  2. grep -i epson file # Look for any lines that say "epson" in that file. Those lines contain other useful info.
The rest is pretty self-explanatory... I recommend reading the Handbook if you're still lost: https://docs.freebsd.org/en/books/handbook/multimedia/#scanners

BTW, if you don't understand the logic, that's OK, just following the steps correctly, and in correct order should get the scanner working. :) I always emphasize the importance of not skipping steps.
 
Not a good solution to be honest. It assumes the printer/scanner will always be usb/1.2.0, which doesn't necessarily have to be the case. The solution in the handbook is much better (using devd(8) instead of devfs(8)).
 
An example of a configuration file for devd that will work if you change the usb port

/usr/local/etc/devd/scanner.conf:
Code:
# scanner epson

notify 100 {
    match "system"        "USB";
    match "subsystem"    "INTERFACE";
    match "type"        "ATTACH";
    match "vendor"        "0x04b8";
    match "product"        "0x011b";
    action "chown cups:saned /dev/$cdev; chmod 660 /dev/$cdev";
};

Adds the user to the saned and cups group.
Change the values of vendor and product using usbconfig:

Code:
# usbconfig -dX.X -v|grep -E "idVendor|idProduct"

And restart devd:
# service devd restart
 
An example of a configuration file for devd that will work if you change the usb port

/usr/local/etc/devd/scanner.conf:
Code:
# scanner epson

notify 100 {
    match "system"        "USB";
    match "subsystem"    "INTERFACE";
    match "type"        "ATTACH";
    match "vendor"        "0x04b8";
    match "product"        "0x011b";
    action "chown cups:saned /dev/$cdev; chmod 660 /dev/$cdev";
};

Adds the user to the saned and cups group.
Change the values of vendor and product using usbconfig:

Code:
# usbconfig -dX.X -v|grep -E "idVendor|idProduct"

And restart devd:
# service devd restart
Thanks, I'm going to give this a try next week when I have some time. Most appreciated - adds understanding.
 
Back
Top