OretraK – MR005
Rewrite and embedded C application as golang microservices running on a Raspberry Pi.
back “when I wore a younger man’s shoes” (to quote Billy Joel) I wrote an embedded microprocessor system for RF Tags on a RabbitCore processor. This was written in C and the system tracks ore flows in mines.
Towards the end of 2024 RF Tags called to ask about upgrading this system to use https on their intranets rather then http. Unfortunately these processors do not support https.
We decided to change route completely and rewrite this application as golang microservices running on a Raspberry Pi.
One of these Golang microservices provides a web interface for technicians to manage the device. This is a huge improvement on the old system in which a technician would need to plug a serial cable into the device and type text commands. The improvements includes:
- Technicians can manage these device remotely (getting 3km underground is not a 5 minute task).
- No more cryptic text based commands (eg, 00ff01)
- Increase reliability by using Golang’s http features rather then coding them on a micro.
As mentioned, some command looked like this on the old system:
0ff01
00ff3e
00ff4d003002323223
etc
The new interface allows technicians to update settings in a browser, like this:
Other Golang microservices included one for managing serial ports and managing IO pins on the Raspberry Pi.
There was also a small bluetooth Golang application to do the initial setup of the Raspberry Pi. This does not replace the web app show above but gets used once a Raspberry Pi is added into a network to gets its IP address which is dynamically assigned and to update the Rasbperry Pi’s MAC address.
Tech Used: Golang, HTML, Javascript, Raspberry Pi, Bluetooth