PhracturedBlue / ESP8266MQTTMesh

Self-assembling Mesh network built around the MQTT protocol supporting OTA
GNU General Public License v3.0
267 stars 79 forks source link

OTA through mesh fails over hidden network #60

Open C-monC opened 6 years ago

C-monC commented 6 years ago

Please Provide the following information:

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.

simone1999 commented 5 years ago

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.