Setting up the Raspberry Pi
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!
- 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
- Connect ethernet, insert SD card then power up
- Determine IP address by looking at router DHCP allocation (optionally reserve a fixed IP for that MAC address)
- SSH into the RPi IP address and login with default credentials (pi:raspberry)... all following instructions are for the the SSH window
- Change passwords
> sudo passwd pi (then follow instructions)
> sudo passwd root (then follow instructions)
> sudo usermod -L root
- Install WebIOPi
> 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)
- Configure WebIOPi
> 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
- Start WebIOPi through one of these methods:
> 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)
- Enable FTP
> 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 powered by