logo Setting up the Raspberry Pi

Comments: 0

Introduction

NOTE: These instructions were written in December 2013, so may be stale. They only cover intial setup of a Raspberry Pi with WebIOPi from a PC.

I will also be migrating to a Phonegap app + Node.JS architecture in the coming weeks, so these notes will soon become irrelevant to my setup.

The main point of this blog post is to document what was done and provide a short guide for how to get going!

  1. Prep SD card with Raspbian Wheezy image
    • Browse to http://www.raspberrypi.org/downloads
    • Torrent Raspbian Wheezy "2013-07-26-wheezy-raspbian.zip.torrent"
    • Burn to SD using https://launchpad.net/win32-image-writer
  2. Connect ethernet, insert SD card then power up
  3. Determine IP address by looking at router DHCP allocation (optionally reserve a fixed IP for that MAC address)
  4. SSH into the RPi IP address and login with default credentials (pi:raspberry)... all following instructions are for the the SSH window
  5. Change passwords
  6. > sudo passwd pi (then follow instructions)
    > sudo passwd root (then follow instructions)
    > sudo usermod -L root
    
  7. Install WebIOPi
  8. > wget http://webiopi.googlecode.com/files/WebIOPi-0.6.0.tar.gz"
    > tar xvzf WebIOPi-0.6.0.tar.gz
    > mv WebIOPi-0.6.0 webiopi
    > cd webiopi
    > sudo ./setup.sh (this step takes a few minutes)
    
  9. Configure WebIOPi
  10. > sudo nano /etc/webiopi/config
    
    • Change myscript line to "myscript = /home/pi/webiopi/htdocs/av.py"
    • Comment out the passwd-file line
    • Change doc-root line to "doc-root = /home/pi/webiopi/htdocs"
    • Change serial0 line to "serial0 = Serial device:ttyAMA0 baudrate:9600"
    • Change CoAP enabled to false
    • CTRL-X followed by Y then enter
  11. Start WebIOPi through one of these methods:
  12. > sudo webiopi -d -c /etc/webiopi/config (debug mode)
    > sudo /etc/init.d/webiopi start (one-off mode)
    > sudo update-rc.d webiopi defaults (to start on system reboot)
    
  13. Enable FTP
  14. > sudo apt-get install vsftpd
    > sudo nano /etc/vsftpd.conf
    
    • CTRL-W then search for "anonymous_enable", change YES to NO
    • Uncomment local_enable and write_enable lines
    • At end of document add "force_dot_files=YES"
    • CTRL-X followed by Y then enter
    > sudo service vsftpd restart
    

Comments

comments powered by Disqus