Skip to content
Mark Van den Borre edited this page Mar 18, 2014 · 45 revisions

How to install spreadpi onto your raspberry pi

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

Troubleshooting

The cameras don't show the ip address of my 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.

Finding out the pi's ip address via your router

http://voipfan.net/other/finddhcp.php should give you a hint.

Finding out the pi's ip address via a local linux machine

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

Connecting to your raspberry pi through ssh

  • 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!

Manually configuring spreads

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

Manually starting spreads on the pi

Now we make the spreads web interface available at the ip address of your pi:

(virtspreads)spreads@spreads:~$ spread web --mode=scanner --standalone-device
Clone this wiki locally