Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICBM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
detectors
DSSC
ICBM
Commits
1cc3ef78
Commit
1cc3ef78
authored
9 months ago
by
Cyril Danilevski
Browse files
Options
Downloads
Patches
Plain Diff
Update snmp and mcp dependencies
parent
346bae9d
Loading
Loading
No related merge requests found
Pipeline
#141681
failed
9 months ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+3
-2
3 additions, 2 deletions
.gitlab-ci.yml
README.md
+11
-6
11 additions, 6 deletions
README.md
rest.cpp
+11
-0
11 additions, 0 deletions
rest.cpp
with
25 additions
and
8 deletions
.gitlab-ci.yml
+
3
−
2
View file @
1cc3ef78
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
README.md
+
11
−
6
View file @
1cc3ef78
# I
M
C Arduino Firmware
# IC
BM
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:
...
...
This diff is collapsed.
Click to expand it.
rest.cpp
+
11
−
0
View file @
1cc3ef78
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment