logo elektroda
logo elektroda
X
logo elektroda

OpenBK7231N Flashing Issues: Safe Mode (AP mode) Activation After Full Reboot Failure

zdenekphilipp 1791 3
ADVERTISEMENT
  • #1 20743447
    zdenekphilipp
    Level 4  

    Hi, I'm new to this forum. So I flashed OpenBK7231N. After that, I configured pins according to this forum, restarted, and connected to the wifi. It works correctly. Next, I created an autoexec like this

    startDriver SHT3X
    SHT_Calibrate -2.7 0
    SHT_ClearStatus
    SHT_Measure
    SendGET http://192.168.0.222:80/sensor?temp=$CH2&hum=$CH3&bat=333
    DeepSleep 10


    So in this case, it stopped working and I still have a message. You are in safe mode (AP mode) because full reboot failed 5 times. Pins, relays, etc. are disabled.
    I tried to find something in https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md without result. Help me please
  • ADVERTISEMENT
  • #2 20743535
    p.kaczmarek2
    Moderator Smart Home
    Hello, your script is incorrect.

    It tries to do all operations in one frame and then puts the device to sleep for 10 seconds. It does not even wait for WiFi connection. It does not even wait for OBK to mark boot as valid.

    I think you would rather want to do:
    
    // start driver
    startDriver SHT3X
    //hold button for 3 seconds to get into safe mode
    addEventHandler OnHold 20 SafeMode 3
    // wait for wifi to become WIFI_STA_CONNECTED
    waitFor WiFiState 4
    Battery_Setup 2500 4200 2.29 2400 4096
    battery_measure
    publishFloat "voltage" $CH4/1000
    //publishFloat "battery" $CH4/25
    // extra wait
    delay_s 5
    // measure
    SHT_Measure
    // send data
    SendGET http://adres:port/czujnik1.php?temp=$CH2&wilg=$CH3&bat=$voltage
    // wait for GET to be sent
    delay_s 5
    // sleep for 120 seconds and then wake up (from blank state)
    DeepSleep 120
    

    See this post for script source:
    https://www.elektroda.com/rtvforum/topic3945688-180.html#20693161
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20743666
    zdenekphilipp
    Level 4  

    Thank you very much "lfs_format" this is the command that I have to know!
  • #4 20743836
    p.kaczmarek2
    Moderator Smart Home
    Helpful post? Buy me a coffee.
ADVERTISEMENT