FPiV Easy Setup.

Extract

Having ran through the installation procedure a number of times, I decided to write a script to automate it as much as possible.  The result was a script that covered about 95% of the installation and took about two minutes to run on a recent built of Raspbian (2015-05-05).  As more updates to Raspbian accumulate the run time can increase to 10 or 15 minutes.  The script is light on error checking, so is best run on a newly flashed image.

The full step by step procedure that this script automates can be found on the Configuring a System page.  For this example I will demonstrate a way to do the initial configuration without plugging the Pi into a monitor and keyboard.

Setting Up the Pi

Download the necessary files

  1. Download and install Win32 Disk Imager on your PC from Sourceforge:
    http://sourceforge.net/projects/win32diskimager/
  2. Download and unzip the latest Raspbian Image from RaspberryPi.org :
    http://www.raspberrypi.org/downloads/
  3. Download and install the putty ssh client:
    http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
  4. Download and install the angry IP scanner:
    http://angryip.org/download/
  1. Insert your SD card into your computers card slot or use a USB card reader. Take a note of the drive letter allocated to the card (E.g. E:).
  2. Launch Win32DiskImager and make sure the selected Device matches the SD card location ( [E:\] ). Having the wrong letter here will corrupt that drive.
  3. Click the small blue folder icon and select the expanded Raspbian image.
    Win32DiskImager
  4. With everything set click the Write button. You will get a last chance warning about overwriting the drive. Click ‘Yes’ if you are happy to continue.
  5. Once the image has been written, a small ‘Done’ message box will pop-up. Click the button and then Exit Win32DiskImager.
  6. Eject/Safely remove the SD card from your computer and insert into your Pi.

Raspbian Configuration and Update.

  1. Connect the camera to the Pi.
  2. Connect the Pi to your LAN with an ethernet cable.
  3. Power it on.
  4. Run Angry IP Scanner and set the start and finish IP addresses to match your network.  Also, in the Tools menu, select “Fetchers…” and add MAC Vendor to the selected fetchers.  Click the OK button.
    AngryIP
  5. Click the start button to scan your network.  When the results come up, look down the MAC Vendor column for “Raspberr” and then look to the first column to establish the matching IP address.  Don’t rely on the hostname column.  Depending on your network setup this may show the name of a device that was previously allocated the IP address by DHCP.
    AngryIPscan
  6. Launch putty and enter the IP address. I like to save the address as a session as I go along to save having to type the full IP address every time. When you are ready to proceed, click ‘Open’ to launch a command window.
    putty113
  7. At the prompt login as pi
  8. The password is raspberry
  9. The first time you login you will be dropped straight into raspi-config.
    Raspi-config
  10. Hit ‘Enter’ on “Expand the Filesystem” to fill the SD card and the ‘Enter’ again to clear the “resize on next boot” notice.
  11. Use the down arrow key to select “Enable Camera” and hit ‘Enter’. On the next screen use the right arrow to select ‘<Enable>’, then hit ‘Enter’ again.
  12. Enter “Advanced Options” and then “Hostname”. Give your install an identifiable name.
  13. Press the Tab key a couple of times to select ‘<Finish>’ and then press enter to exit raspi-config and reboot the Pi.  This will stop your ssh session.
  14. Wait a minute for the Pi to reboot and then restart the putty session, by right clicking in the putty window header and selecting “Restart Session”
  15. Login again.

Procedure

  1. Download and extract the script.  Case is important.
    wget -O - https://goo.gl/NLuFFI | tar zxvf -
  2. Change to the install directory
    cd FPiV
  3. Run the script
    ./install.sh
  4. Let it run keeping an eye out for error messages.
  5. When all is finished the Pi will be configured with hostapd set to run with 2.4 GHz WiFi using a supported Realtek adapter.  The streaming scripts are dropped into the pi home directory.
  6. Reboot the pi.
  7. If all is well, when the pi restarts it should start advertising its WiFi connection as Pi_AP.

Get Streaming

  1. Connect the laptop WiFi to the Raspberry Pi’s Wifi Access Point
  2. Open a terminal on the Laptop
  3. run the ./go script on the laptop to update the configuration files on the Pi and set the time and date.
  4. The go script will leave you in a ssh session on the Pi
  5. run the ./ustream or ./utee scripts on the Pi.
  6. Open a second terminal on the laptop.
  7. run the ./tsplay or ./uts scripts on the Laptop
  8. The video will start streaming.
Advertisements