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

Initialize SNMP

parent 7ad88faa
No related branches found
No related tags found
1 merge request!2Initial MPOD feature
Pipeline #130951 failed
......@@ -44,7 +44,7 @@ void EthernetEvent(WiFiEvent_t event)
}
}
void connectNetwork()
void initializeNetwork()
{
WiFi.onEvent(EthernetEvent);
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);
......
......@@ -19,6 +19,6 @@ We use Ethernet, but reuse much of the networking utilities.
extern bool eth_connected;
void EthernetEvent(WiFiEvent_t event);
void connectNetwork();
void initializeNetwork();
#endif
#include "esp32_ethernet.hpp"
#include "rest.hpp"
//#include "mpod.hpp"
#include "mpod.hpp"
unsigned long start;
extern bool eth_connected;
//extern SNMP::Manager snmp;
extern SNMP::Manager snmp;
void setup() {
Serial.begin(115200);
connectNetwork();
initializeNetwork();
while (!eth_connected) {
Serial.print("-");
delay(100);
......@@ -18,6 +18,8 @@ void setup() {
initializeRoutes();
Serial.println("Started REST server");
initializeSNMP();
Serial.println("Started SNMP server");
start = millis();
}
......@@ -47,7 +49,7 @@ void serial_loop() {
void loop() {
// Manager loop function must be called to process incoming messages
//snmp.loop();
snmp.loop();
restServer.handleClient();
serial_loop();
......
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