logo elektroda
logo elektroda
X
logo elektroda

Recovering OpenBK7231T from Wrong SSID/PW: Step-by-Step Recovery Mode Flash Guide

snhstq 3321 10
ADVERTISEMENT
  • #1 20211717
    snhstq
    Level 7  
    Hi all,

    I have entered a wrong SSID or PW on my OpenBk7231T. It is now bricked.
    I know I was clearly warned to check it twice, but with a dyslexia view I missed the typo. :(

    Reading the forum it suggests doing a 'recovery mode flash' without further details.
    Is this an SPI flash with a QIO bin file?
    I tried it with a re-flash of the UA file, but no luck.
    What is the best procedure to recover from a wrong SSID/PW?

    Many Thanks!
    Regards Henk
  • ADVERTISEMENT
  • Helpful post
    #2 20213590
    p.kaczmarek2
    Moderator Smart Home
    Hello, recovering from a bad WiFi credentials is very simple.
    Just do a five or more fast power on/off cycles and devices will return to AP mode.
    New reflash is not required.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20214619
    snhstq
    Level 7  
    Hi p.kaczmarek2,

    Thanks for your reply!
    I tried it and I got it in [SAFE] mode, but still no AP access.
    The AP id is broadcast and then it dies. I am afraid that I meshed up the lfs and config file completely with all my debugging attempts. :-(

    How can I reset/init the device to 'factory default'? Flash memory completely cleared except the bootloader?

    Thanks!
    Regards Henk

    p.s. I can update src, build and load UA.bin files
  • ADVERTISEMENT
  • #4 20214836
    p.kaczmarek2
    Moderator Smart Home
    Do you have access to full log output, so we know what's happening?
    Helpful post? Buy me a coffee.
  • #5 20214910
    snhstq
    Level 7  
    Hi p.kaczmarek2,

    Thanks for your quick reply.

    I have attached 4 boot logs of:
    - OpenAP demo
    - Scan network demo
    - OpenBk normal & safe loot logs.

    I have no idea how to access any log files inside the littlefs.
    Please provide instruction on how to do that.

    Regards Henk
  • #6 20214944
    p.kaczmarek2
    Moderator Smart Home
    snhstq wrote:

    The AP id is broadcast and then it dies.

    Can you show your device, the detailed photos from the inside, so I can check whether your device is a TuyaMCU/battery-powered sensor?

    Some of the devices have a TuyaMCU controlling things and the MCU only enables the WiFi module for 30 or 60 seconds and then turns off the WiFi module. This is why people say "AP id is broadcast and then it dies".
    Helpful post? Buy me a coffee.
  • #7 20215027
    snhstq
    Level 7  
    Hi,

    >> whether your device is a TuyaMCU/battery-powered sensor.
    I can't find any battery.

    I have attached the top / bottom/ 4 corner pictures of the unit.

    Regards, Henk
  • #8 20215066
    p.kaczmarek2
    Moderator Smart Home
    What happens after that?
    
    Info:MAIN:[SAFE] Time 32, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 33, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 34, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 35, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 36, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 37, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 38, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 39, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    sta: 0, softap: 1, b/g/n
    softap:ssid=OpenBK7231T_01280102,channel=1,dhcp=1,cipher_type:OPEN
    Info:MAIN:[SAFE] Time 40, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=00:00:00:00:00:00
    
    Info:GEN:ip=192.168.4.1,gate=255.255.255.255,mask=255.255.255.0,dns=192.168.4.1
    
    Info:MAIN:[SAFE] Time 41, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 42, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 43, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 44, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 45, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    
    Info:MAIN:[SAFE] Time 46, free 101608, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 5/38
    

    Is the timer still going up, 47, 48, etc , or does the UART go silent (device dies)?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 20215088
    snhstq
    Level 7  
    Hi,

    The timer still goes on forever. (I just stop the trace after 35 sec when the ####### Set Boot Complete ####### message is displayed)

    Regards, Henk
  • #10 20217482
    snhstq
    Level 7  
    Hi p.kaczmarek2,

    Found the problem.
    When OpenAP is started, it is set in ADHOC mode and not in INFRASTRUCTURE mode.

    It must be a config setting, probably saved somewhere in flash.
    I have not found a way to correct this.

    Do you have any idea?

    Regards Henk
  • #11 20218295
    p.kaczmarek2
    Moderator Smart Home
    I have never experienced this issue so far. How have you determined what is wrong?

    Here are WiFi functions:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/hal/bk7231/hal_wifi_bk7231.c
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around recovering an OpenBK7231T device that has been bricked due to incorrect SSID or password entry. The initial suggestion to perform multiple power cycles to revert to AP mode was attempted but did not yield access. The user expressed concerns about potential corruption of the LFS and configuration files. Further inquiries included how to reset the device to factory defaults and access log files for troubleshooting. Responses included requests for detailed logs and device photos to diagnose the issue, with a focus on whether the device operates in ADHOC or INFRASTRUCTURE mode, which could affect WiFi connectivity.
Summary generated by the language model.
ADVERTISEMENT