Skip to content
Snippets Groups Projects
Commit 1cc3ef78 authored by Cyril Danilevski's avatar Cyril Danilevski
Browse files

Update snmp and mcp dependencies

parent 346bae9d
No related merge requests found
Pipeline #141681 failed
...@@ -22,12 +22,13 @@ build: ...@@ -22,12 +22,13 @@ build:
- arduino-cli core update-index --config-file arduino-cli.yaml - arduino-cli core update-index --config-file arduino-cli.yaml
- arduino-cli core install esp32:esp32 - arduino-cli core install esp32:esp32
# Add pyserial for esp32 to chooch # Add pyserial for esp32 tools to chooch
- pip3 install pyserial - pip3 install pyserial
# Install dependencies # Install dependencies
- arduino-cli lib install Ethernet - arduino-cli lib install Ethernet
- arduino-cli lib install --git-url https://github.com/patricklaf/SNMP.git --config-file arduino-cli.yaml - arduino-cli lib install SNMP@1.4.0
- arduino-cli lib install MCP23S08@0.5.2
# Set version, tag if available else commit sha # Set version, tag if available else commit sha
- ICBM_GIT_VERSION=$CI_COMMIT_SHORT_SHA - ICBM_GIT_VERSION=$CI_COMMIT_SHORT_SHA
......
# IMC Arduino Firmware # ICBM Arduino Firmware
ESP32 firmware for the IMC, based on Arduino and the `ESP32-Ethernet-Kit_A_V1.2`. ESP32 firmware for the ICBM, based on Arduino and the `ESP32-Ethernet-Kit_A_V1.2`.
The Intelligent Controller Board for MPODs is a project that aims to automatically
perform power procedures upon defined inputs.
This project depends on [`Arduino_SNMP`](https://github.com/patricklaf/SNMP).
This project depends on [`Arduino_SNMP`](https://github.com/patricklaf/SNMP) and [`MCP23S08`](https://github.com/RobTillaart/MCP23S08).
## Usage ## Usage
The IMC is meant to be used over network using HTTP get and post. The IMC is meant to be used over network using HTTP get and post.
...@@ -18,7 +21,8 @@ It can be queried as a heartbeat, seeing the uptime increasing. ...@@ -18,7 +21,8 @@ It can be queried as a heartbeat, seeing the uptime increasing.
### Serial Interface ### Serial Interface
The serial interface is available through the micro-usb port. 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 `.`). It prints basic networking information, as well as a heartbeat (`-` if ethernet is disconnected, else `.`).
It is not possible to control the device or perform queries through the serial interface.
## Development ## Development
...@@ -62,10 +66,11 @@ Update the Arduino index with: ...@@ -62,10 +66,11 @@ Update the Arduino index with:
arduino-cli core update-index arduino-cli core update-index
The required libraries are: The required libraries are (minimum versions):
arduino-cli lib install ethernet arduino-cli lib install ethernet
arduino-cli lib install --git-url https://github.com/patricklaf/SNMP.git arduino-cli lib install SNMP@1.4.0
arduino-cli lib install MCP23S08@0.5.2
The project can be compiled so: The project can be compiled so:
......
...@@ -52,6 +52,16 @@ void identify() { ...@@ -52,6 +52,16 @@ void identify() {
message += seconds; message += seconds;
message += "\""; message += "\"";
// TODO: Add here mcp23s08 info:
// Pin status;
// Interrupt status;
// seconds since last interrupt.
//
// TODO: Add here power sequence status
// is_ramping_down
// current step
// percentage
message += "\n}"; message += "\n}";
restServer.send(200, "text/json", message); restServer.send(200, "text/json", message);
...@@ -104,6 +114,7 @@ void sendSNMP() { ...@@ -104,6 +114,7 @@ void sendSNMP() {
} }
auto ipAddr = IPAddress(192,168,140,79); auto ipAddr = IPAddress(192,168,140,79);
if (output != NONE) {
SNMP::Message *snmp_msg = mpod.output(output); SNMP::Message *snmp_msg = mpod.output(output);
snmp.send(snmp_msg, ipAddr, SNMP::PORT::SNMP); snmp.send(snmp_msg, ipAddr, SNMP::PORT::SNMP);
delete snmp_msg; delete snmp_msg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment