Monday, February 9, 2015

Getting my Pi Ready

Before I can build anything to study IOT technologies, I need a thing. Like most people in the class, I have selected the Raspberry Pi Model B+ as my development target. I bought a kit from Canakit with the board, SD card and GPIO breakout board all included on Amazon (http://amzn.com/B00G1PNG54). I put the board in the case, put the SD card in the slot and booted it up. I have loaded Raspbian on as the primary OS, which works well for me since I have worked with Debian Linux based systems before. After install, I did a few things:

  1. Connected the system to WiFi. The kit came with a WiFI adapter, so I plugged it in and started the "WiFi Config" utiltiy on the desktop. Turns out, this is a front-end to wpa_supplicant, a set of tools for managing WiFi networks. Once I had connected to a network, all networks were available in /etc/wpa_supplicant/wpa_supplicant.conf, and selected in order of preference top-to-bottom. This was important for a later step.
  2. Patched it. On the pi, this is done by executing "sudo apt-get update" followed by "sudo apt-get dist-upgrade". This took a while.
  3. Installed a VNC server, as recommended by the instructor (sudo apt-get install thinvncserver). SSH with X forwarding can get most things done, but having a GUI for some things is nice too. Once my coding project is done I will likely turn off X and the VNC server to save resources.
  4. Set up my phone as an access point and configured the Pi to prefer it. This lets me plug the Pi in and I can SSH  / VNC from my laptop if both are joined to my phone. Important for working in class where monitors are limited. Using the command "nmap XX.XX.XX.0/24", replacing the network with my access point's, I am able to find the Pi if he gets a different DHCP lease between sessions.
  5. Set up the VNC server to boot at startup. I got instructions on that here (http://elinux.org/RPi_VNC_Server).
Now, I can sit in class and hack on my Pi! I just need something to do.

No comments:

Post a Comment