Software upgrade
Notes on upgrading Sensorgnomes
Last updated
Notes on upgrading Sensorgnomes
Last updated
In order to upgrade a Sensorgnome an Internet connection is required as the Sensorgnome pulls packages from a server on the Internet. Some thoughts about upgrades:
if it ain't broke, don't fix it
the standard upgrade process only updates Sensorgnome software, almost all system software is left unchanged, this avoids ending up with a completely non-functional system due to a problem during the upgrade
it is possible to perform a full system upgrade, but perhaps swapping in an SD-card with a fresh clean image is a better option, in any case, unless there is a specific problem this is supposed to fix see the first bullet point...
If updating with a fresh image, be sure to update the boot number to maintain the proper sequence.
The upgrade process is managed using the SG Web UI's software tab shown below. The functionality first needs to be enabled with the enable buttons
toggle. The next step is to run a software update check (red check
button). In the situation shown one Sensorgnome package can be updated and many operating system packages. The red sg upgrade
button starts the upgrade of just the Sensorgnome packages, which is the recommended action. Upgrading all the OS packages can have unintended issues.
Due to the expiration of the software repository signing key manual intervention is required in order to upgrade from V2.0-RC12 or prior (version 2023-XXX on the software tab) to the latest versions. In order to update the repository key the following command must be executed on the Sensorgnome (i.e. SSH to the Sensorgnome):
sudo curl -L -o /etc/apt/trusted.gpg.d/sensorgnome.gpg
https://sensorgnome.s3.amazonaws.com/sensorgnome.gpg
Note that this command is one line even though it may appear wrapped in this manual!
After issuing this command (you should see messages showing the key being downloaded) the regular upgrade procedure will work.
This upgrade requires patience because the code in those versions could not deal with some of the changes that are required and thus a "double-upgrade" happens under the covers. Please follow this process:
On the software tab, "enable changes"
Run "check", have a minute of patience and you should see available updates. If it doesn't seem to complete run "check" again
Run "sg-upgrade" and monitor the log (or get a tea/coffee for 2-3 minutes), after a couple of minutes the log will seem to be done (scroll down in the widget), showing:
Wait another minute and you may notice the green LED on the rPi stop blinking for a bit as it reboots, then reload your browser tab (you may have to reconnect to the hot-spot if you're using that to access the Sensorgnome), you should see a prompt to verify the SG password, if not, wait another minute and reload the browser tab again:
After entering the password the web UI should load, however, it may take a while (20-30 secs) and you may have to reconnect to the hot-spot again (sorry). On the software tab confirm that you are now running version 2023-115 or later
The boot number is an incremental marker of how many times a SG has rebooted. It is represented in the file name as well as the web interface in the V2 SensorGnome.
The boot number is an essential component when processing detection data as it can account for bad timestamps (when the GPS reports an incorrect date/time) and for stringing together long detection runs that overlap multiple uploaded batches. Because the tagfinder
algorithm works under the assumption that the boot number always increments, issues can arise when the boot number is reset.
When upgrading a SensorGnome's software with a newly flashed SD card, the boot number in the file names will be reset to 0
. This applies to V2 SG with a card that's been flashed with the software, V1 SG where the software files have copied to a new card, and SG running on BeagleBones. Since this will violate the assumption that the boot number always increments, this may result in missing or false detections until the receiver data is reprocessed.
If updating a V2 SG over the internet using the web interface, the proper boot number sequence is retained.
Updating the boot number is only possible on the V2 SensorGnome software running on a Raspberry Pi.
If you cannot, or prefer not to, run V2 SG on a Raspberry Pi, the boot number will only be corrected after the receiver data is reprocessed. You can read more about reprocessing receiver data here.
Before updating the software, connect to the SensorGnome and visit the web interface. From the landing page, you should be able to see the current boot number (as the screenshot above shows). Write this number down or otherwise commit it to memory.
After you have upgraded and initiated the new software, connect to the SG and navigate to the "Software" tab to update the boot number. Recalling the previous value, set the new number higher higher than necessary then reboot the SG and confirm that the change has persisted when you connect again.
Reboot the SG and connect to it to confirm that the change is persistent.
When a receiver’s data is reprocessed (also referred to as re-running), the correct boot number sequence is restored and any spurious or missing detections resolved – assuming all tag deployment metadata is up-to-date. You can read more about receiver data reprocessing here.