geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Mounting a SD card from a wifi printer

Tue May 03, 2016 2:00 pm

Hey guys I've been working on an issue and I was wondering if you'd be able to help. I have an Epson 357 printer and it has a SD card slot. When I insert a SD card Windows auto recognizes it so I can access the files that I've scanned in. I want to be able to do this with my raspberry pi but so far I've gotten nowhere.

I've followed a bunch of steps and I can't get things to work, maybe I'm missing something?

On Windows 7 the address looks like this "Computer --> MEMORYCARD (\\EPSON357F8A) (Z:) --> EPSCAN --> 001"
and the IP address if the printer is 192.168.1.5

I've tried

Code: Select all

sudo mount -t cifs //1920168.1.5 /home/pi/test
sudo mount -t cifs //EPSON357F8A /home/pi/test
sudo mount //192.16.1.5 /home/pi/test cifs guest,uid=1000,gid=1000,iocharset=utf8
and none have worked, the closest I've gotten was

Code: Select all

sudo mount //EPSON357F8A /home/pi/test
where it asked for a password and when I just hit enter I got an error message.

Is there something I'm missing? I'm trying to mount it through command line and not auto mount it.

Please let me know if you need any more information!

Thanks!
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

DirkS
Posts: 9899
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Mounting a SD card from a wifi printer

Tue May 03, 2016 2:10 pm

Maybe:

Code: Select all

sudo mount -t cifs //192.168.1.5/MEMORYCARD /home/pi/test -o guest,sec=ntlm
(see http://ubuntuforums.org/showthread.php?t=2222464)

User avatar
scruss
Posts: 2419
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Mounting a SD card from a wifi printer

Tue May 03, 2016 2:48 pm

DirkS wrote:Maybe:

Code: Select all

sudo mount -t cifs //192.168.1.5/MEMORYCARD /home/pi/test -o guest,sec=ntlm
(see http://ubuntuforums.org/showthread.php?t=2222464)
Thanks for that, DirkS. It worked perfectly with my Epson Workforce 7520. I'd been meaning to work out this command line for a while, as I have an idea to use tesseract OCR + pdfbeads to make small, searchable PDFs of page scans automatically.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Mounting a SD card from a wifi printer

Tue May 03, 2016 2:56 pm

Awesome! that worked like a charm! I ended up doing

Code: Select all

sudo mount -t cifs //EPSON357F8A/MEMORYCARD /home/pi/test -o guest,sec=ntlm,uid=1000,gid=1000
and I was able to see it and have it's right to

Code: Select all

pi pi
Thanks so much :D

and to unmounts the drive I do

Code: Select all

sudo umount  //EPSON357F8A/MEMORYCARD
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

User avatar
scruss
Posts: 2419
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Mounting a SD card from a wifi printer

Mon May 09, 2016 7:36 pm

Another option is to add a line like

Code: Select all

//epson/MEMORYCARD      /mnt/scanner    cifs    rw,guest,sec=ntlm,noauto,user
to /etc/fstab, after creating /mnt/scanner this way:

Code: Select all

sudo mkdir -m777 /mnt/scanner
This allows the user to mount and dismount the scanner memory card without escalating privileges.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
scruss
Posts: 2419
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Mounting a SD card from a wifi printer

Wed Oct 05, 2016 4:08 pm

Sadly, these options don't seem to work any more. All I get now is mount error(13): Permission denied, with this in the log:

Code: Select all

 CIFS VFS: RFC1001 size 39 smaller than SMB for mid=6
 00000000: 27000000 424d53ff 00000074 40018800 ...'[email protected]
 00000010: 00000000 00000000 00000000 3c500000 ..............P<
 00000020: 00 00 06 00 03 ff 00 00 00 00 00 ...........
 CIFS VFS: cifs_put_smb_ses: Session Logoff failure rc=-5
 CIFS VFS: cifs_mount failed w/return code = -13
I know that something changed in the CIFS kernel module recently, but I'm not sure what.

The guest option seems to be a problem. I found that including username=guest,password=foo,iocharset=utf8,sec=ntlm,noserverino in the options allowed it to work again. No, my printer password isn't foo; you just have to use some string after the password option, as mount needs it, and CIFS ignores it if user=guest anyway.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Return to “Networking and servers”