-
Notifications
You must be signed in to change notification settings - Fork 1
Deploying on a Raspberry Pi
Raspberry Pi single board computers are popular and inexpensive, and make an excellent platform for running ShootPoints-Web in the field.
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.
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.
- Download and install the Raspberry Pi Imager app.
- Launch Raspberry Pi Imager, and choose the appropriate device.
- Click the “Choose OS’ button and then “Raspberry Pi OS (other).”
- 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 the storage medium (i.e., the microSD card that you will install in the Raspberry Pi).
- You will use OS customisation, so click the “Edit Settings” button.
- Under the OS Customisation “General” tab set the hostname, username, and password all to “shootpoints” and set your locale.
- Under the OS Customisation “Services” tab enable SSH with password authentication.
- 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.
- (optional) Connect the Raspberry Pi to an external monitor with HDMI.
- 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.)
- 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.
- 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 - Run the installation script.
curl -s https://raw.githubusercontent.com/Lugal-PCZ/shootpoints-web-rpi-installer/main/install-shootpoints-web.sh | bash - Shut down the Raspberry Pi.
sudo shutdown -h now
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:
- Connect to the Rasbperry Pi with ssh, as above.
- Type
sudo /etc/network/interfaces. - Enter the following, then type ctrl-X and then y to exit nano and save your changes, and
sudo shutdown -h nowto 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
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.