No, it was a thought about how the Flag37 works and if having the flag active could be a cause leading to a incomplete firmware update.
Because i notice that when updating the firmware the reset was quick and each subsequent reset from the GUI was quick with an unscessful firmware update (still showing old version number) but when removing the device from the power point and holding the button down, the power cycle was long, no wifi light until a good 5secs after power on and the firmware update was successful (Version number updates & wifi light is configured WiFiLED_n).
Take it with a grain of salt, i'm software illiterate but hardware savy.
It does appear there is a pullup resistor on the V2 for the button that i can see in the photo's but I didn't fully trace out the circuit, RXD1 is connected to WiFiLED_n and TXD1 is connected to Btn. I can split another unit open if you want further details.
Well, I don't have this device at hand, but here's what can be inferred from your experience:
- the device fails to update unless button on TXD1 is hold
- TXD1 has also a pull up resistor, which means that TXD1 by default has a high state, unless a button is hold (then it's low)
I also know from my experience that I never had OTA failures on my devices, but they don't have a pull up resistor on TXD1.
I also know that, in OpenBeken, the Button role enables internal pull up on GPIO, so external resistor is not needed.
So here are two things to try:
- remove button role from TXD1 - is OTA still broken?
- remove the physical pull up resistor from TXD1 (don't worry, button will still work, due to programmable internal pull ups) - is OTA still broken?
If anyone can do these tests (and in a reliable way, several times, to make sure the test result is not a random fluke), please do! This will shed some light on the issue.
TLDR: it looks like a high state on TXD1 at reboot time breaks OTA?
Well, I don't have this device at hand, but here's what can be inferred from your experience:
- the device fails to update unless button on TXD1 is hold
- TXD1 has also a pull up resistor, which means that TXD1 by default has a high state, unless a button is hold (then it's low)
I also know from my experience that I never had OTA failures on my devices, but they don't have a pull up resistor on TXD1.
I also know that, in OpenBeken, the Button role enables internal pull up on GPIO, so external resistor is not needed.
So here are two things to try:
- remove button role from TXD1 - is OTA still broken?
- remove the physical pull up resistor from TXD1 (don't worry, button will still work, due to programmable internal pull ups) - is OTA still broken?
If anyone can do these tests (and in a reliable way, several times, to make sure the test result is not a random fluke), please do! This will shed some light on the issue.
TLDR: it looks like a high state on TXD1 at reboot time breaks OTA?
I can try with both version, I'll start with the originals first.
Is there any issues with downgrading and upgrading firmware repeatly?
I'm want to use these units for ceiling lights so this would be good to figure out before making them inaccessible.
At one certain point of time, about a week or two ago, we have updated config structure to version 4, so downgrading to much older version will bring back device to AP mode and clear config. This is the only downgrade risk I can think of.
At one certain point of time, about a week or two ago, we have updated config structure to version 4, so downgrading to much older version will bring back device to AP mode and clear config. This is the only downgrade risk I can think of.
I'll stay inside the version 4 config structure? It would make it easier not having to re-setup the device.
I'll go back a weeks release and then upgrade to current.
The config-breaking change (but only when downgrading! update is working correctly) happened on Apr 29, 2023. So if you want to test without losing config, avoid versions that were released in April.
Well, I don't have this device at hand, but here's what can be inferred from your experience:
- the device fails to update unless button on TXD1 is hold
- TXD1 has also a pull up resistor, which means that TXD1 by default has a high state, unless a button is hold (then it's low)
I also know from my experience that I never had OTA failures on my devices, but they don't have a pull up resistor on TXD1.
I also know that, in OpenBeken, the Button role enables internal pull up on GPIO, so external resistor is not needed.
So here are two things to try:
- remove button role from TXD1 - is OTA still broken?
- remove the physical pull up resistor from TXD1 (don't worry, button will still work, due to programmable internal pull ups) - is OTA still broken?
If anyone can do these tests (and in a reliable way, several times, to make sure the test result is not a random fluke), please do! This will shed some light on the issue.
TLDR: it looks like a high state on TXD1 at reboot time breaks OTA?
Annoyingly i'm unable to recreate the original issue with either Version 1 or Version 2.
Downgrading software 1.17.104 to 1.17.101, upgrading to 1.17.105 downgrading to 1.17.78 then upgrading to 1.17.105
Each time software change was successful.
There were no changes in OTA mechanism for a very long time. Maybe you have a different hardware or something. I have no idea, but OTA mechanism wasn't changed at all recently.
Thanks for the info tonyb62. I grabbed a series 2 from bunnings today and used tuya cloudcutter per your instructions to flash libretiny-esphome. Basic functions are working fine (button, led, relay), however I'm not getting anything from the BL0937. Can you confirm that you've tested energy metering with the pinout you have posted? (sel=6, cf=8, cf1=7) ?
Perhaps there is an issue with libretiny-esphome and this component (BL0937), though I've used it on other plugs with upstream esphome (on esp-based devices), perhaps I should try openbeken.
There is no need for guessing. Please flash OpenBeken and then use the Web App -> Flash tab to download current Tuya config partition so we know how BL0937 should be really configured. This will work for most of the devices and this will give you reliable template.
BK7231GUIFlashTool can easily extract CFG from Tuya Config and OpenBeken does not overwrite it.
Thanks for the info tonyb62. I grabbed a series 2 from bunnings today and used tuya cloudcutter per your instructions to flash libretiny-esphome. Basic functions are working fine (button, led, relay), however I'm not getting anything from the BL0937. Can you confirm that you've tested energy metering with the pinout you have posted? (sel=6, cf=8, cf1=7) ?
Perhaps there is an issue with libretiny-esphome and this component (BL0937), though I've used it on other plugs with upstream esphome (on esp-based devices), perhaps I should try openbeken.
Thanks,
Dave
I created a separate thread for the V2 - https://www.elektroda.com/rtvforum/topic3976320.html I do have the BL0937 reporting current. This is stats shown from my drier. I am using openbeken on all my BK7231N & BK7231T devices.