logo elektroda
logo elektroda
X
logo elektroda

NiceMCU XH-WB3S BK7238 Flashing, Testing, Pinout, Development, Porting

divadiow 6597 223
ADVERTISEMENT
  • Helpful post
    #91 21386586
    insmod
    Level 23  
    >>21386560 Doesn't build. If replace SOC_BK7231 with SOC_BK7231U (like in LT), then it builds but throws a lot of undefined references, mainly bt or wolfssl ones.

    Added after 39 [minutes]:

    This sdk boots: https://github.com/tiancj/bdk_freertos
    But, it doesn't support BK7238 and there is no config for T (but, it can be taken from LT source)
    All in all, bk7231u is very rare, so i don't see a reason to port it.
  • ADVERTISEMENT
  • #92 21387784
    insmod
    Level 23  
    LibreTiny works, since it uses this sdk.
    But, it can only be flashed with rbl, since setting bkcrypt_coeffs to zeroes throws this:
    
    |-- ValueError: non-hexadecimal number found in fromhex() arg at position 1
    |   |-- File "/root/.platformio/penv/.libretiny/lib/python3.11/site-packages/ltchiptool/soc/bk72xx/util/binary.py", line 36, in __init__


    LT must be built as BK7231T with additional platformio_options:
    esphome:
      name: bk7231u-test
      friendly_name: bk7231u_test
      platformio_options:
        #board_build.bkcrypt_coeffs: 00000000000000000000000000000000
        board_build.bkboot_version: "0.1.4-bk7231u"
        board_build.mcu: "bk7231u"

    (board_build.mcu can probably be skipped, and bkboot_version can be set to anythigs but default for T "1.0.5-bk7231s", since that would include T-specific LT fix, which would prevent it from working)
  • #93 21387797
    p.kaczmarek2
    Moderator Smart Home
    It would be nice if we could also support it, but it's not very popular as you said, so it depends how hard it would be for you.

    I've merged the build defines PR, so please update your forks from main if you can. It should not be too problematic. And now I'm improving start commandline so it can take scripts to be run via scripting system. I'm also making W800 and W600 usable, I'll be merging my next PR soon.
    Helpful post? Buy me a coffee.
  • #95 21387801
    insmod
    Level 23  
    >>21387797 Already done.
    Additionally about BK7231N with new sdk - ota with powersave enabled crashes the device or something, it even ceases to respond to physical keys - reset is needed.
  • ADVERTISEMENT
  • #96 21387808
    p.kaczmarek2
    Moderator Smart Home
    I have cc8000 if that's needed. I could try to help somehow, altough I'm doing misc/W800 stuff now:
    Code editor screen showing changes in the http_fns.c file.
    Which board will I be able to add there next? Hopefully NiceMCU:
    Four breadboards with microcontrollers and components on a wooden table.

    Added after 45 [seconds]:

    EDIT: Maybe we could just hardcode OTA to stop powersave.
    Helpful post? Buy me a coffee.
  • #97 21387813
    insmod
    Level 23  
    I also encountered a very interesing "conflict". My cc8000 mac and my BK7231N bulb are identical
    Next is nicemcu.
    If BK7231T rbl is flashed on my cc8000, then it would print one string and hang. Same problem was on LT, until i changed bkboot_version, so it wouldn't define CFG_SUPPORT_BOOTLOADER and compile boot_handlers_105_bk7231s.S

    Edited, removed macs, and they are actually identical.
  • #98 21440151
    p.kaczmarek2
    Moderator Smart Home
    Is DHT11 working on BK7238?
    Screenshot of error messages related to the DHT sensor on pin 22.
    Tried both P15 and P22
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #99 21440156
    insmod
    Level 23  
    >>21440151 Need to implement delay_us, because current n/t are for 120mhz.
    BK7238 freq is 160mhz. Just take it from arduino, there is no need to guess how many nops are needed.
  • #100 21440247
    p.kaczmarek2
    Moderator Smart Home
    I've did a naive fix and it works:
    https://github.com/openshwprojects/OpenBK7231...mmit/e88875a458661aeb1d8e7184520e9e6319452266
    I think I'd rather need to fix usleep itself but I had trouble finding it in:
    https://github.com/NonPIayerCharacter/OpenBK7238_asdk
    Or maybe it's just in binary blob?
    Helpful post? Buy me a coffee.
  • #101 21441011
    insmod
    Level 23  
    >>21440247
    I did post the code here earlier: https://www.elektroda.com/rtvforum/topic4092465.html#21302728
    This can even be adapted to N.
    Will require this first: https://github.com/NonPIayerCharacter/beken_f...ob/master/beken378/driver/calendar/calendar.c
    Probably won't work for T though, driver is activated only for N and 7238: https://github.com/NonPIayerCharacter/beken_f...k/blob/master/beken378/driver/common/dd.c#L80

    Added after 9 [hours] 17 [minutes]:

    Backported from new sdk to N, delay works good.
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1538
    Stopped using old gcc and disabled debug symbols, last release ota image is 497488 bytes, new one is 473136 bytes. 24 352 bytes less, so almost 24kb saved.
    And since time_t in new gcc is 64bit, defined it in app to uint32_t. That prevented flashvars problem like in the initial bk7238 port.
  • #102 21441495
    p.kaczmarek2
    Moderator Smart Home
    Thank you, any toughts on the accuracy of the new delay? From what I can tell, Calendar driver is a hardware timer, so it should be more precise, but again, there is an overhead for function calls etc, so I would guess it will be much better than previous delay version, but only for relatively longer delays?
    Helpful post? Buy me a coffee.
  • #103 21441514
    insmod
    Level 23  
    >>21441495 I tried 5ms, 8ms, 10ms, 50ms and 100ms in ds1820 driver.
    5ms reported 4ms without ps and 6 with ps. Everything else, tested without ps matched perfectly.
  • #104 21442351
    max4elektroda
    Level 20  
    Hope it's o.k. if I report here and not in the Bluetooth Gateway/CR3L thread:

    Sadly my tests with DS18B20 and the new timing from PR#1538 where not successful on Beken-N :-(.
    Delay is working "o.k." with the old delay(s), but not with "HAL_Delay_us()".

    Even if I only use one delay (not the three short/medium/long) timing is working, but not with the new delay.

    For testing I simply changed the #if to "PLATFORM_BK7231T" so it should use "HAL_Delay_us(r);" for BK7231N.

    Here the code, maybe I missed something?
    
    // usleep adopted from DHT driver
     void OWusleep(int r)
     {
     #ifdef WIN32
        // not possible on Windows port
    -#elif PLATFORM_BEKEN
    +#elif PLATFORM_BK7231T
        float adj = 1;
        if(g_powersave) adj = 1.5;
        usleep((17 * r * adj) / 10); // "1" is to fast and "2" to slow, 1.7 seems better than 1.5 (only from observing readings, no scope involved)
     #else
        HAL_Delay_us(r);
     #endif
     }
    
  • #105 21442774
    insmod
    Level 23  
    >>21442351 I just tried to test mine, and it works. But, there are still some "read reset failed".
    Sometimes it will get data after only one of those, sometimes only after ~10. But what is this first reading?
    Debug:API:POST to api/cmnd
    Debug:CMD:cmd [startdriver ds1820]
    Info:MAIN:Started ds1820.
    Info:CMD:[WebApp Cmd 'startdriver ds1820' Result] OK
    Info:SENSOR:DS1820[7] - Discover Family - discovered 28
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 48, idle 193315/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 49, idle 185809/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 50, idle 196047/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 51, idle 188523/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 52, idle 190942/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 53, idle 193540/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=10880, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=85.00
    Info:MAIN:Time 54, idle 189578/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 55, idle 378261/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 56, idle 191041/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 57, idle 191093/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 58, idle 188706/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 59, idle 379119/s, free 77568, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 60, idle 193309/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 61, idle 187782/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 62, idle 193388/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3136, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.50
    Info:MAIN:Time 63, idle 187604/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 64, idle 189103/s, free 69176, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 65, idle 193075/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 66, idle 188259/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 67, idle 191709/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 2, socks 2/38 
    Info:MAIN:Time 68, idle 189787/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 3, socks 2/38 
    Info:MAIN:Time 69, idle 188117/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 4, socks 2/38 
    Info:MAIN:Time 70, idle 189405/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 5, socks 2/38 
    Info:MAIN:Time 71, idle 191669/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 6, socks 2/38 
    Info:MAIN:Time 72, idle 189410/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 7, socks 2/38 
    Info:MAIN:Time 73, idle 189096/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 8, socks 2/38 
    Info:MAIN:Time 74, idle 381571/s, free 77568, MQTT 1(6), bWifi 1, secondsWithNoPing 9, socks 3/38 
    Info:MAIN:Time 75, idle 572482/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 10, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 76, idle 762924/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 11, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 77, idle 952135/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 12, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 78, idle 192057/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 13, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 79, idle 188591/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 14, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 80, idle 197211/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 15, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 81, idle 185913/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 16, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 82, idle 379122/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 17, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3136, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.50
    Info:MAIN:Time 83, idle 192673/s, free 69400, MQTT 1(6), bWifi 1, secondsWithNoPing 18, socks 3/38 
    Info:MAIN:Time 84, idle 186696/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 19, socks 2/38 
    Info:MAIN:Time 85, idle 377533/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 20, socks 2/38 
    Info:MAIN:Time 86, idle 193466/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 21, socks 2/38 
    Info:MAIN:Time 87, idle 188678/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 22, socks 2/38 
    Info:MAIN:Time 88, idle 189030/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 23, socks 2/38 
    Info:MAIN:Time 89, idle 191516/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 24, socks 2/38 
    Info:MAIN:Time 90, idle 189758/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 25, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 91, idle 189778/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 26, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 92, idle 195558/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 27, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3120, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.37
    Info:MAIN:Time 93, idle 191454/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 28, socks 2/38 
    Info:MAIN:Time 94, idle 186261/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 29, socks 2/38 
    Info:MAIN:Time 95, idle 190660/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 30, socks 2/38 
    Info:MAIN:Time 96, idle 187648/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 31, socks 2/38 
    Info:MAIN:Time 97, idle 191730/s, free 68784, MQTT 1(6), bWifi 1, secondsWithNoPing 32, socks 3/38 
    Info:MAIN:Time 98, idle 189809/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 33, socks 2/38 
    Info:MAIN:Time 99, idle 191439/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 34, socks 2/38 
    Info:MAIN:Time 100, idle 193029/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 35, socks 2/38 
    Info:MAIN:Time 101, idle 384106/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 36, socks 2/38 
    Info:MAIN:Time 102, idle 187751/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 37, socks 2/38 
    Info:MAIN:Time 103, idle 187654/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 38, socks 2/38 
    Info:MAIN:Time 104, idle 191350/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 39, socks 2/38 
    Info:MAIN:Time 105, idle 191090/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 40, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 106, idle 188096/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 41, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 107, idle 194403/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 42, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 108, idle 191514/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 43, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 109, idle 188459/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 44, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 110, idle 376133/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 45, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 111, idle 189876/s, free 69176, MQTT 1(6), bWifi 1, secondsWithNoPing 46, socks 3/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 112, idle 188583/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 47, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 113, idle 191730/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 48, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 114, idle 190629/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 49, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 115, idle 189474/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 50, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 116, idle 194757/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 51, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 117, idle 388272/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 52, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 118, idle 187987/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 53, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 119, idle 193854/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 54, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3120, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.37
    Info:MAIN:Time 120, idle 190952/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 55, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 121, idle 187377/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 56, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 122, idle 192055/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 57, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3120, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.37
    Info:MAIN:Time 123, idle 186822/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 58, socks 2/38 
    Info:MAIN:Time 124, idle 188121/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 59, socks 2/38 
    Info:MAIN:Time 125, idle 193480/s, free 69176, MQTT 1(6), bWifi 1, secondsWithNoPing 60, socks 3/38 
    Info:MAIN:Time 126, idle 190295/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 61, socks 2/38 
    Info:MAIN:Time 127, idle 195664/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 62, socks 2/38 
    Info:MAIN:Time 128, idle 191708/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 63, socks 2/38 
    Info:MAIN:Time 129, idle 188934/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 64, socks 2/38 
    Info:MAIN:Time 130, idle 192865/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 65, socks 2/38 
    Info:MAIN:Time 131, idle 188019/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 66, socks 2/38 
    Info:MAIN:Time 132, idle 189758/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 67, socks 2/38 
    Info:MAIN:Time 133, idle 186040/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 68, socks 2/38 
    Info:MAIN:Time 134, idle 193446/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 69, socks 2/38 
    Info:MAIN:Time 135, idle 186655/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 70, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 136, idle 192044/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 71, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 137, idle 387777/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 72, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 138, idle 577706/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 73, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3112, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.31
    Info:MAIN:Time 139, idle 191241/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 74, socks 2/38 
    Info:MAIN:Time 140, idle 188239/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 75, socks 2/38 
    Info:MAIN:Time 141, idle 187732/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 76, socks 2/38 
    Info:MAIN:Time 142, idle 191689/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 77, socks 2/38 
    Info:MAIN:Time 143, idle 190090/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 78, socks 2/38 
    Info:MAIN:Time 144, idle 188292/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 79, socks 2/38 
    Info:MAIN:Time 145, idle 188485/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 80, socks 2/38 
    Info:MAIN:Time 146, idle 190890/s, free 69400, MQTT 1(6), bWifi 1, secondsWithNoPing 81, socks 3/38 
    Info:MAIN:Time 147, idle 188120/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 82, socks 2/38 
    Info:MAIN:Time 148, idle 375828/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 83, socks 2/38 
    Info:MAIN:Time 149, idle 192557/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 84, socks 2/38 
    Info:MAIN:Time 150, idle 188877/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 85, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 151, idle 202450/s, free 69176, MQTT 1(6), bWifi 1, secondsWithNoPing 86, socks 3/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 152, idle 189091/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 87, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 153, idle 192871/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 88, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 154, idle 384163/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 89, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 155, idle 192757/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 90, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 156, idle 187609/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 91, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3104, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.25
    Info:MAIN:Time 157, idle 191214/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 92, socks 2/38 
    Info:MAIN:Time 158, idle 189986/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 93, socks 2/38 
    Info:MAIN:Time 159, idle 201830/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 94, socks 2/38 
    Info:MAIN:Time 160, idle 190822/s, free 69176, MQTT 1(6), bWifi 1, secondsWithNoPing 95, socks 3/38 
    Info:MAIN:Time 161, idle 189917/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 96, socks 2/38 
    Info:MAIN:Time 162, idle 189993/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 97, socks 2/38 
    Info:MAIN:Time 163, idle 189838/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 98, socks 2/38 
    Info:MAIN:Time 164, idle 192188/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 99, socks 2/38 
    Info:MAIN:Time 165, idle 188519/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 100, socks 2/38 
    Info:SENSOR:DS1820[7] - Starting conversion
    Info:MAIN:Time 166, idle 188960/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 101, socks 2/38 
    Error:SENSOR:DS1820[7] - Read Reset failed
    Info:MAIN:Time 167, idle 189565/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 102, socks 2/38 
    Debug:SENSOR:DS1820[7] - family=28, raw=3096, cfg=60 (12 bit resolution)
    Info:SENSOR:DS1820[7] - Temp=24.18
    Info:MAIN:Time 168, idle 189358/s, free 77384, MQTT 1(6), bWifi 1, secondsWithNoPing 103, socks 3/38 
    Info:MAIN:Time 169, idle 184971/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 104, socks 2/38 
    Info:MAIN:Time 170, idle 194293/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 105, socks 2/38 
    Info:MAIN:Time 171, idle 381805/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 106, socks 2/38 
    Info:MAIN:Time 172, idle 193122/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 107, socks 2/38 
    Info:MAIN:Time 173, idle 191074/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 108, socks 2/38 
    Info:MAIN:Time 174, idle 190147/s, free 77808, MQTT 1(6), bWifi 1, secondsWithNoPing 109, socks 2/38 

    DHT11 works without problems.
  • #106 21442808
    p.kaczmarek2
    Moderator Smart Home
    1538_merge_0cfb7dd92c18 on CB3S:
    Screenshot of OBK_DevBoard_CB3S user interface showing temperature, humidity, and pressure data, along with LED control options.
    1538_merge_0cfb7dd92c18 on NiceMCU:
    Screenshot of OpenBK7238 control panel with sensor data and settings.
    DS18B20 is not working, what's wrong with NTP?
    I'm sure NTP worked few days before: https://www.elektroda.com/rtvforum/topic4106397.html
    Probably strtotime expects 64 bit and gets 32 bit?
    1.18.42 NiceMCU:
    OpenBK7238_8C10262A user interface displaying sensor temperature and humidity data.
    It seems DS18B20 does not work on NiceMCU for me yet, not in release and neither in pr. Still, I need to triple-check my connections.

    Added after 3 [minutes]:

    
    Error:SENSOR:DS1820[17] - Family not discovered
    

    P17 NiceMCU
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #107 21442812
    insmod
    Level 23  
    >>21442808 If "Family not discovered", then DS18B20 gets detected, but one of the changes for the driver stopped work for some fake sensors, even if they worked before.
    It seems i will need to remove time_t define, and only use it for flashvars.

    Added after 12 [minutes]:

    Fix uploaded, should also attempt to continue if ds18b20 family is not discovered.
  • #108 21442816
    p.kaczmarek2
    Moderator Smart Home
    insmod wrote:
    >>21442808 If "Family not discovered", then DS18B20 gets detected, but one of the changes for the driver stopped work for some fake sensors, even if they worked before.

    I am testing with a single DS18B20 batch from Aliexpress and it's not working only on NiceMCU, but let me retry.

    I'll add screenshots in a moment.

    Added after 13 [minutes]:

    1538_merge_331bfab0a8a5 NiceMCU:
    OpenBK7238_8C10262A user interface screenshot showing sensor information.
    
    Info:MAIN:Time 225, idle 0/s, free 122424, MQTT 0(14), bWifi 1, secondsWithNoPing 159, socks 2/20 
    Info:SENSOR:DHT start, pin is 22
    Error:SENSOR:DS1820[17] - Family not discovered, but continuing anyway
    Info:SENSOR:DS1820[17] - Starting conversion
    Info:MAIN:Time 226, idle 0/s, free 122424, MQTT 0(14), bWifi 1, secondsWithNoPing 160, socks 2/20 
    Error:SENSOR:DS1820[17] - Read Reset failed
    Info:MAIN:Time 227, idle 0/s, free 122424, MQTT 0(14), bWifi 1, secondsWithNoPing 161, socks 2/20 
    Error:SENSOR:DS1820[17] - Read CRC=ff != calculated:c9 (errcount=1)
    Error:SENSOR:DS1820[17] - Scratchpad Data Read: ff ff ff ff ff ff ff ff ff
    Info:MAIN:Time 228, idle 0/s, free 122424, MQTT 0(14), bWifi 1, secondsWithNoPing 162, socks 2/20 
    Info:SENSOR:DHT start, pin is 22
    Error:SENSOR:DS1820[17] - Read CRC=ff != calculated:c9 (errcount=2)
    Error:SENSOR:DS1820[17] - Scratchpad Data Read: ff ff ff ff ff ff ff ff ff
    Info:MAIN:Time 229, idle 0/s, free 122424, MQTT 0(14), bWifi 1, secondsWithNoPing 163, socks 2/20 
    Error:SENSOR:DS1820[17] - Read CRC=ff != calculated:c9 (errcount=3)
    Error:SENSOR:DS1820[17] - Scratchpad Data Read: ff ff ff ff ff ff ff ff ff
    Error:SENSOR:DS1820[17] - Read CRC=ff != calculated:c9 (errcount=4)
    Error:SENSOR:DS1820[17] - Scratchpad Data Read: ff ff ff ff ff ff ff ff ff
    Info:MAIN:Time 231, idle 0/s, free 130728, MQTT 0(14), bWifi 1, secondsWithNoPing 165, socks 2/20 
    Info:SENSOR:DHT start, pin is 22
    Info:GEN:No change in channel 6 (still set to 226) - ignoring
    
    Info:GEN:No change in channel 7 (still set to 39) - ignoring
    Error:SENSOR:DS1820[17] - Read CRC=ff != calculated:c9 (errcount=6)
    Error:SENSOR:DS1820[17] - Scratchpad Data Read: ff ff ff ff ff ff ff ff ff
    

    1538_merge_331bfab0a8a5 CB3S:
    first read:
    Screenshot of the OBK_DevBoard_CB3S user interface displaying sensor readings and configuration options.
    next:
    Screenshot of the OBK_DevBoard_CB3S interface showing temperature and humidity data.

    When I swap DS18B20s, it still work with CB3S. I also swapped resistors. Still, NiceMCU can't read.

    Electronic circuit on a breadboard with a NiceMCU module and several wires.
    Electronic circuit on a breadboard with a NiceMCU module and temperature sensors.
    Maybe I will attempt to check with scope, if I'll manage to get enough free time. I'm still not sure if it's not just a human error, but I triple checked on P15 and P17 (on photo and screenshot).
    Helpful post? Buy me a coffee.
  • #109 21443290
    max4elektroda
    Level 20  
    I tried again with the PR and BK7238 this time - I can't get DS1820 running while DHT11 runs fine.

    I made a simple testing command and if I didn't make a mistake the results show, why it doesn't work:

    This test was "testus 17 5 2 4 6 10 20 50 100 200 500", which should set pin 17 to low for 2, 4, 6, 10, ... 500 us.

    The result for the first test 2us e.g. was over 120us according to the analyzer, but that's probably due to loading the code (it can also be seen on other platforms).
    But if you compare the values 3 4 5 (which should be 6 10 and 20 us), there is no visible difference.

    Screenshot from a logic analyzer showing signal waveforms on D6 and D7.
    Some "measured" values: 58us for 6, 58us for 10, 57us for 20, 126us for 100 and 522us for 500

    The same test on a W800:

    Logic signal waveform graph from an analyzer
    The first test is also longer than the following ones, but after that you can see the length seems good related to the numbers
    (measured 5us for 4, 10.6us for 10, 20,5us for 20 .. and 497 for 500)

    The used code, maybe there is something wrong?!?:
    
    diff --git a/src/driver/drv_ds1820_simple.c b/src/driver/drv_ds1820_simple.c
    index 14030b56..a60a362a 100644
    --- a/src/driver/drv_ds1820_simple.c
    +++ b/src/driver/drv_ds1820_simple.c
    @@ -280,11 +280,63 @@ int DS1820_getTemp()
        return t;
     }
     
    +
    +// will allow testus <pin> <us between tests> <us val 1> <us val 2> .... 
    +commandResult_t CMD_OW_testus(const void *context, const char *cmd, const char *args, int cmdFlags) {
    +   Tokenizer_TokenizeString(args, TOKENIZER_ALLOW_QUOTES);
    +   int tests= Tokenizer_GetArgsCount()-2;   // first two are pin and pause-value
    +   if(Tokenizer_GetArgsCount()<=3) {
    +      return CMD_RES_NOT_ENOUGH_ARGUMENTS;
    +   }
    +#define MAXUSTESTS 10
    +   int testvals[MAXUSTESTS];
    +   int pin = Tokenizer_GetArgInteger(0);
    +   int pause = Tokenizer_GetArgInteger(1);
    +   if (tests > MAXUSTESTS){
    +      tests > MAXUSTESTS;
    +      DS1820_LOG(INFO, "testus -  Warning, will only do the first %i tests!\r\n",tests);
    +   } 
    +   for (int i=0; i<tests; i++){
    +      testvals[i]=Tokenizer_GetArgInteger(2+i);
    +   }
    +   DS1820_LOG(DEBUG, "testus - pin=%i pause=%i tests=%i ...",pin,pause,tests);
    +   for (int i=0; i<tests; i++){
    +      DS1820_LOG(DEBUG, "test %i value=%i ...",i,testvals[i]);
    +   }
    +   DS1820_LOG(DEBUG, "\r\n starting tests ...");
    +
    +   HAL_PIN_SetOutputValue(pin, 1);
    +   HAL_PIN_Setup_Output(pin);
    +   HAL_PIN_SetOutputValue(pin, 1);
    +   // at least on BK7238 HAL_PIN_Setup_Output(pin) will set pin LOW first, even if HAL_PIN_SetOutputValue(pin, 1); was called before
    +   // so to have a clear defined tes, do a long delay before the actual tests (we could also ignore the first change, but if it's different on other platforms...)
    +   vTaskDelay(200);
    +   for (int i=0; i<tests; i++){
    +      noInterrupts();
    +      HAL_PIN_SetOutputValue(pin, 0);
    +      usleepds(testvals[i]);
    +      HAL_PIN_SetOutputValue(pin, 1);
    +      interrupts();
    +      usleepds(pause);
    +   }
    +   DS1820_LOG(DEBUG, "... tests done\r\n");
    +   return CMD_RES_OK;
    +}
    +
    +
     // startDriver DS1820 [conversionPeriod (seconds) - default 15]
     void DS1820_driver_Init()
     {
        ds18_conversionPeriod = Tokenizer_GetArgIntegerDefault(1, 15);
        lastconv = 0;
    +
    +#include "../cmnds/cmd_public.h"
    +
    +   //cmddetail:{"name":"testus","args":"pin <pause in us> <testval 1 in us> [<testval n in us>...]",
    +   //cmddetail:"descr":"tests usleep on given pin ",
    +   //cmddetail:"fn":"NULL);","file":"driver/drv_ds1820_simple.c","requires":"",
    +   //cmddetail:"examples":"testus 11 5 2 4 6 10 20 50 100 200 500"}
    +   CMD_RegisterCommand("testus", CMD_OW_testus, NULL);
     };
     
     void DS1820_AppendInformationToHTTPIndexPage(http_request_t* request)
  • #110 21483339
    divadiow
    Level 34  
    this exists. tuya kit
    Code: Text
    Log in, to see the code
  • Helpful post
    #111 21507214
    insmod
    Level 23  
    BK7231U incoming...
    And with it, probably BK7231T with new sdk.
    And all i had to do, was to comment out one line that was added in v3.0.56.
    OpenBK7231U user interface with system information and buttons.
    @p.kaczmarek2 did you check https://github.com/openshwprojects/OpenBK7231T_App/pull/1297 ?
    It contains PSK connecting, that was 'fixed up' and now behind a flag. More info in comment: https://github.com/openshwprojects/OpenBK7231T_App/pull/1297#issuecomment-2761705960
    One question though, why HAL_DisconnectFromWifi is called in WIFI_STA_DISCONNECTED handler? It changed nothing when i removed it, but fixed occasional realtek crashes for me.
  • #112 21507236
    p.kaczmarek2
    Moderator Smart Home
    Great news! What was the single line fix? Is BK7231U that CC8000 chip? I think so. I may still have this module.

    insmod wrote:

    And with it, probably BK7231T with new sdk.

    With SPI DMA driver for LEDs, maybe? I've ordered some more WS2812 clones recently (RGBW as well) and I am going to extend OBK to support them as well.

    insmod wrote:

    @p.kaczmarek2 did you check https://github.com/openshwprojects/OpenBK7231T_App/pull/1297 ?
    It contains PSK connecting, that was 'fixed up' and now behind a flag. More info in comment: https://github.com/openshwprojects/OpenBK7231T_App/pull/1297#issuecomment-2761705960

    I can merge it right away if you can confirm that it works. This is a strongly desired change for battery-powered devices. Maybe @divadiow can check. Or I can try to check soon as well myself.

    However... there may be one thing I'd request to be changed.
    That part:
    A section of technical documentation related to PowerSave command support on Beken devices.
    Is RF only or MCU only sleep possible for other platforms as well? Because we're already starting to have per-platform PowerSave syntax.
    Wouldn't it be better to move on to some better syntax that can be more meaningful and just print "not supported" message if it's not available on current platform?
    Something like "PowerSave MCU", "PowerSave MCURF", "PowerSave RF", but of course only add the necessary ones. And don't break compatibility with older syntax, just don't introduce arguments meaning different things per platform.

    Interestingly enough, I remember that original BK7231N SDK had this feature enabled. I know this because it was overwriting the same area where OBK config is in. It was the first bug I had to fix after porting to BK7231N back in the days.

    insmod wrote:

    One question though, why HAL_DisconnectFromWifi is called in WIFI_STA_DISCONNECTED handler? It changed nothing when i removed it, but fixed occasional realtek crashes for me.

    Maybe it originates from here? HAL_DisconnectFromWifi https://github.com/openshwprojects/OpenBK7231T_App/issues/1246
    I'm not sure.

    Currently I'm focusing on Berry integration, and so far I got some useful features covered, like change handlers, TuyaMCU events, and I'm even able to parse TuyaMCU data with it. Still, Berry integration is still very early and most likely have at least one serious design error because I'm calling Berry directly from event handler, and if event handler is called from nested function, then stack may run out very quickly. I may introduce events queue for berry soon.
    Helpful post? Buy me a coffee.
  • #113 21507260
    insmod
    Level 23  
    >>21507236 Yes, i'm using a CC8000 module (HLK-B30).
    SPI DMA is not implemented for new sdk in OBK, and driver syntax should be more close to T than N (in tuya sdks).

    Regarding power save, i think most complex one is for ESP. Up to 4 arguments.
    First is default power save(esp_wifi_set_ps), if 1 - WIFI_PS_MIN_MODEM, 2 - WIFI_PS_MAX_MODEM. 0 is WIFI_PS_NONE.
    Second is TX power in dBm.
    Third and fourth is min frequency and max frequency respectively.
    And while powersave for realtek is only 1 argument, in RTL8710B powersave 2 reduces frequency by half, and 3 by quarter.
    So, we need 2 more commands? For powersave, make argument 1 for RF, argument 2, if possible, for MCU. One is for TX power, and another for frequency selection.

    I just replaced line https://github.com/NonPIayerCharacter/beken_f...001d32b6/beken378/func/misc/start_type.c#L249 with #if 0.

    Unfortunately, if i press restart or reset power on U, reboot reason is always pin interrupt.

    HAL_DisconnectFromWifi in handler is much older, added here: https://github.com/openshwprojects/OpenBK7231...mmit/4b75cf4202b745b5cefbf1652ec798ab5335ead6
  • #114 21507930
    divadiow
    Level 34  
    could I trouble you for the U file please? I don't see it in the either workflows...
  • #116 21507945
    divadiow
    Level 34  
    thank you

    Added after 5 [hours] 37 [minutes]:

    nice
    Screenshot of the OpenBK7231U device user interface with system information.

    QIO bit-banged to HLK-B30. log from D12
    Code: Text
    Log in, to see the code


    Added after 6 [minutes]:

    insmod wrote:
    Unfortunately, if i press restart or reset power on U, reboot reason is always pin interrupt.

    did you fix this? I always have Pwr or Rbt
  • #117 21508392
    insmod
    Level 23  
    >>21507945 I did, you can check latest sdk commit, fix is in beken378/driver/sys_ctrl/sys_ctrl.c, taken from T sdk.
    Builds for T, N and U with new sdk are here: https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/14284132899/attempts/1
    I don't know if bl0937 will work ok with T, because i was unable to fix it for N. Voltage readings are still wonky, with occasional spikes over 20 kV.

    Is your device alive after reboot with new bootloader? Does OTA work? I remember that on N with new bootloader it completely died after reboot, wouldn't work until reflash.
  • #118 21508500
    divadiow
    Level 34  
    with original V(0.1.4) I have flashed BK7231U to 0x11000 using EF
    Screen showing firmware flash success in BK7231 Easy UART Flasher tool.

    OTA appears to work still:

    Spoiler:
    [Flash]id:0x1c7015
    --write status reg:34,1--
    [Flash]init over
    --write status reg:0,1--
    Info:OTA:init OTA, startaddr 0x132000
    Info:OTA:132000
    Info:OTA:133000
    Info:OTA:134000
    Info:OTA:135000
    Info:OTA:136000
    Info:OTA:137000
    Info:OTA:138000
    Info:OTA:139000
    Info:OTA:13a000
    Info:OTA:13b000
    Info:OTA:13c000
    Info:OTA:13d000
    Info:OTA:13e000
    Info:OTA:13f000
    Info:OTA:140000
    Info:MAIN:Time 59, idle 0/s, free 73544, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/20
    Info:OTA:141000
    Info:OTA:142000
    Info:OTA:143000
    Info:OTA:144000
    Info:OTA:145000
    Info:OTA:146000
    Info:OTA:147000
    Info:OTA:148000
    Info:OTA:149000
    Info:OTA:14a000
    Info:OTA:14b000
    Info:OTA:14c000
    Info:OTA:14d000
    Info:OTA:14e000
    Info:OTA:14f000
    Info:OTA:150000
    Info:OTA:151000
    Info:OTA:152000
    Info:OTA:153000
    Info:OTA:154000
    Info:OTA:155000
    Info:OTA:156000
    Info:OTA:157000
    Info:OTA:158000
    Info:OTA:159000
    Info:OTA:15a000
    Info:OTA:15b000
    Info:OTA:15c000
    Info:OTA:15d000
    Info:OTA:15e000
    Info:OTA:15f000
    Info:OTA:160000
    Info:OTA:161000
    Info:OTA:162000
    Info:OTA:163000
    Info:MAIN:Time 60, idle 0/s, free 66520, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/20
    Info:GEN:dhcp=0 ip=192.168.137.203 gate=192.168.137.1 mask=255.255.255.0 mac=c8:47:8c:42:88:48
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-51,ssid=test,bssid=3a:7a:0e:e3:6b:7e,channel=1,cipher_type:CCMP
    Info:OTA:164000
    Info:OTA:165000
    Info:OTA:166000
    Info:OTA:167000
    Info:OTA:168000
    Info:OTA:169000
    Info:OTA:16a000
    Info:OTA:16b000
    Info:OTA:16c000
    Info:OTA:16d000
    Info:OTA:16e000
    Info:OTA:16f000
    Info:OTA:170000
    Info:OTA:171000
    Info:OTA:172000
    Info:OTA:173000
    Info:OTA:174000
    Info:OTA:175000
    Info:OTA:176000
    Info:OTA:177000
    Info:OTA:178000
    Info:OTA:179000
    Info:OTA:17a000
    Info:OTA:17b000
    Info:OTA:17c000
    Info:OTA:17d000
    Info:OTA:17e000
    Info:OTA:17f000
    Info:OTA:180000
    Info:OTA:181000
    Info:OTA:182000
    Info:OTA:183000
    Info:OTA:184000
    Info:OTA:185000
    Info:OTA:186000
    Info:OTA:187000
    Info:OTA:188000
    Info:OTA:189000
    Info:OTA:18a000
    Info:OTA:18b000
    Info:OTA:18c000
    Info:OTA:18d000
    Info:OTA:18e000
    Info:OTA:18f000
    Info:OTA:190000
    Info:OTA:191000
    Info:OTA:192000
    Info:OTA:193000
    Info:OTA:194000
    Info:OTA:195000
    Info:OTA:196000
    Info:OTA:197000
    Info:OTA:198000
    Info:OTA:199000
    Info:OTA:19a000
    Info:OTA:19b000
    Info:OTA:19c000
    Info:OTA:19d000
    Info:OTA:19e000
    Info:MAIN:Time 61, idle 0/s, free 81616, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/20
    Info:OTA:19f000
    Info:OTA:1a0000
    Info:OTA:1a1000
    Info:OTA:1a2000
    Info:OTA:1a3000
    Info:OTA:1a4000
    Info:OTA:1a5000
    Info:OTA:1a6000
    Info:OTA:1a7000
    Info:OTA:1a8000
    Info:OTA:1a9000
    Info:OTA:1aa000
    Info:OTA:1ab000
    Info:OTA:1ac000
    Info:OTA:1ad000
    Info:OTA:1ae000
    Info:OTA:
    Info:OTA:close OTA, additional 0xeb0 FF added
    Info:OTA:1af000
    --write status reg:34,1--
    Info:OTA:close OTA, addr 0x1af400
    --write status reg:0,1--
    --write status reg:7c,1--
    Info:MAIN:Time 62, idle 0/s, free 104848, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Module reboot in 2...
    Info:MAIN:Time 63, idle 0/s, free 104848, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Module reboot in 1...
    bk_reboot(1)
    wdt reboot

    V(0.1.4)
    CPSR:0x000000D3
    R0:0x00000000
    R1:0x00000003
    R2:0x0E330001
    R3:0x00000000
    R4:0x000AF9EF
    R13:0x00403B80
    R14(LR):0x00013C8C
    [I/FAL] Fal(V0.4.0)success
    [I/OTA] RT-Thread OTA package(V0.2.4) initialize success.
    [I/OTA] OTA firmware(app) upgrade(2M.1220->_7231u_t_1387e60adaac) startup.
    [I/OTA] The partition 'app' is erasing.
    ###############BBBBBBBBBBB##############[I/OTA] The partition 'app' erase success.
    [I/OTA] OTA Write: [> ] 0%
    [I/OTA] OTA Write: [> ] 0%
    [I/OTA]
    [I/OTA] OTA Write: [> ] 0%
    [I/OTA]
    [I/OTA] OTA Write: [=> ] 1%
    [I/OTA]
    [I/OTA] OTA Write: [=> ] 1%
    [I/OTA]
    [I/OTA] OTA Write: [==> ] 2%
    [I/OTA]
    [I/OTA] OTA Write: [==> ] 2%
    [I/OTA]
    [I/OTA] OTA Write: [===> ] 3%
    [I/OTA]
    [I/OTA] OTA Write: [===> ] 3%
    [I/OTA]
    [I/OTA] OTA Write: [===> ] 3%
    [I/OTA]
    [I/OTA] OTA Write: [====> ] 4%
    [I/OTA]
    [I/OTA] OTA Write: [====> ] 4%
    [I/OTA]
    [I/OTA] OTA Write: [=====> ] 5%
    [I/OTA]
    [I/OTA] OTA Write: [=====> ] 5%
    [I/OTA]
    [I/OTA] OTA Write: [======> ] 6%
    [I/OTA]
    [I/OTA] OTA Write: [======> ] 6%
    [I/OTA]
    [I/OTA] OTA Write: [=======> ] 7%
    [I/OTA]
    [I/OTA] OTA Write: [=======> ] 7%
    [I/OTA]
    [I/OTA] OTA Write: [=======> ] 7%
    [I/OTA]
    [I/OTA] OTA Write: [=======> ] 7%
    [I/OTA]
    [I/OTA] OTA Write: [========> ] 8%
    [I/OTA]
    [I/OTA] OTA Write: [=========> ] 9%
    [I/OTA]
    [I/OTA] OTA Write: [==========> ] 10%
    [I/OTA]
    [I/OTA] OTA Write: [==========> ] 10%
    [I/OTA]
    [I/OTA] OTA Write: [===========> ] 11%
    [I/OTA]
    [I/OTA] OTA Write: [===========> ] 11%
    [I/OTA]
    [I/OTA] OTA Write: [============> ] 12%
    [I/OTA]
    [I/OTA] OTA Write: [============> ] 12%
    [I/OTA]
    [I/OTA] OTA Write: [=============> ] 13%
    [I/OTA]
    [I/OTA] OTA Write: [==============> ] 14%
    [I/OTA]
    [I/OTA] OTA Write: [==============> ] 14%
    [I/OTA]
    [I/OTA] OTA Write: [===============> ] 15%
    [I/OTA]
    [I/OTA] OTA Write: [===============> ] 15%
    [I/OTA]
    [I/OTA] OTA Write: [================> ] 16%
    [I/OTA]
    [I/OTA] OTA Write: [================> ] 16%
    [I/OTA]
    [I/OTA] OTA Write: [=================> ] 17%
    [I/OTA]
    [I/OTA] OTA Write: [==================> ] 18%
    [I/OTA]
    [I/OTA] OTA Write: [==================> ] 18%
    [I/OTA]
    [I/OTA] OTA Write: [===================> ] 19%
    [I/OTA]
    [I/OTA] OTA Write: [===================> ] 19%
    [I/OTA]
    [I/OTA] OTA Write: [===================> ] 19%
    [I/OTA]
    [I/OTA] OTA Write: [====================> ] 20%
    [I/OTA]
    [I/OTA] OTA Write: [=====================> ] 21%
    [I/OTA]
    [I/OTA] OTA Write: [=====================> ] 21%
    [I/OTA]
    [I/OTA] OTA Write: [======================> ] 22%
    [I/OTA]
    [I/OTA] OTA Write: [=======================> ] 23%
    [I/OTA]
    [I/OTA] OTA Write: [=======================> ] 23%
    [I/OTA]
    [I/OTA] OTA Write: [=======================> ] 23%
    [I/OTA]
    [I/OTA] OTA Write: [========================> ] 24%
    [I/OTA]
    [I/OTA] OTA Write: [=========================> ] 25%
    [I/OTA]
    [I/OTA] OTA Write: [=========================> ] 25%
    [I/OTA]
    [I/OTA] OTA Write: [==========================> ] 26%
    [I/OTA]
    [I/OTA] OTA Write: [===========================> ] 27%
    [I/OTA]
    [I/OTA] OTA Write: [===========================> ] 27%
    [I/OTA]
    [I/OTA] OTA Write: [===========================> ] 27%
    [I/OTA]
    [I/OTA] OTA Write: [============================> ] 28%
    [I/OTA]
    [I/OTA] OTA Write: [=============================> ] 29%
    [I/OTA]
    [I/OTA] OTA Write: [=============================> ] 29%
    [I/OTA]
    [I/OTA] OTA Write: [==============================> ] 30%
    [I/OTA]
    [I/OTA] OTA Write: [===============================> ] 31%
    [I/OTA]
    [I/OTA] OTA Write: [===============================> ] 31%
    [I/OTA]
    [I/OTA] OTA Write: [===============================> ] 31%
    [I/OTA]
    [I/OTA] OTA Write: [================================> ] 32%
    [I/OTA]
    [I/OTA] OTA Write: [=================================> ] 33%
    [I/OTA]
    [I/OTA] OTA Write: [==================================> ] 34%
    [I/OTA]
    [I/OTA] OTA Write: [==================================> ] 34%
    [I/OTA]
    [I/OTA] OTA Write: [===================================> ] 35%
    [I/OTA]
    [I/OTA] OTA Write: [===================================> ] 35%
    [I/OTA]
    [I/OTA] OTA Write: [====================================> ] 36%
    [I/OTA]
    [I/OTA] OTA Write: [====================================> ] 36%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================> ] 37%
    [I/OTA]
    [I/OTA] OTA Write: [======================================> ] 38%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================> ] 39%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================> ] 39%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================> ] 39%
    [I/OTA]
    [I/OTA] OTA Write: [========================================> ] 40%
    [I/OTA]
    [I/OTA] OTA Write: [========================================> ] 40%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================> ] 41%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================> ] 42%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================> ] 43%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================> ] 43%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================> ] 43%
    [I/OTA]
    [I/OTA] OTA Write: [============================================> ] 44%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================> ] 45%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================> ] 45%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================> ] 46%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================> ] 47%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================> ] 47%
    [I/OTA]
    [I/OTA] OTA Write: [================================================> ] 48%
    [I/OTA]
    [I/OTA] OTA Write: [================================================> ] 48%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================> ] 49%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================> ] 50%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================> ] 51%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================> ] 51%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================> ] 51%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================> ] 52%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================> ] 53%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================> ] 53%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================> ] 54%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================> ] 54%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================> ] 55%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================> ] 55%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================> ] 55%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================> ] 56%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================> ] 57%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================> ] 58%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================> ] 58%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================> ] 59%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================> ] 59%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================> ] 60%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================> ] 60%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================> ] 61%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================> ] 62%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================> ] 63%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================> ] 63%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================> ] 63%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================> ] 64%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================> ] 65%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================> ] 65%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================> ] 66%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================> ] 67%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================> ] 67%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================> ] 67%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================================> ] 68%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================================> ] 69%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================================> ] 70%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================================> ] 70%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================> ] 71%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================> ] 71%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================================> ] 72%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================================> ] 72%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================================> ] 73%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================> ] 74%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================> ] 75%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================> ] 75%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================> ] 75%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================> ] 76%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================> ] 76%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================> ] 77%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================> ] 78%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================> ] 78%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================> ] 79%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================> ] 79%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================> ] 79%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================> ] 80%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================================> ] 81%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================================> ] 81%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================> ] 82%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================> ] 83%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================> ] 83%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================> ] 83%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================================================> ] 84%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================================================> ] 85%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================================================> ] 86%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================================> ] 87%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================================> ] 87%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================================> ] 87%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================================================> ] 88%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================================================> ] 88%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================================================> ] 89%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================================================> ] 89%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================================> ] 90%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================================> ] 90%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================================> ] 90%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================================> ] 92%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================================> ] 92%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================================> ] 93%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================================> ] 93%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================================> ] 93%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================================> ] 94%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================================> ] 94%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================================> ] 94%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================================> ] 94%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================================> ] 96%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================================> ] 96%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================================================> ] 97%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================================================> ] 97%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================================> ] 98%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================================> ] 98%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================================>] 99%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================================>] 99%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================================>] 99%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================================================================] 100%
    [E/OTA] (ota_erase_dl_rbl:24) ota_erase_dl_rbl

    [E/OTA] (ota_erase_dl_rbl:34) ota_erase_dl_rbl erase:132000



    go os_addr(0x10000)..........
    prvHeapInit-start addr:0x418108, size:163576
    [Flash]id:0x1c7015
    --write status reg:34,1--
    [Flash]init over
    sctrl_sta_ps_init
    SDK Rev: 3.0.70 e492df8
    OSK Rev: F-3.0.44 e492df8
    cset:0 0 0 0
    Entering initLog()...
    Commands registered!
    initLog() done!
    --write status reg:0,1--
    --write status reg:7c,1--
    --write status reg:0,1--
    --write status reg:7c,1--
    --write status reg:0,1--
    --write status reg:7c,1--
    --write status reg:0,1--
    --write status reg:7c,1--
    --write status reg:0,1--
    --write status reg:7c,1--
    Main_Init_Before_Delay done
    Main_Init_Delay
    No TLV header found in flash
    [FUNC]rwnxl_init
    chip id=7231a device id=18521020
    IP Rev: W4-3.0.70-P0
    txdesc flush
    [FUNC]intc_init
    [FUNC]calibration_main
    No TLV header found in flash

    rfcali_mode:1, 0
    *********** finally result **********
    gtx_dcorMod : 0x8
    gtx_dcorPA : 0xa
    gtx_pre_gain : 0x10
    gtx_i_dc_comp : 0x1fd
    gtx_q_dc_comp : 0x209
    gtx_i_gain_comp : 0x3f7
    gtx_q_gain_comp : 0x3ff
    gtx_ifilter_corner over: 0xf
    gtx_qfilter_corner over: 0x10
    gtx_phase_comp : 0x204
    gtx_phase_ty2 : 0x200
    gbias_after_cal : 0x17
    gav_tssi : 0x0
    g_rx_dc_gain_tab 0 over: 0x80788070
    g_rx_dc_gain_tab 1 over: 0x88728870
    g_rx_dc_gain_tab 2 over: 0x92709070
    g_rx_dc_gain_tab 3 over: 0xb860a864
    g_rx_dc_gain_tab 4 over: 0xba62ba60
    g_rx_dc_gain_tab 5 over: 0xba64ba64
    g_rx_dc_gain_tab 6 over: 0xbc64bc64
    g_rx_dc_gain_tab 7 over: 0xbd65bc65
    grx_amp_err_wr : 0x1f1
    grx_phase_err_wr : 0x3f6
    **************************************
    NO RF TLV in flash, write def tab
    NO TXPWR_TAB_TAB found in flash
    Load default txpwr for b:0xccd65
    Load default txpwr for g:0xccd9b
    fit n20 table with dist:2
    Load default txpwr for n40:0xccda9
    Load default txpwr for ble:0xccd73
    NO TXID found in flash, use lpf i&q:15, 16
    NO TXID found in flash, use def xtal:25
    xtal in flash is:25
    xtal_cali:25
    rwnx_tpc_pa_map_init
    [FUNC]ps_init
    int watchdog enabled, period=10000
    task watchdog enabled, period=60000
    [FUNC]func_init_extended OVER!!!

    start_type:1
    Initializing TCP/IP stack
    rf_thread_init ok

    delayinbk_wlan_app_init finishg start
    ed
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 4 #######
    Warn:CFG:CFG_InitAndLoad: #Startup delayed 0ms#
    Correct config has been loaded with 3 changes count.
    Error:CMD:lfs is absent
    Info:GEN:PIN_#Startup delayed 10ms#
    SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init#Startup delayed 20ms#
    _Delay
    #Startup delayed 30ms#
    #Startup delayed 40ms#
    #Startup delayed 50ms#
    #Startup delayed 60ms#
    #Startup delayed 70ms#
    #Startup delayed 80ms#
    #Startup delayed 90ms#

    starting....
    Main_Init_Delay done
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID [test]
    Info:MAIN:Using Pass [1234abcd]
    Info:MQTT:MQTT_RegisterCallback called for bT obk8C428848/ subT obk8C428848/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT obks/ subT obks/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obk8C428848/ subT cmnd/obk8C428848/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obks/ subT cmnd/obks/+
    Info:MQTT:MQTT_RegisterCallback called for bT obk8C428848/ subT obk8C428848/+/get
    Info:CMD:CMD_StartScript: started @startup at the beginning
    Error:CMD:LFS_ReadFile: lfs is absent
    Info:CMD:CMD_StartScript: failed to get file autoexec.bat
    Info:MAIN:Main_Init_After_Delay done
    Info:HTTP:TCP server listening
    Info:MAIN:Time 1, idle 0/s, free 131640, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Time 2, idle 0/s, free 131640, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Time 3, idle 0/s, free 131640, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Time 4, idle 0/s, free 131640, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/20
    [sa_sta]MM_RESET_REQ
    txdesc flush
    [sa_sta]ME_CONFIG_REQ
    [sa_sta]ME_CHAN_CONFIG_REQ
    [sa_sta]MM_START_REQ
    PSKC: ssid test, passphrase 1234abcd
    sizeof(wpa_supplicant)=1016
    mm_add_if_req_handler:0
    hapd_intf_add_vif,type:2, s:0, id:0
    wpa_dInit
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 65
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 65
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 65
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 65
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 65
    hapd_intf_del_key: mac ff:ff:ff:ff:ff:ff, hw key idx 65
    wpa S: DISCONNECTED -> INACTIVE
    wpa S: INACTIVE -> DISCONNECTED
    enter low level!
    mac c8:47:8c:42:88:48
    leave low level!
    net_wlan_add_netif done!, vif_idx:0
    wpa_supplicant_req_scan
    Setting scan request: 0.000000 sec
    wpa_supplicant_scan
    wpa S: DISCONNECTED -> SCANNING
    wpa_drv_scan
    wpa_send_scan_req
    no ht in scan
    scan_start_req_handler
    wpa_driver_scan_start_cb
    wpa rx E SCAN_STARTED
    Info:MAIN:Time 5, idle 0/s, free 131640, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Cwpa_driver_scan_cb
    wpa rx E SCAN_RESULTS
    Scan completed in 0.096000 seconds
    wpa_get_scan_rst:1
    cipher2security 2 2 16 16
    cipher2security 2 2 16 16
    onnecting to SSID [test]
    --write status reg:0,1--
    --write status reg:7c,1--
    --write status reg:0,1--
    --write status reg:7c,1--
    --write status reg:0,1--
    --write status reg:7c,1--
    Info:MAIN:Time 6, idle 0/s, free 124120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    PSKC: end
    cipher2security 2 2 16 16
    cipher2security 2 2 16 16
    wpa_supplicant_connect
    Cancelling scan request
    wpa S: SCANNING -> ASSOCIATING
    wpa_driver_associate: auth_alg 0x1
    found scan rst rssi -50 = -50 0
    sta_mgmt_register: mac 3a:7a:0e:e3:6b:7e
    sm_auth_send:1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    sm_auth_handler
    ht in assoc req
    Info:MAIN:Time 7, idle 0/s, free 122352, sm_assoc_rsp_handler
    rc_init: station_id=0 format_mod=2 pre_type=0 short_gi=1 max_bw=0
    rc_init: nss_max=0 mcs_max=7 r_idx_min=0 r_idx_max=3 no_samples=10
    mm_set_vif_state_req_handler
    chan_bcn_detect_start
    ---------SM_CONNECT_IND_ok, aid 1, bssid 3a:7a:0e:e3:6b:7e
    Not associated - Delay processing of received EAPOL frame (state=ASSOCIATING bssid=00:00:00:00:00:00 )
    wpa rx E ASSOC
    wpa S: ASSOCIATING -> ASSOCIATED
    Cancelnew dtim period:3

    new ie: 0 : 74 65 73 74
    new ie: 1 : 82 84 8b 96 8c 12 98 24
    new ie: 3 : 1
    new ie: 2d : a5 9 17 ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    new ie: 30 : 1 0 0 f ac 4 1 0 0 f ac 4 1 0 0 f ac 2 3c 0 0 0

    ling scan request
    wpa S: ASSOCIATED -> 4WAY_HANDSHAKE
    WPA: TK f55f9f9ba153ef824509ab0b7064c74c
    MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/20
    wpa S: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
    hapd_intf_add_key CCMP
    add sta_mgmt_get_sta
    sta:0, vif:0, key:0
    sta_mgmt_add_key
    add hw key idx:24
    wpa S: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
    WPA: GTK 3251183c61352f7f2ceb541f40ea183b
    hapd_intf_add_key CCMP
    add is_broadcast_ether_addr
    sta:255, vif:0, key:2
    add hw key idx:2
    wpa S: GROUP_HANDSHAKE -> COMPLETED
    ctrl_port_hdl:1
    me_set_ps_disable:978 0 0 0 0 1
    dis set ps 1!!
    WLAN_EVENT_CONNECTED
    sta_ip_start

    configuring interface mlan (with DHCP client)WARN: TCPIP mutex is NOT locked (1) caller A55C7
    WARN: TCPIP mutex is NOT locked (1) caller A55C7
    ip_addr: cb89a8c0
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 8, idle 0/s, free 124848, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Time 9, idle 0/s, free 124848, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/20
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 10, idle 0/s, free 119280, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/20
    Info:GEN:dhcp=0 ip=192.168.137.203 gate=192.168.137.1 mask=255.255.255.0 mac=c8:47:8c:42:88:48
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-50,ssid=test,bssid=3a:7a:0e:e3:6b:7e,channel=1,cipher_type:CCMP
    Info:MAIN:Time 11, idle 0/s, free 119280, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Time 12, idle 0/s, free 119256, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/20
    Info:MAIN:Time 13, idle 0/s, free 119256, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/20
  • #119 21508572
    divadiow
    Level 34  
    ah crap. post with dummy file wiped out previous replies this morning.

    Added after 3 [minutes]:

    insmod wrote:
    Is your device alive after reboot with new bootloader? Does OTA work?

    in summary, replies said yes. resets, however done, result in a booting device.

    OTA works on QIO BL from build and with original older BL from U device
  • #120 21508603
    p.kaczmarek2
    Moderator Smart Home
    insmod wrote:

    Regarding power save, i think most complex one is for ESP. Up to 4 arguments.
    First is default power save(esp_wifi_set_ps), if 1 - WIFI_PS_MIN_MODEM, 2 - WIFI_PS_MAX_MODEM. 0 is WIFI_PS_NONE.
    Second is TX power in dBm.
    Third and fourth is min frequency and max frequency respectively.
    And while powersave for realtek is only 1 argument, in RTL8710B powersave 2 reduces frequency by half, and 3 by quarter.
    So, we need 2 more commands? For powersave, make argument 1 for RF, argument 2, if possible, for MCU. One is for TX power, and another for frequency selection.

    If it's complicated, we can try something simpler but still user friendly.
    Maybe...
    Make "PowerSave" and/or "PowerSave 1" (the ones that appears in many posts as recommendation) could be changed into a "smart" powersave. Make it run the best powersave options for current platform. We could even insert a "are BL0937 pins set" check there to automatically choose RF only or RF+MCU PS.
    And then other PowerSave options could stay per platform if you think that's necessary.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the NiceMCU XH-WB3S development board, which utilizes the BK7238 chip. Users share experiences regarding flashing the device, testing its functionalities, and addressing issues related to encryption keys and firmware compatibility. There are debates about the correct identification of the chip (BK7238 vs. BK7231T) and the implications for development. Participants discuss the use of various tools for flashing, such as BKFIL and Easy Flasher, and the challenges faced with OTA updates and memory management. Additionally, there are insights into the SDKs available for development, including Arduino compatibility and the potential for porting OpenBeken firmware. The conversation also touches on specific sensor integrations, such as DHT11 and DS18B20, and the timing issues encountered during their operation.
Summary generated by the language model.
ADVERTISEMENT