Skip to content

Deploying on a Raspberry Pi

Paul C. Zimmerman edited this page Sep 13, 2024 · 25 revisions

Why Raspberry Pi?

Raspberry Pi single board computers are popular and inexpensive, and make an excellent platform for running ShootPoints-Web in the field.

Which Models are Supported?

ShootPoints-Web has been used on Raspberry Pi 2 Model B computers on excavations in Iraq. Because of its good balance of small size, reasonable speed, low power consumption, full-sized USB port, and built-in Wi-Fi, I prefer deploying on the Raspberry Pi 3 Model A+, but it will run equally well on any currently-produced model.

What Do These Instructions Do?

The procedure documented below will turn your Raspberry Pi into a headless data collector for use in the field. By following it you will install the latest version of Raspbian OS onto your device, configure it to create a Wi-Fi network called “shootpoints,” and set ShootPoints-Web to run at startup.


Install Rasbian

  1. Download and install the Raspberry Pi Imager app.
  2. Launch Raspberry Pi Imager, and choose the appropriate device. Choose Device
  3. Click the “Choose OS’ button and then “Raspberry Pi OS (other).” Choose OS
  4. Select the appropriate Lite version of the Raspberry Pi OS. (For a Raspberry Pi 3 Model A+ this is “Raspberry Pi OS (Legacy, 64-bit) Lite.”) Choose RPi OS Lite
  5. Choose the storage medium (i.e., the microSD card that you will install in the Raspberry Pi). Choose Storage Medium
  6. You will use OS customisation, so click the “Edit Settings” button. Edit OS customisation settings
  7. Under the OS Customisation “General” tab set the hostname, username, and password all to “shootpoints” and set your locale. OS Customization Settings
  8. Under the OS Customisation “Services” tab enable SSH with password authentication. Enable ssh
  9. Save the customizations and then write the image to the microSSD, accepting the fact that any existing data on the storage medium will be lost, and entering your password when prompted.

Install ShootPoints-Web

  1. (optional) Connect the Raspberry Pi to an external monitor with HDMI.
  2. Connect the Raspberry Pi to your local network with ethernet and power it on. (Models without an ethernet port will need a USB to ethernet adapter.)
  3. Wait a few minutes for the device to fully configure itself. If it’s connected to a monitor you can wait until the login prompt appears.
  4. Use ssh to connect to the Raspberry Pi from another computer on the same network. (Window users may need to install Putty first.)
    ssh shootpoints@shootpoints.local
  5. Run the installation script.
    curl -s https://raw.githubusercontent.com/Lugal-PCZ/shootpoints-web-rpi-installer/main/install-shootpoints-web.sh | bash
  6. Shut down the Raspberry Pi.
    sudo shutdown -h now

Fix the WiFi Hotspot on Raspberry Pi 2

Raspberry Pi 2 devices don’t have built-in WiFi, so they need a USB WiFi adapter to set up the shootpoints hotspot. For some unknown reason, though, the instructions above leave it without a valid IP address on its wireless interface. So to fix this and enable the WiFi hotspot on these older devices, follow these steps:

  1. Connect to the Rasbperry Pi with ssh, as above.
  2. Type sudo /etc/network/interfaces.
  3. Enter the following, then type ctrl-X and then y to exit nano and save your changes, and sudo shutdown -h now to shut down the device.
auto wlan0
iface wlan0 inet static
  address 192.168.111.1
  netmask 255.255.255.0
  gateway 192.168.111.1
  broadcast 192.168.111.255
  dns-nameservers 192.168.111.1

Next Steps

USB-to-Serial Adapter

Plug a USB-to-serial adapter into the Raspberry Pi to connect it to the total station’s serial cable. For my Topcon total station, I use this USB to hirose cable.

Enclosure

3D print an enclosure for your Raspberry Pi.

Clone this wiki locally