ESP8266MQTTMesh icon indicating copy to clipboard operation
ESP8266MQTTMesh copied to clipboard

OTA through mesh fails over hidden network

Open C-monC opened this issue 5 years ago • 1 comments

Please Provide the following information:

  • ESP8266MQTTMesh version: 1.0.4
  • AsyncMQTTClient version: 0.8.2
  • ESPAsyncTCP version: 1.2.0
  • ESP8266 Core version: 1.0
  • Using the Hello World Example

If you are you using platformio or Arduino, which one? Platformio (Home: 1.0.2, Core: 3.6.0rc1)

Description of problem: I have the following setup:

  1. One MQTT broker
  2. One ESP8266 connected directly to the MQTT broker
  3. Another ESP8266 out of range of the MQTT broker, but in range of the first EPS8266 (similar to the Mesh Topology example

I have the topology up and running with messages from both ESP's being received by the broker. The ESP out of range of the MQTT broker seems to connect to the ESP within range and forwards it's messages correctly. The problem is that when I try to OTA over the mesh setup, only the first node is picked up by the send_ota.py script. The second ESP (the one out of range of the broker) seems to disconnect from the first ESP and skip the OTA procedure. Sometimes it reconnects during the OTA and causes a Got unexpected md5 for node 4e39a4 error.

The following are the logs obtained during the test: mosquitto_mqtt_output.txt send_ota_output.txt

As you can hopefully see from the logs, the second node (5126564) seems to disconnect during the Erasing... step and does not update. It does receive the Reset command at the end of the OTA, however, as both nodes have their counters reset to 0.

I am not sure what could be causing this. Any help is appreciated.

C-monC avatar Aug 04 '18 18:08 C-monC

hi, you could try to send the Firmware directly to the 2. Node by defining the node Argument in sendOTA.py instead of the ID Argument. Also in my Fork of the Project the sendOTA.py has an Argument packageLength. with this Argument you can lower the Size of the send Packages, which helps when you have the common problem with fragmentet Packages. if you tried this things please write back so i can help you further or to tell what fixed it so i could maybe fix the issue in the Code.

simone1999 avatar Jul 26 '19 10:07 simone1999