Skip to content
  • Unable to pair

    Troubleshooting fpar fail esp8266 arduino uno
    4
    0 Votes
    4 Posts
    52 Views
    Tomáš MenglerT
    Ok, no help here.
  • Unblocking loop when DHCP fails

    Troubleshooting w5510 dhcp fail block
    10
    0 Votes
    10 Posts
    163 Views
    U
    @electrik said in Unblocking loop when DHCP fails: MQTT_SOCKET_TIMEOUT Thanks for your suggestion. Unfortunately it was not enough, but I manipulated in ethernet library and right now I have enough CPU time in my main loop (reading 16 buttons state and control 15 GPIO outputs). Here is what I changed so far. I'm not sure about it long time stability, but it works on my desk: diff --git a/.pio/libdeps/megaatmega2560/Ethernet/src/Ethernet.h b/.pio/libdeps/megaatmega2560/Ethernet/src/Ethernet.h index 376e6c5..9d5e6b4 100644 --- a/.pio/libdeps/megaatmega2560/Ethernet/src/Ethernet.h +++ b/.pio/libdeps/megaatmega2560/Ethernet/src/Ethernet.h @@ -213,8 +213,8 @@ public: class EthernetClient : public Client { public: - EthernetClient() : sockindex(MAX_SOCK_NUM), _timeout(1000) { } - EthernetClient(uint8_t s) : sockindex(s), _timeout(1000) { } + EthernetClient() : sockindex(MAX_SOCK_NUM), _timeout(5) { } + EthernetClient(uint8_t s) : sockindex(s), _timeout(5) { } uint8_t status(); virtual int connect(IPAddress ip, uint16_t port); diff --git a/.pio/libdeps/megaatmega2560/MySensors/core/MyGatewayTransportMQTTClient.cpp b/.pio/libdeps/megaatmega2560/MySensors/core/MyGatewayTransportMQTTClient.cpp index 12cfd67..754ae03 100644 --- a/.pio/libdeps/megaatmega2560/MySensors/core/MyGatewayTransportMQTTClient.cpp +++ b/.pio/libdeps/megaatmega2560/MySensors/core/MyGatewayTransportMQTTClient.cpp @@ -155,7 +155,7 @@ bool reconnectMQTT(void) return true; } - delay(1000); + delay(1); GATEWAY_DEBUG(PSTR("!GWT:RMQ:FAIL\n")); return false; } @@ -190,7 +190,7 @@ bool gatewayTransportConnect(void) Ethernet.localIP()[0], Ethernet.localIP()[1], Ethernet.localIP()[2], Ethernet.localIP()[3]); // give the Ethernet interface a second to initialize - delay(1000); + delay(10); #endif return true; }
  • 0 Votes
    2 Posts
    817 Views
    sundberg84S
    Hi @Rolo6442u - welcome! st=fail means the radiotraffic between the node and gateway fails in some way. Sometimes it can reach the gw, but some more skilled in the code need to present you with the details. If you use a nrf radio and you dont use a 4.7uF cap on VCC-GND thats a good advice.

14

Online

11.7k

Users

11.2k

Topics

113.1k

Posts