Docs

RPi


HorizonRPi2

Hardware and Setup for a Raspberry Pi on Horizon

This page walks you through the steps necessary to choose hardware for your Pi and set up the Pi on Horizon. Both Raspberry Pi 2 and 3 are  supported. We recommend R Pi 3 for performance advantages, internal WiFi, availability, and cost.

 

Steps to set up your Raspberry Pi:

The steps to set up and register your Raspberry Pi device with Horizon are:

  1. Obtain and set up your Raspberry Pi and all experiment hardware
  2. Download the current Horizon image for your platform (for Raspberry Pi's... at the link below)
  3. Decompress the image (unzip)
  4. Flash the Horizon image onto the MicroSD card
  5. If you are using WiFi, configure WiFi in the MicroSD image
  6. Insert the flashed MicroSD in the RPi, then power it up, and wait for it to boot
  7. Register your device on Horizon (using its local registration page)

 

1. Set up your Raspberry Pi and all experiment hardware

All hardware supported on Horizon for the Raspberry Pi and experiments is listed in our hardware section. Set up the Pi in a good location to receive WiFi signal, or connectivity via Ethernet. Connect all your dongles / sensors to the Raspberry Pi. Refrain from powering the Pi or inserting the SD Card, as you'll do those tasks in the following steps.

 

2. Download the current Horizon image for the Raspberry Pi

Download the SD Card image to a computer on which you can decompress the image and write it to a MicroSD card (in steps 3 & 4).

 

3. Decompress the Horizon image

If your computer has not automatically decompressed the zipped image archive, then you will need to manually unzip it.  The uncompressed image will be named horizon-rpi[n]-[date]_[rev].img (where "[date]" is the publication date and [rev] is the unique revision of that Horizon image).

 

4. Flash the Horizon image (.img file) onto the MicroSD card

Now you need to write this image file onto your MicroSD card so your Pi can use it to boot up Linux. 

  PLEASE NOTE: If you have anything important on the MicroSD card, then you will want to save those files before doing this step.  This step will completely erase the MicroSD card and write this new disc image onto the card.  Anything previously stored on the MicroSD card will be lost.

For help with this step, please consult Raspberry Pi's installing-images doc:

Flashing the MicroSD card may take 50 seconds to many minutes to complete.

 

5. (WiFi users) Configure WiFi in the MicroSD image

The quick & easy way:  To use WiFi, you will need to set it up in the image on the MicroSD card. For home networks with WPA2 (common) authentication, use these instructions:

  • Mount the MicroSD card on your computer. The mounted boot volume should show up as "system-boot" or similar.  (Linux will discover two partitions, so be sure to use the correct one.)
  • Find and edit the file wpa_supplicant_cred.txt in the SD Card's /system-boot folder
  • Add your home WiFi credentials (SSID and Password) in the areas provided.  Omit any quotes.
    wpa_ssid=YourWiFiSSID
    wpa_passphrase=YourWiFiPassword
  • Save and close the file. Unmount (safely eject) the MicroSD card from your computer.

 

Alternatively, if you wish to use the full capability of wpa_supplicant via the wpa_supplicant.conf file, follow these instructions.  This method supports MSCHAPV2 and other enterprise authentication methods.  Horizon will use this config file preferentially if it exists.

  • Create a file named wpa_supplicant.conf In the SD Card's /system-boot folder.
  • Add the required lines (example 4 lines for home network shown here) and modify them with your own WiFi ssid and password (use quotes):
network={
ssid="your wifi ssid" psk="your wifi password"
}
  • Save and close the file. Unmount (safely eject) the MicroSD card from your computer.

 

6. Insert the flashed MicroSD and boot your device

Once your MicroSD card has been flashed, insert it into your device.  Attach any additional hardware to your device at this time (USB SDR dongle, keyboard, console cable, etc.)  Also make sure to connect the WiFi adapter or an Ethernet cable for network access.

When you are ready, power on the device.  

Default account login: "root", password: "horizon".  

PLEASE NOTE:  We recommend you change this password as soon as you login to the Pi.  (You can use the standard Linux command passwd.  The passwd command will prompt you for the details.)

The entire boot process takes about 3 minutes.  You'll observe from the console the OS booting, running firstboot to configure itself, and then rebooting once more.  The Pi is ready when the login screen host name is horizon-[number], where [number] is the CPU serial number of your device.

Boot process video, including WiFi setup using the console.  (This video is slightly out-of-date and will be updated soon to reflect changes in our new software image.  The overall setup process is similar. Our written setup instructions here are up-to-date.)

 

7. Register your Device on Horizon

Once your Pi has booted, you'll be able to connect to the Pi via a web browser and register for Horizon experiments. You'll discover the Pi's IP address, and visit its self-hosted registration webpage.  Click here for registration instructions.

 

Questions, Troubleshooting

If you have any difficulties with any of these steps, please contact the Horizon community for help by clicking on the Forum tab at the top of this page.  You can also report Horizon bugs in the forum.