What's new

Epson Scanner and RT-N16 stock firmware

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

treegor

New Around Here
Hi all. I got a problem with my Asus RT-N16 runing stock firmware v3.0.0.4.260 with enabled Optware. I'm going to share Epson Perfection 2480 scanner via LAN but stuck on initial stage, namely this one correctly recognized by sane-find-scanner but scanimage fails. The scanner should work with snapscan backend and does it OK at all my Linux BB (openSUSE).

Some Tech Info

Code:
cat /opt/etc/sane.d/dll.conf | grep -v '#'
Net
snapscan

Code:
cat /opt/etc/sane.d/snapscan.conf | grep -i -A 1 '2480\|firmware'
# Change to the fully qualified filename of your firmware file, if
# firmware upload is needed by the scanner
firmware /opt/share/sane/snapscan/Esfw41.bin

--
# Epson Perfection 2480
usb 0x04b8 0x0121

Code:
ls -l /opt/share/sane/snapscan/
-rwxrwxrwx    1 gary     root         64000 Dec 16 17:20 Esfw41.bin

Code:
sane-find-scanner 

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8 [EPSON], product=0x0121 [EPSON Scanner]) at libusb:002:006
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

Code:
scanimage -L

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).

Code:
scanimage -V
scanimage (sane-backends) 1.0.22; backend version 1.0.22

If I run 'scanimage' on openSUSE system then I receive such lines:

Code:
scanimage -L
device `snapscan:libusb:003:003' is a EPSON EPSON Scanner1 flatbed scanner

Code:
scanimage -V
scanimage (sane-backends) 1.0.22; backend version 1.0.22

When I plug scanner in router 'dmesg' takes me some weird lines:

Code:
usb 2-2.2: new full speed USB device using ohci_hcd and address 6
usb 2-2.2: not running at top speed; connect to a high speed hub
usb 2-2.2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port)
option 2-2.2:1.0: GSM modem (1-port) converter detected
usb 2-2.2: GSM modem (1-port) converter now attached to ttyUSB0
usbcore: registered new interface driver option
drivers/usb/serial/option.c: USB Driver for GSM modems: v0.7.2

It seems to me that router's kernell recognizes my device as GSM modem so any scanner device doesn't appear in /dev catalog:

Code:
ls /dev
1-1        	log        	mtd3ro     	port       	ptyp5      ptypf      	ttyS2      	ttyp7      	usb1       		zero
2-2        	lp0        	mtd4       		ppp        	ptyp6      random  	ttyS3      	ttyp8      	usb2
2-2.1      	mem        mtd4ro     	printers   	ptyp7      sda        	ttyUSB0  	ttyp9      	usbdev1.1
2-2.2      	mtd0       	mtdblock0  	ptmx       	ptyp8      sda1      	ttyp0      	ttypa      	usbdev1.2
2-2.3      	mtd0ro   	mtdblock1  	pts        	ptyp9      sda2      	ttyp1      	ttypb      	usbdev2.1
console   	mtd1      	mtdblock2  	ptyp0      	ptypa      sg0        	ttyp2      	ttypc      	usbdev2.2
full       	mtd1ro   	mtdblock3  	ptyp1      	ptypb      shm       	ttyp3      	ttypd      	usbdev2.3
gpio       	mtd2       	mtdblock4  	ptyp2      	ptypc      tty          	ttyp4      	ttype      	usbdev2.4
kmem       mtd2ro   	null       		ptyp3      	ptypd      ttyS0      	ttyp5      	ttypf      	usbdev2.5
kmsg       	mtd3      	nvram      	ptyp4      	ptype      ttyS1      	ttyp6      	urandom 	usbdev2.6

Code:
lsmod
Module                  Size  Used by    Tainted: P
option                 42128  0
usbserial              35072  1 option
nf_nat_rtsp             5520  0
nf_conntrack_rtsp       7040  1 nf_nat_rtsp
nf_nat_ftp              2816  0
nf_conntrack_ftp        7968  1 nf_nat_ftp
ip6table_filter         1888  0
ip6table_mangle         1984  0
sr_mod                 15792  0
cdrom                  41792  1 sr_mod
zaurus                  4160  0
rndis_host              5984  0
net1080                 5280  0
cdc_ether               5120  2 zaurus,rndis_host
asix                   16960  0
usbnet                 17328  5 zaurus,rndis_host,net1080,cdc_ether,asix
usblp                  16272  0
ohci_hcd               21520  0
ehci_hcd               45248  0
ufsd                  350192  0
vfat                   11840  0
fat                    56112  1 vfat
ext2                   68064  2
ext3                  136640  0
jbd                    62112  1 ext3
mbcache                 7280  2 ext2,ext3
usb_storage            45632  2
sg                     31552  0
sd_mod                 27536  3
scsi_wait_scan           960  0
scsi_mod              105472  5 sr_mod,usb_storage,sg,sd_mod,scsi_wait_scan
usbcore               147904 13 option,usbserial,zaurus,rndis_host,net1080,cdc_ether,asix,usbnet,usblp,ohci_hcd,ehci_hcd,usb_storage
nf_nat_pptp             2592  0
nf_conntrack_pptp       6000  1 nf_nat_pptp
nf_nat_proto_gre        2128  1 nf_nat_pptp
nf_conntrack_proto_gre     4128  1 nf_conntrack_pptp
nf_nat_sip              4416  0
nf_conntrack_sip        9024  1 nf_nat_sip
nf_nat_h323             7296  0
nf_conntrack_h323      49984  1 nf_nat_h323
wl                   2859600  0
igs                    18704  1 wl
emf                    22848  2 wl,igs
et                     51168  0
ctf                    17120  0

That is, at router's admin web UI my scanner detected as 3G modem http://bit.ly/112ZKkR even though I turned modem off it has no effect.

What I have lost sight of? Please point me out what direction I got to dig if it possible to get this scanner working in any way.
 
Last edited:
Did you progress any further with this?

I have the same problem with a RT-AC66U.
 
No I didn't any progress. It's odd thing that scanner isn't deteceted by SANE, against the fact that system does it. I have no idea where is the problem. I've red a tonne of threds in the web telling the story about succesfull setting scanner up in TomatoUSB. AFAIK Asuswrt based on TomatoUSB or vice versa, therefore I decided that's possible in stock firmware too.
 
Last edited:
What I've done additionally:

Code:
export SANE_DEBUG_SNAPSCAN=255
Code:
scanimage -L
[sanei_debug] Setting debug level of snapscan to 255.
[snapscan] sane_snapscan_init
[snapscan] sane_snapscan_init: Snapscan backend version 1.4.53
[snapscan] add_usb_device(libusb:002:004)
[snapscan] add_usb_device: Detected (kind of) an USB device
[snapscan] snapscani_usb_open(libusb:002:004)
[snapscan] snapscani_mutex_open: using IPC key 0xe64c0985 for device libusb:002:004
[COLOR="DarkRed"][snapscan] add_usb_device: error opening device libusb:002:004: Device busy[/COLOR]
[snapscan] sane_snapscan_get_devices (0x7fa93bf8, 0)

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).
[snapscan] sane_snapscan_exit
Now I'm looking for what would cause such error as 'Device busy'. Perhaps I got to prevent system to grab scanner as 3G modem but I have no idea how could I do it besides usb_modeswitch.
 
Last edited:
It works

I got scanner working. To get it done I ran usb_modeswitch to prevent system using scanner as USB 3G modem:
usb_modeswitch -v 04b8 -p 0121 -d
Now scanimage detects the scanner:
scanimage -L
device `snapscan:libusb:002:004' is a EPSON EPSON Scanner1 flatbed scanner
scanimage -T
scanimage: scanning image of size 2552x3507 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 7656 bytes... PASS
scanimage: reading one byte... PASS
scanimage: stepped read, 2 bytes... PASS
scanimage: stepped read, 4 bytes... PASS
scanimage: stepped read, 8 bytes... PASS
scanimage: stepped read, 16 bytes... PASS
scanimage: stepped read, 32 bytes... PASS
scanimage: stepped read, 64 bytes... PASS
scanimage: stepped read, 128 bytes... PASS
scanimage: stepped read, 256 bytes... PASS
scanimage: stepped read, 512 bytes... PASS
scanimage: stepped read, 1024 bytes... PASS
scanimage: stepped read, 2048 bytes... PASS
scanimage: stepped read, 4096 bytes... PASS
scanimage: stepped read, 8192 bytes... PASS
scanimage: stepped read, 8191 bytes... PASS
scanimage: stepped read, 4095 bytes... PASS
scanimage: stepped read, 2047 bytes... PASS
scanimage: stepped read, 1023 bytes... PASS
scanimage: stepped read, 511 bytes... PASS
scanimage: stepped read, 255 bytes... PASS
scanimage: stepped read, 127 bytes... PASS
scanimage: stepped read, 63 bytes... PASS
scanimage: stepped read, 31 bytes... PASS
scanimage: stepped read, 15 bytes... PASS
scanimage: stepped read, 7 bytes... PASS
scanimage: stepped read, 3 bytes... PASS
One drawback is that scanner works sooo slooow......
 
Last edited:
Currently I'm looking for how to do an automatic USB modeswitching at plugging time. There is no Udev and I can see only hotplug2.rules in /etc but this file's placed at read-only FS so it's impossible to add here suetable rules. Is there any workarounds?
 
Last edited:
Finally solved

After all I've solved my problem. For those who still interested I expose my way. Just do next few stets, it's uggly hack but it works.

1. Copy original hotplug2 config to convenience place at mounted flash stick
Code:
gary@RT-N16:/tmp/home/root# cp /tmp/etc/hotplug2.rules /opt/etc/
2. Remove from /etc symlink to original hotplug2 config
Code:
gary@RT-N16:/tmp/home/root# rm /etc/hotplug2.rules
3. Make in /etc new symlink to your custom hotplug2 config
Code:
gary@RT-N16:/tmp/home/root# ln -s /opt/etc/hotplug2.rules /etc/hotplug2.rules
4. Open /etc/hotplug2.conf in your favorite editor and add there next few lines
Code:
SUBSYSTEM == usb, PRODUCT == "4b8/121/0", ACTION == add {
exec /usr/sbin/usb_modeswitch -v 04b8 -p 0121 -d ;
}
5. Test if new hotplug2 rule has been made up correctly
Code:
gary@RT-N16:/tmp/home/root# /sbin/hotplug2
If all went ok you will see scanner in scanimage output
Code:
gary@RT-N16:/tmp/home/root# scanimage -L
device `snapscan:libusb:002:003' is a EPSON EPSON Scanner1 flatbed scanner
6. Reload hotplug2 to adjust new rules
Code:
killall -s USR1 hotplug2
That is, scanner now should work ok.
 
Last edited:
My WiFi'd Epson 630 just connected and worked. No diddling with my router.
Two PCs on my LAN access it for printing and scanning.

Epson has great software (unlike HP).
 
After all I've solved my problem. For those who still interested I expose my way. Just do next few stets, it's uggly hack but it works.

1. Copy original hotplug2 config to convenience place at mounted flash stick
Code:
gary@RT-N16:/tmp/home/root# cp /tmp/etc/hotplug2.rules /opt/etc/
2. Remove from /etc symlink to original hotplug2 config
Code:
gary@RT-N16:/tmp/home/root# rm /etc/hotplug2.rules
3. Make in /etc new symlink to your custom hotplug2 config
Code:
gary@RT-N16:/tmp/home/root# ln -s /opt/etc/hotplug2.rules /etc/hotplug2.rules
4. Open /etc/hotplug2.conf in your favorite editor and add there next few lines
Code:
SUBSYSTEM == usb, PRODUCT == "4b8/121/0", ACTION == add {
exec /usr/sbin/usb_modeswitch -v 04b8 -p 0121 -d ;
}
5. Test if new hotplug2 rule has been made up correctly
Code:
gary@RT-N16:/tmp/home/root# /sbin/hotplug2
If all went ok you will see scanner in scanimage output
Code:
gary@RT-N16:/tmp/home/root# scanimage -L
device `snapscan:libusb:002:003' is a EPSON EPSON Scanner1 flatbed scanner
6. Reload hotplug2 to adjust new rules
Code:
killall -s USR1 hotplug2
That is, scanner now should work ok.

I would rather try
Code:
modprobe -r option
line in init-start script. It solves my similar issue with ftdi rs232 device detected as GSM modem.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top