-
Cyril Danilevski authoredCyril Danilevski authored
IMC Arduino Firmware
ESP32 firmware for the IMC, based on Arduino and the ESP32-Ethernet-Kit_A_V1.2
.
This project depends on Arduino_SNMP
.
Usage
The IMC is meant to be used over network using HTTP get and post.
Routes
All routes return JSON.
Available routes are:
-
/idn
: provides information about firmware and hardware version, and uptime.
It can be queried as a heartbeat, seeing the uptime increasing.
Serial Interface
The serial interface is available through the micro-usb port.
It prints basic networking information, as well as a heartbeat (-
if ethernet is disconnected, else .
).
Development
Quirks
Despite communication being over Ethernet, the project makes use of the ESP32 Wifi stack, hence some
references to Wifi here and there (eg. WiFiUdp
).
Installation
Either use the Arduino IDE and use its library manager to find the SNMP library, or use arduino-cli
:
# Download arduino-cli
wget https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz
# Extract the downloaded archive
tar -xzf arduino-cli_latest_Linux_64bit.tar.gz
# Verify installation
arduino-cli config init
Then set up the required environment. Edit ~/.arduino15/arduino-cli.yaml
and add the following:
board_manager:
additional_urls:
- https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- http://arduino.esp8266.com/stable/package_esp8266com_index.json
Update the Arduino index with:
arduino-cli core update-index
The required libraries are:
arduino-cli lib install ethernet
arduino-cli lib install SNMP
The project can be compiled so:
arduino-cli compile --fqbn esp32:esp32:esp32wroverkit icbm.ino -v
And uploaded so:
arduino-cli upload -p /dev/ttyUSB1 --fqbn esp32:esp32:esp32wroverkit
Versioning
The firmware version is provided as part of the /idn
route.
This is the git tag or commit, if -DICBM_GIT_VERSION
is set.
The git date can be set via -DICBM_GIT_TIMESTAMP
.
CI Artefacts
CI artefacts can be uploaded so:
unzip firmware.zip
arduino-cli upload -p /dev/ttyUSB1 --fqbn esp32:esp32:esp32wroverkit --input-dir firmware