-
Notifications
You must be signed in to change notification settings - Fork 11
Home
- First, do realise that spreads and spreadpi are both work in progress! They have been tested and found stable, but there might still be issues. Please do report them at https://github.com/DIYBookScanner/spreadpi/issues . Thank you.
- Choose an SD card.
- Make sure it's the fastest and the most reliable you can get. If it's not class 10, don't even think about using it. Buy a well known brand of card from a reputable shop.
- In terms of size, 8Gb should be enough for both testing and production.
- Get a spreadpi image to flash onto your SD card.
wget http://buildbot.diybookscanner.eu/spreadpi_git%403f01918_8627.img.gz
- Unzip the spreadpi image.
gunzip spreadpi_git@3f01918_8627.img.gz
- Check your computer's local storage.
mount
- Insert your SD card into your sd card reader. Now check again.
mount
. - What was the difference? You should have one extra line of output saying something like:
/dev/mmcblk0 on /media/usb0 type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
In this example, the "/dev/mmcblk0" is how your computer refers to your SD card. This could be different on your machine!
- Flash your spreadpi image to your SD card.
sudo dd if=spreadpi_git@3f01918_8627.img of=/dev/mmcblk0
- Insert your spreadpi SD card into your raspberry pi.
- Plug your pi into the local network. Make sure you have your linux machine also connected by cable to the local network.
- Connect your cameras to your USB hub. Connect your USB hub to the raspberry pi.
- Connect the USB foot pedal directly to the second USB port on your raspberry pi.
We offer two alternative methods for finding out the ip address of your pi. The first depends on access to your router, the second requires root access to a linux machine on the local network.
http://voipfan.net/other/finddhcp.php should give you a hint.
- On your linux machine, install a network mapper.
sudo apt-get install nmap
- Now let's check our linux machine's ip address.
/sbin/ifconfig|grep -A1 eth0 wlan0 Link encap:Ethernet HWaddr 00:27:10:bb:e2:f1
.
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0 - Aha! Nmap can find the raspberry pi on your local network.
sudo nmap -p22 192.168.1.101/24|grep -B4 Raspberry Nmap scan report for 192.168.1.1 Host is up (0.0018s latency). PORT STATE SERVICE 22/tcp open ssh MAC Address: B8:27:EB:4C:00:00 (Raspberry Pi Foundation)
- We know the ip address of our pi. Now Let's connect to it. Both user name and password are "spreads".
ssh [email protected] spreads@spreads:~$
- We're inside the pi now!
http://diybookscanner.eu kits as of 20140318 have spreads preconfigured on the pi out of the box. If not, we have some configuration work to do. First, we have to switch into the virtualenv.
spreads@spreads:~$ source/virtspreads/bin/activate (virtspreads)spreads@spreads:$
- Now let's configure spreads.
(virtspreads)spreads@spreads:~$ spread configure
- TODO: configuration documentation to be completed
Again, we have to make sure we are in the virtualenv:
spreads@spreads:~$ source ~/virtspreads/bin/activate (virtspreads)spreads@spreads:~$
Now we make the spreads web interface available at the ip address of your pi:
(virtspreads)spreads@spreads:~$ spread web --mode=scanner --standalone-device
Normally, spreads should start on boot. But that is not the case, so we want to investigate.
First, we need to be logged in as root on the pi. (The root password is "raspberry".)
ssh root@ root@spreads:~#
The init system is responsible for starting spreads on boot. Let's check if there is a process id for spreads managed by the init system:
root@spreads:~# ls -l /var/run/spreads/spread.pid
If there is no process id, spreads is not running.
We can also go and check the spreads logs:
root@spreads:~# tail -n100 /var/log/spreads/spread.log
It's always a good idea to have a look at this. If you want someone to look at this information, make sure to keep a copy.
Spreads runs on port 5000 by default. Let's see if we can detect any network service being offered on that port.
root@spreads~# netstat -ptan|grep 5000
If this yields no output, that's a bad sign. But maybe spreads is running, just not offering any web access?
root@spreads:~# ps aux|grep spread