-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OTA Crashing WeMos device #530
Comments
Currently looking into another ticket, will get to this asap |
Thanks! If you have any thoughts as to where I could start looking, happy to take a crack and start poking around - it's pretty weird! :/ |
Same here. I finally wanted to start using OTA, but I cannot get it work. When I send a firmware via
Any new information about how to fix or workaround this? |
My workaround is to use normal OTA instead of Homie OTA... |
@timpur Do you have any thoughts as to where we could start looking at this issue? I'm not advanced in low level ESP development, but always happy to have a poke around - I just have no clue with this one where to start :/ |
Assuming your using latest SDK and latest 2.0 release Maybe try the different lwip options from the SDK, I have a feeling the smallest lwip option from the SDK might work Sorry I haven't gotten to this, been so busy with new job and all. But I'm slowly still working on homie, currently trying to get 2.1 out the door, might add this bug to that release. |
I would like to try this. But I have no idea what that means and where to change this And would I need to change this for the existing firmware or the firmware that gets uploaded? (I can find that out myself) Anyway. |
If you use platformIO as build environment: If you use Arduino IDE: |
@CWempe Be sure to do a hard reset after flashing over serial to test OTA, there is an issue with OTA where it won't work reliably after getting flashed over serial (if I remember correctly - this is at least what I observe). Be sure to select For me, following the directions at http://docs.platformio.org/en/latest/platforms/espressif8266.html#lwip-variant , and using Thank you everyone! This appears to be sorted for me at least. |
Still no luck. 😞 I did a hard reset after every serial flash, now. |
btw: This could be a duplicate of #261 |
I started using PlatformIO now. Hopefully this will be fixed with this PR. (LwIP 2.1.0) |
@CWempe After compiling, are you flashing via serial, then trying an OTA update? I'm not sure on how to check in the compiled code, but one thing I did is change the |
@sillyfrog can you please try to execute this cmd (from windows/linux) to the ip of your Wemos Device:
Please take a look into you mqtt in the same time and check if it resets everytime you send the command from above. Please tell me if it resets everytime you send it. If it does, then please check your config.json if you named your device in a poattern like "sonoff-dual-01" and if so remove the zero. I can say to 100% that the name "sonoff-dual-01" causes reset in the moment that the device gets the OTA invitation. I will open a Bug for that - I'm currently testing if it is Homie oder Arduino-OTA where I have to do that. |
I have done that now, both with the I have also done it against port 1883 (I don't know anything about this UDP process, so giving things a test). But either way, nothing happened (with or without the This was on a D1 Mini Pro v1.1.0, using the TemperatureSensor example. Cheers. |
No reset did happen with Mhh and what is your configure device-id? Sounds like another problem than I'm thinking of. |
For this test, it was named |
And your problem still persists? If using OTA the device crashes and restarts (I try to avoid reset - cause this is a Homie function which also deletes the config). I use the Wemos D1 mini and cought a problem with ota names crashing the device when trying to use ota. |
I have no issues if I set the |
@sillyfrog I thought you said |
@timpur Using the But sending the raw UDP packet, did not cause my device to crash, things kept working, with or without the PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY build flag (I'm not sure my device was even listening on this UDP port). Thanks again for your help on this! |
Done. So can we close this ? @sillyfrog |
I am still having this problem. |
I just issued the command to see if my devices would reset.
No rest. My devices are named:
|
I can confirm and reproduce this issue on a Wemos D1 mini both with Homie OTA and ArduinoOTA. All test with build flag device_id: homie-alu-led-2
device_id: led2
So for me it is certain device_ids that break the process. As possible workaround maybe you can use lowercase ids without any special chars. And I think further investigation in ArduinoOTA library is necessary in that case. |
Very interesting. Is it the combination of dash and number in the device id? |
I did not found out, what exactly the cause was - I changed my devicenaming after I found out. From "sonoff-s20-06" to "sonoff-s20-6" the "0" seems not to be the thin if we look at @targetblanks post. So the "-" should do it in a specific way - because at my side they work :-D But I'll test ist again. Had some OTA problems - if leaving out the dash fixes it.. :-D |
Perhaps |
I am not sure, because it was a while ago. |
Sorry, I didn't notice that the brackets got messed up. Fixed the comment |
I just tested again without success. 😞 Just to be clear: I am using the develop branch (v2.0.1). This is my device:
I tried updating the same sketch with an incremented version number (9.0.2) via homie-ota. But the device crashes:
I compiled the sketch with PIO.
Same without And I just tried the same with homie I reseted my device and left the So in conclusion:
|
Hey there. For me it looks like OTA-Update from older Versions or OTA in older Versions has a Problem. With a fresh via serial flashed SonOff S20 (esp8266) using eps8266 in version 2.61 Updating to 2.61 and dev-v3 makes exactly that crash - i think i used something like 2.42 and homie 2.0.0 before - and from that it seems only updating with serial connection works - but after that OTA is fine. |
I think these issues confirm that the "official" PlatformIO package is outdated. This might be a workaround. |
Hehe I use Arduino IDE - where i can plug version together as I please :-D (has bad and has good sides) :-D |
I did some testing now. But no succcess. 😞 I tried OTA from This is my [env:d1_mini_pro]
; *** Esp8266 core for Arduino version 2.6.0 (for Windows, most Linux variants and Mac)
; *** custom setup until the core 2.6.0 version is official released from PlatformIO crew
platform = https://github.com/Jason2866/platform-espressif8266.git#core_2_6_1
board = d1_mini_pro
build_flags = -D NDEBUG
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
-mtarget-align
-O2
-DBEARSSL_SSL_BASIC
; -Teagle.flash.1m.ld
; enable one option set -> No exception recommended
; No exception code in firmware
-fno-exceptions
-lstdc++ Maybe I will try without PlatformIO tomorrow. |
I'm using VSCode with the PIO plugin and I don't remember switching to a different version of the expressif core. |
I am using homie-ota for OTA. @luebbe |
It's a D1 mini, but ota also works with an off the shelf 12E or Sonoff devices. The output is:
So it's a rather old version of the expressif SDK |
Perhaps related to #526? |
* Lets try to fix travis * fix paths * missed one path * some more fixes * try with copy? * no log? * Now fix the second sketch
Is this issue solved @sillyfrog? Could it be closed by now? |
@stritti Yes, I've been using this (well the current release at least) for some time and it's still working for me. Thanks! |
After much testing, I have been able to find one of the examples is able to replicate my issue. The most basic example as per http://marvinroger.github.io/homie-esp8266/docs/2.0.0/quickstart/getting-started/ does work OK. The TemperatureSensor does not. I think it maybe related to having two
temperatureNode.advertise
lines - but no idea how.I'm using a WeMos Mini Pro v1.1.0 and a v1.0.0 (both have the same behavior - so fairly sure it's not the device). I'm sure OTA used to work on these same devices but that may have been Homie <= 1.5. I'm only recently getting back into OTA updates using the v2.0 firmware (latest stable release).
Basically, if I upload the "TemperatureSensor" example, then change the version to v1.0.1 (say), and recompile, and try to upload the newly built firmware using
ota_updater.py
, I get an Exception right away. The decoded exception looks like this: https://gist.github.com/sillyfrog/1e66895dd9b3ed576d31514c7bcface2I have tried using both Arduino, and PlatformIO (each with their own checkout), and ensured all libraries are up to date.
Things appear to otherwise work OK, until you go to do an OTA update, and then things fall apart.
Happy to provide any more information you may need - and I feel I'm just doing something silly, but not sure where to start looking :/
Thanks in advance.
Cheers.
The text was updated successfully, but these errors were encountered: