raspberry_pi
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | raspberry_pi [2023/01/17 08:50] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Netzwerkscanner am Raspberry Pi: ====== | ||
+ | |||
+ | https:// | ||
+ | http:// | ||
+ | |||
+ | FAQ Register Login | ||
+ | Scanning Server for Epson L350 Series Printer/ | ||
+ | |||
+ | Post a reply | ||
+ | 7 posts | ||
+ | by Alexey » Sat May 02, 2015 10:11 am | ||
+ | The L351 Epson All-in-one printer/ | ||
+ | |||
+ | Lets get SANE (the scanner operator for linux) and an internet superdaemon: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo apt-get install xinetd sane-utils | ||
+ | |||
+ | |||
+ | |||
+ | Now we configure SANE to run automatically: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo nano / | ||
+ | |||
+ | |||
+ | |||
+ | Edit it to look like this: | ||
+ | |||
+ | Code: Select all | ||
+ | # Defaults for the saned initscript, from sane-utils | ||
+ | |||
+ | # Set to yes to start saned | ||
+ | RUN=yes | ||
+ | |||
+ | # Set to the user saned should run as | ||
+ | RUN_AS_USER=saned | ||
+ | |||
+ | |||
+ | Start saned: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo / | ||
+ | |||
+ | |||
+ | |||
+ | Let's see if our scanner is listed: | ||
+ | |||
+ | Code: Select all | ||
+ | $ lsusb | ||
+ | Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. | ||
+ | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. | ||
+ | Bus 001 Device 006: ID 04b8:08a1 Seiko Epson Corp. | ||
+ | Bus 001 Device 005: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] | ||
+ | |||
+ | |||
+ | In my case, it's listed as "Bus 001 Device 006: ID 04b8:08a1 Seiko Epson Corp." | ||
+ | |||
+ | Code: Select all | ||
+ | $ scanimage -L | ||
+ | |||
+ | |||
+ | |||
+ | If your output was: | ||
+ | |||
+ | Code: Select all | ||
+ | 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). | ||
+ | |||
+ | |||
+ | |||
+ | Then you have the same problem as I had, so keep following the guide. If your output is different, and you actually see a device ID and scanner name after that, then your scanner is already configured (perhaps by the time you read this SANE will include the Epson drivers and will detect automaticaly) | ||
+ | |||
+ | Let's first prepare our network sharing of the scanner for our Windows client: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo cat / | ||
+ | sane-port | ||
+ | |||
+ | |||
+ | |||
+ | You should see the sane-port line. If you don't - add it. | ||
+ | |||
+ | Code: Select all | ||
+ | $ cd / | ||
+ | $ sudo touch sane-daemon | ||
+ | $ which saned | ||
+ | / | ||
+ | $ sudo nane sane-daemon | ||
+ | |||
+ | |||
+ | |||
+ | This will set up the XInet configuration. Please use the following configuration for the / | ||
+ | |||
+ | Code: Select all | ||
+ | service sane-port | ||
+ | { | ||
+ | socket_type = stream | ||
+ | server = / | ||
+ | protocol = tcp | ||
+ | user = saned | ||
+ | group = saned | ||
+ | wait = no | ||
+ | disable = no | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | Note that we used the output from “which saned” in the configuration above. If it is different for you – e.g. on Archlinux – adjust accordingly. | ||
+ | |||
+ | Set up saned to accept connections from your network by editing / | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo nano / | ||
+ | |||
+ | |||
+ | |||
+ | To look like this: | ||
+ | |||
+ | Code: Select all | ||
+ | # saned.conf | ||
+ | # Configuration for the saned daemon | ||
+ | |||
+ | ## Daemon options | ||
+ | # [...] | ||
+ | # data_portrange = 10000 - 10100 | ||
+ | |||
+ | |||
+ | ## Access list | ||
+ | # [...] | ||
+ | # The hostname matching is not case-sensitive. | ||
+ | |||
+ | # | ||
+ | 192.168.1.0/ | ||
+ | |||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # [...] | ||
+ | |||
+ | |||
+ | |||
+ | Please adjust the subnet specification 192.168.1.0/ | ||
+ | Now you can reboot the Raspberry Pi (sudo reboot). | ||
+ | |||
+ | Installing the Epson scanner drivers: | ||
+ | |||
+ | The first thing we need to do is to compile the Epson iscan drivers. They are available for download from the Epson driver portal (http:// | ||
+ | |||
+ | You need the iscan and iscan-data .tar.gz files. The packages available there are for other architectures, | ||
+ | |||
+ | Code: Select all | ||
+ | $ cd ~ | ||
+ | $ wget http:// | ||
+ | $ wget http:// | ||
+ | |||
+ | |||
+ | |||
+ | Note: the wget link may be different for you if the version of the driver ever changes. Refer to the epson driver portal | ||
+ | |||
+ | Before we get to compiling, let's install all the dependencies: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo apt-get install xsltproc libgtk2.0-dev libxml2-dev libsane-dev libltdl-devmake | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Great, now let's get to compiling, we compile the iscan-data first: | ||
+ | |||
+ | Code: Select all | ||
+ | $ cd iscan-data-1.36.0 | ||
+ | $ sudo ./configure | ||
+ | $ sudo make | ||
+ | $ sudo make install | ||
+ | |||
+ | |||
+ | |||
+ | Hopefully, no errors come up. Keep an eye out, there may be some dependencies missing, in which case you should manually install them. Now, we do the same thing with iscan: | ||
+ | |||
+ | Code: Select all | ||
+ | $ cd .. | ||
+ | $ cd iscan-2.30.1 | ||
+ | $ sudo ./configure | ||
+ | $ sudo make | ||
+ | $ sudo make install | ||
+ | |||
+ | |||
+ | |||
+ | We'll make a dir for sane's drivers and transfer some driver files there just for good measure (WARNING: I'M USING RASPBERRY PI MODEL B, THE /lib/arm* FOLDER NAME MAY BE DIFFERENT FOR YOU DEPENDING ON YOUR PI, TO MAKE SURE JUST DO ls /lib/ | grep arm AND YOU WILL SEE THE PROPER FOLDER NAME) | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo mkdir / | ||
+ | $ sudo cp / | ||
+ | $ sudo cp / | ||
+ | |||
+ | |||
+ | |||
+ | Now let's make sure SANE only loads the Epson drivers so as to not overload the system more than we need to: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo nano / | ||
+ | |||
+ | |||
+ | |||
+ | Starting from " | ||
+ | |||
+ | Now we must add the device ID to the SANE epson2 config: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo nano / | ||
+ | |||
+ | |||
+ | |||
+ | After the " | ||
+ | |||
+ | Code: Select all | ||
+ | usb 0x4b8 0x8a1 | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Where the " | ||
+ | |||
+ | Accounting for the permission problems due to the printer/ | ||
+ | |||
+ | First, we add user saned to the lp group: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo adduser saned lp | ||
+ | |||
+ | |||
+ | |||
+ | Lastly, we create a custom rule for udev to grant special permissions: | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo nano / | ||
+ | |||
+ | |||
+ | |||
+ | Add the following line: | ||
+ | |||
+ | Code: Select all | ||
+ | ATTR{idVendor}==" | ||
+ | |||
+ | |||
+ | |||
+ | NOTE: the idVendor and idProduct attribute values may be different for you. Once again, refer to the device ID we get from the lsusb command. Pay attention, the format here is different from the epson2.conf file. | ||
+ | |||
+ | That's it! Reboot the pi! | ||
+ | |||
+ | Code: Select all | ||
+ | $ sudo reboot | ||
+ | |||
+ | |||
+ | |||
+ | Let's see if it works, running the scanimage -L command you should have the following or similar output: | ||
+ | |||
+ | Code: Select all | ||
+ | $ scanimage -L | ||
+ | device `epson2: | ||
raspberry_pi.txt · Last modified: 2023/01/17 08:50 by 127.0.0.1