- Raspberry Pi with microSD card.
- Blues Wireless Notecard and Notecarrier Pi
- Raspberry Pi UPS HAT
- ezShare WiFi SD Card Adapter
- Toshiba Flash Air W-04 WiFi SD Card Adapter
- Optional Cirocomm 5cm Active GPS Antenna
Assemble the Raspberry Pi on the bottom, Notecarrier (with installed Notecard) in the middle, and the Pi UPS HAT on the top.
IMPORTANT: Some (maybe all) Garmin G1000 units appear to be very particular about the SD card being used. The ezShare and early versions of the Toshiba FlashAir (prior to W-04) do not work.
This README assumes a basic familiarity with AWS services; the below steps are a general guide but omit some details for brevity.
- Using SQS create a Queue
- Using Lambda create a Lambda function using the contents of
lambda\lambda_function.py
- Setup SES to allow sending of e-mails
Create a NoteHub Project following these directions. The project will
have a unique identifier (i.e. YOUR_NOTE_HUB_PRODUCT
) that you will use later during configuration of OpenSync.
Once you have a NoteHub project, you will create two Routes: (1) a AWS route to SQS for data.qo
Notefiles and (2) a Proxy Route to Savvy Analysis.
- Download Raspberry Pi Imager
- Select Raspberry Pi OS (other) and choose Raspberry Pi OS Lite (32-bit)
- Press Ctrl-Shift-X to display advanced options. Set hostname to opensync and select Enable SSH and provide a password.
- Write the image to the SD card and install the SD card into the Raspberry Pi
- Connect the Raspberry Pi Ethernet port to your network
- Power on the Raspberry Pi and login with a username of 'pi' and the password set in step 3.
- Enable i2c by running
sudo raspi-config
and selecting Interface Options and then I2C - Setup SD card WiFi by running
sudo raspi-config
and selection System Options and Wireless LAN. - Execute the following commands:
$ sudo wpa_cli -i wlan0 reconfigure
$ sudo apt-get update
$ sudo apt-get install python3-venv git python3-numpy python3-pandas i2c-tools
$ python -m venv --system-site-packages OpenSync
$ . OpenSync/bin/activate
$ python -m pip install git+https://github.com/maihde/opensync.git
$ sudo cp OpenSync/etc/opensync.service /etc/systemd/system/opensync.service
$ sudo cp OpenSync/etc/ups.sh /etc/init.d; sudo chmod a+x /etc/init.d/ups.sh
$ sudo update-rc.d ups.sh defaults
$ echo 'product: "YOUR_NOTE_HUB_PRODUCT"' >> ~/.opensync.conf
$ vi ~/OpenSync/etc/opensync.conf # edit to your preference
$ sudo systemctl enable opensync
$ sudo systemctl start opensync
$ sudo timedatectl set-timezone UTC
At this point the Raspberry Pi will try to connect to the WiFi SD card. If you need to make updates or other changes, you will need to connect the Raspberry Pi to a wired network or use a serial console.
To update OpenSync
$ systemctl stop opensync
$ cp ~/OpenSync/etc/opensync.conf /var/tmp/opensync.conf
$ . OpenSync/bin/activate
$ python -m pip install --upgrade --force-reinstall --no-deps git+https://github.com/maihde/opensync.git
$ cp /var/tmp/opensync.conf ~/OpenSync/etc/opensync.conf
$ systemctl start opensync
Logs will be sent to /var/log/daemon.log
.
Running locally without a note-card or sd-card
PYTHONPATH=src python -m opensync --disable-notecard /path/to/file
Running locally without a note-card but using Toshiba FlashAir
PYTHONPATH=src python -m opensync --disable-notecard --wifi-sdcard=flashair
wget https://github.com/blues/note-go/releases/download/v1.4.9/notecardcli_linux_arm.tar.gz
sudo tar -xvzf notecardcli_linux_arm.tar.gz -C /usr/local/bin