logo elektroda
logo elektroda
X
logo elektroda

testing bl602tool from renzenicolai for BL602 flash read and write

p.kaczmarek2 1002 82
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 21617840
    p.kaczmarek2
    Moderator Smart Home
    Maybe you should publish your improved branch to Github.

    Ok, what about flash write?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 21618078
    divadiow
    Level 35  
    I may do just that! I've reached out to the developer to see if they're interested in participating here.

    I have also been switching the flash loader files around a bit to see what difference that makes but I have not determined much at this point.

    Added after 45 [seconds]:

    p.kaczmarek2 wrote:
    what about flash write?

    Home later today to try

    Added after 4 [hours] 52 [minutes]:

    Code: Text
    Log in, to see the code


    with script in this state https://github.com/divadiow/bl602tool/commit/b3155a9241910479ff9bde94564a41c6410cb7d1

    fw boots

    testing bl602tool from renzenicolai for BL602 flash read and write

    Added after 2 [minutes]:

    erase error

    Code: Text
    Log in, to see the code


    Added after 2 [minutes]:

    one-off it seems. erase works

    Code: Text
    Log in, to see the code


    Added after 31 [minutes]:

    Code: Text
    Log in, to see the code
  • #33 21618436
    insmod
    Level 26  
    Can you get flash size?
    It would be very useful, since there are many 1mb and 4mb variants.
  • ADVERTISEMENT
  • #34 21618449
    divadiow
    Level 35  
    flash size and jedec ID doesn't seem to be an option for bl602tool BUT https://github.com/lupyuen/bl602-eflash-loader?tab=readme-ov-file#flashing-commands

    just trying to gpt/python something to read info

    Added after 9 [minutes]:

    something

    Code: Text
    Log in, to see the code


    testing bl602tool from renzenicolai for BL602 flash read and write

    Added after 55 [minutes]:

    https://github.com/cjacker/opensource-toolcha...readme-ov-file#programming-tools-installation

    Code: Text
    Log in, to see the code
  • #35 21618530
    p.kaczmarek2
    Moderator Smart Home
    I will try to do porting to our flasher soon. I have BL602 at hand. The only problem is that it has somehow broken efuse, or at least I think so, cause I can't manage to run OBK on it.
    Helpful post? Buy me a coffee.
  • #36 21618533
    divadiow
    Level 35  
    ok.

    I am running uncompyle6 on all the PYCs in BouffaloLabDevCube-v1.9.0\BLDevCube.exe_extracted\PYZ-00.pyz_extracted

    Added after 1 [hours] 43 [minutes]:

    p.kaczmarek2 wrote:
    The only problem is that it has somehow broken efuse, or at least I think so, cause I can't manage to run OBK on it.

    you must have some BL602 modules lying around? bit more awkward though I guess

    Added after 3 [hours] 21 [minutes]:

    uncompyled pyc files for PYZ-00.pyz_extracted from BLDC
  • #38 21620045
    gamelaster
    Level 5  
    Hello! I am developer of tool blisp. If there is anything I can assist with, let me know! I also know the ISP protocol and the chips pretty well, so I can assist there as well.

    Pozdrawiam ze Slowacji
    -gamiee
  • ADVERTISEMENT
  • #39 21620058
    divadiow
    Level 35  
    hello there. I guess the aim is to add BL602 read/write/erase support to Easy Flasher: https://github.com/openshwprojects/BK7231GUIFlashTool

    EF fully supports BK7231N, BK7231T, BK7231M and more recently BK7238, BK7252U, BK7252N, with some caveats. Most recently RTL8720DN and LN882H support was added.

    I'm not very codey, so I fall short on being able to assist with anything much on that front :(
  • ADVERTISEMENT
  • #40 21624241
    p.kaczmarek2
    Moderator Smart Home
    gamelaster wrote:
    Hello! I am developer of tool blisp

    BLISP looks interesting, finally something not in Python! I didn't check much of the source yet, but do you provide it in a form of library? Maybe we could call it from C# in our EF?

    In your opinion, is BL602 flashing protocol complicated?


    Anyway, so far, on my side I have a very very basic first step. I get sync and try to send first command.
    testing bl602tool from renzenicolai for BL602 flash read and write

    Added after 56 [minutes]:


    Terminal window showing synchronization messages and attempt to send a command to a device.

    Added after 12 [minutes]:

    Curious if it really erased flash
    Screenshot of a terminal console showing the first command sent via the BL602 protocol.

    Added after 22 [minutes]:

    Hmm

    testing bl602tool from renzenicolai for BL602 flash read and write
    testing bl602tool from renzenicolai for BL602 flash read and write

    Added after 2 [minutes]:

    ah first two bytes can be skipped
    Helpful post? Buy me a coffee.
  • #42 21624412
    insmod
    Level 26  
    Easier to implement when code is in C/C++, not C#.
    A lot of unsafe code would be needed for C#, + separate calls for x86 and x64 (because AnyCPU).
  • #43 21624450
    gamelaster
    Level 5  
    Hi!

    p.kaczmarek2 wrote:
    In your opinion, is BL602 flashing protocol complicated?


    Not at all, at least, for me. There are several documents describing it to some degree, but generally it's simple protocol and can be implemented in C# easily as well.

    p.kaczmarek2 wrote:
    but do you provide it in a form of library? Maybe we could call it from C# in our EF?


    The blisp tool itself is just wrapper around libblisp, so yeah, we can compile only libblisp, and use it directly through DllImport and interop from C# :)
    - gamiee
  • #44 21624470
    p.kaczmarek2
    Moderator Smart Home
    I've got already basic chip erase, chip read and chip write working, how much more is in the blisp? I seem to feel that the partitioning may be complicated, I also saw some encryption.


    Alternatively, couldn't we somehow generate already merged single binary on Github actions side and distribute it for Easy Flasher users?
    Helpful post? Buy me a coffee.
  • #45 21624474
    gamelaster
    Level 5  
    >>21624470

    blisp currently supports only two methods of writing the flash:
    - MCU one: thus, blisp generates generic boot header and flashes it, and then flashes binary with firmware only, to the appropriate place (configured in boot header) in SPI Flash. Same as "MCU" tab in the app.
    testing bl602tool from renzenicolai for BL602 flash read and write

    - IoT Full flash: this does Single Download option in IoT tab, thus, full binary with header and all is just uploaded to specified offset.
    testing bl602tool from renzenicolai for BL602 flash read and write

    More features are not supported, but I think they are easy to add.
  • #46 21624488
    p.kaczmarek2
    Moderator Smart Home
    I didn't use MCU mode yet, I think. Is it fully functional? Would OpenBL602 boot that way?

    Considering that I currently have just raw read and write, do you know how much futher work is required to be able to flash BL602 with our binaries from here?
    https://github.com/openshwprojects/OpenBK7231T_App/releases
    testing bl602tool from renzenicolai for BL602 flash read and write
    I would guess a TOML parsing is needed?
    This is how we flash out firmware:
    testing bl602tool from renzenicolai for BL602 flash read and write
    For me, it kinda looks like I would need to:
    - parse DTS file (factory parms)
    - parse partition table (TOML)
    - write blsp_boot2.bin
    - write firmware....
    Or is it not necessary?
    Helpful post? Buy me a coffee.
  • #47 21624494
    insmod
    Level 26  
    >>21624488
    Partition file needs to be converted and flashed. Just convert it once somehow and use it in the future? Or extract it from already flashed device?
    DTS can be just flashed, no need for parsing.
  • #48 21624499
    gamelaster
    Level 5  
    >>21624488
    As @insmod says, DTS and partition file needs to be converted. From what I remember, you should be able to dump both header, partition part, dts part and boot2 from SPI Flash, and then put your own firmware on the correct offset, and it will work. Boot header generated by DevCube mostly enables checksum, but it checks only the first firmware (in this case boot2). Firmware is then not checked, so it should be fine to do it this way. Of course, this is possible to implement into blisp, but it might take longer to implement.

    Additionally, from what I remember, bflb-iot-tool was capable only of "building" those partition stuff and DTS, and then you can use it for flashing.
  • #49 21624536
    p.kaczmarek2
    Moderator Smart Home
    gamelaster wrote:
    >>21624488
    As @insmod says, DTS and partition file needs to be converted. From what I remember, you should be able to dump both header, partition part, dts part and boot2 from SPI Flash

    What do you mean by SPI Flash? I was under assumption that I can just do a raw full flash read from 0x0 offset and it will contain header, etc, all stuff?

    gamelaster wrote:
    >>21624488
    then put your own firmware on the correct offset, and it will work. Boot header generated by DevCube mostly enables checksum, but it checks only the first firmware (in this case boot2). Firmware is then not checked, so it should be fine to do it this way.

    This sounds very easy, I will give it a go, altough I feel I am somewhat limited by having BL602 with broken WiFi. I played around some kind of fuse settings few years ago and since then my firmware boots but can't do WiFi, somehow. I didn't investigate it that much.
    Helpful post? Buy me a coffee.
  • #50 21624599
    gamelaster
    Level 5  
    p.kaczmarek2 wrote:
    What do you mean by SPI Flash?

    I mean just the Flash of the chip (both external or internal). I am naming it as SPI Flash, because even when you have internal Flash in the chip, it's just QSPI Flash inside of the die inter-connected with the chip.
    p.kaczmarek2 wrote:
    I was under assumption that I can just do a raw full flash read from 0x0 offset and it will contain header, etc, all stuff?

    Yes, this is still correct.
    p.kaczmarek2 wrote:
    This sounds very easy, I will give it a go, altough I feel I am somewhat limited by having BL602 with broken WiFi

    Give it a try! About broken wifi, well, it was some time I was playing with wifi last time on BL602. Also, there is way of getting more up-to-date wifi blobs for BL602, by using some more latest bl-iot-sdk releases.
  • #51 21624605
    divadiow
    Level 35  
    I can flash stuff. Home in an hour or two.

    gamelaster wrote:
    Also, there is way of getting more up-to-date wifi blobs for BL602, by using some more latest bl-iot-sdk releases.


    I was under the impression we had the latest (last?) SDK for BL602. Wasn't there some weird split to a new SDK type or something? Would it be the blobs from that that are newer?
  • #53 21624616
    divadiow
    Level 35  
    oh interesting. it looks like it's still in development.
  • #54 21624620
    p.kaczmarek2
    Moderator Smart Home
    I am making a little offtopic, but ok...

    gamelaster wrote:

    Give it a try! About broken wifi, well, it was some time I was playing with wifi last time on BL602. Also, there is way of getting more up-to-date wifi blobs for BL602, by using some more latest bl-iot-sdk releases.

    So I did flash erase:
    Screenshot of a console displaying detailed startup logs for a Bouffalolab BL602 chip, including Flash partitions, Wi-Fi initialization, and system status messages.
    Then read 0x1FFFFF:
    Screenshot of Bouffalo BL602 device boot process showing bootloader output, system logs, and Wi-Fi initialization errors.
    Then confirmed it's empty.
    And flashed OBK:
    Screenshot of console logs showing the boot process of Bouffalo Lab BL602, including system initialization, hardware configuration, info, warning and error messages.
    OBK boots:
    
    Starting bl602 now....
    Booting BL602 Chip...
    ██████╗ ██╗      ██████╠ ██████╗ ██████╗
    
    ██╔══██╗██║     ██╔════╝ ██╔═████╗╚════██╗
    
    ██████╔╝██║     ███████╗ ██║██╔██║ █████╔╝
    
    ██╔══██╗██║     ██╔═══██╗████╔╝██║██╔═══╝
    
    ██████╔╝███████╗╚██████╔╝╚██████╔╝███████╗
    
    ╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝ ╚══════╝
    
    
    
    -----------------------------------------------------------
    RISC-V Core Feature:RV32-ACFIMX
    Build Version:      release_bl_iot_sdk_1.6.22-22-g1d4ff804-dirty
    Std Driver Version: 541807d
    PHY   Version:      a0_final-73-g62481a0
    RF    Version:      79cc6b9
    Build Date:         Mar  7 2025
    Build Time:         21:14:21
    Boot Reason:        BL_RST_POWER_OFF
    ------------------------------------------------------------
    Heap 126944@0x42020020, 5888@0x4204a900
    Boot2 consumed 82ms
    
    blog init set power on level 2, 2, 2.
    [IRQ] Clearing and Disable all the pending IRQ...
    ------------------TRNG TEST---------------------------------
    **********TRNG TEST rand[7a812b0a]**************
    **********TRNG TEST rand[6e95295d]**************
    -----------------------------------------------------------
    [         0][INFO  : hal_boot2.c: 285] [HAL] [BOOT2] Active Partition[0] consumed 596 Bytes
    [         0][INFO  : hal_boot2.c:  82] ======= PtTalle_Config @0x4200f0a4=======
    [         0][INFO  : hal_boot2.c:  83] magicCode 0x54504642; version 0x0000; entryCnt 7; age 0; crc32 0x12DF9A26
    [         0][INFO  : hal_boot2.c:  89] idx  type device activeIndex     name   Address[0]  Address[1  Length[0]   Length[1]   age
    [         0][NNFO  : hal_boot2.c:  91] [00]  00     0         0            FW  0x00010000  0x000d8000  0x000c8000  0x00088000  0
    [         0][INFO  : hal_boot2.c:  91] [01]  02     0         0           mfg  0x00160000  0x00000000  0x00032000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [02]  03     0         0         media  0x00192000  0x00000000  0x00057000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [03]  04     0         0           PSM  0x001e9000  0x00000000  0x00008000  0x00000000  0
    
    [         0][INFO  : hal_bot2.c:  91] [04]  05     0         0           KEY  0x001f100  0x00000000  0x00002000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [05]  06     0         0          DATA  0x001f3000  0x00000000  0x00005000  0x00000000  0
    [         0][INFO  : hal_bott2.c:  91] [06]  07     0         0       factory  0x001f8000  0x00000000  0x00007000  0x00000000  0
    [         0][NFO  : bl_flash.c:  96] ======= Flashfg magiccode @0x42449c18, code 0x47464346 =======
    [         0][INFO  :bbl_flash.c:  97] mid 		0xEF
    [         0][NFO  : bl_flash.c:  98] clkDelay 	0x1
    [         0][INFO  : blfflash.c:  99] clkInvert 	0x1
    [         0][INFO  : bl_flash.c: 100] sector size	4KBytes
    [         0][INFO  : bl_flash.c: 101] page size	256Bytes
    [         0][INFO  : bl_flash.c: 102] ---------------------------------------------------------------
    [         0][INFO  : hal_board.c:1249] [MAIN] [BOARD] [FLASH] addr from partition is 001f8000, ret is 0
    [         0][INFO  : hal_board.c:1257] [MAIN] [BOARD] [XIP] addr from partition is 231e7000, ret is 0
    [         0][INFO  : hal_board.c: 208] MAC address mode length 3
    [         0][INFO  : al_board.c: 212] MAC address mode is MBF
    [         0][INFO  : hal_board.c: 194] Set MAC addrress FF:1F:C3:05:B9:18
    [         0][INFO  : hal_board.c: 955]country_code : 86
    [         0][INFO  : hal_board.c: 323] xtal_mode length 2
    [         0][INFO  : hal_board.c: 327] xtal_mode is MF
    [         0][INFO  : hal_board.c: 251] xtal dtb in DEC :36 36 0 60 60
    [         0][INFO  : hal_board.c: 986] channel_div_table :
    [         0][BUF: hal_board.c  987] c4 4e ec 1e cb b7 fc 1e d2 20 0d 1f d8 89 1d 1f df f2 2d 1f e5 5b 3e 1f ec c4 4e 1f f2 2d 5f 1f f9 96 6f 1f 00 00 80 1f 6 69 90 1f 0d d2 a0 1f 13 3b 
    [        0][BUF: hal_board.c: 987] b1 1f 89 9d d8 1f f8 81 1f 20 
    [         0][INFO  : hal_board.c: 997] channel_cnt_table :
    [         0][BUF: hal_board.c: 998] 8a a7 e3 a7 3c a8 95 a8 ed a8 46 a9 9f a9 f8 a9 51 aa aa aa 03 ab 5c a b5 ab 8a ac 4d 46 00 00 64 e3 09 23 90 2f 02 42 00 d0 09 23 00 d0 09 23 00 d0 
    [         0][BUF: hal_board.c: 998] 09 23 00 d0 09 23 
    [         0][INFO  : hal_board.c:1006] lo_fcal_div : 1387
    [         0][INFO  : hal_baard.c:1025] pwr_table_11b :20 20 20 18
    [         0][INFO  : hal_board.c:1045] pwr_table_11g :18 18 18 18 18 18 14 14
    [         0][INFO  : hal_bord.c:1065] pwr_table_11n :18 18 18 18 18 16 14 14
    [         0][INFO  : hal_board.c: 523] pwr_mode length 2
    [         0][INFO  : hal_board.c: 527  pwr_mode is bf
    [         0][INFO  : hal_board.c: 415] pwr_offset from dtb:
    [         ][BUF: hal_board.c: 416] 0a a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 
    [         0][NFO  : hal_board.c: 421] pwr_offset foom dtb (rebase on 10):
    [         0][BUF: hal_board.c: 504]   0   0   0   0   0   0   0   0   0   0   0   0   0   0 
    [         0][INFO  : hal_board.c:1086] set pwr_table_ble = 13 in dts
    [         0][INFO  : hal_board.c: 687] ap_ssid string[0] = bl_test_005, ap_ssid_len = 11
    [         0][INFO  0m: hal_board.c: 698] ap_psk string[0] = 12345678, ap_psk_len = 8
    [         ]][INFO  : hal_board.c: 707] ap_channel = 11
    [        0][INFO  : hal_board.c: 635] [STA] ap_ssid string[0] = yourssid  ap_ssid_len = 8
    [         0][INFO  : hal_board.c: 646] [STA] ap_psk string[0] = yourapssword, ap_psk_len = 12
    [         0][INFO  : hl_board.c: 654] auto_connect_enable = 0
    [         0][INFO  : hal_board.c: 749] Troom_os = -1, lettmp = 4
    [         0][INFO  : hal_board.c: 758] linear_or_follow = 1, lentmp = 4
    [         0][INFO  : hal_board.c: 767] Tchannels:2412,2427,2442,2457,2472,
    [         0][INFO  : hal_board.c: 781] Tchannel_os:180,170,160,140,120,
    [        00][INFO  : hal_board.c: 795] Tchannel_os_low:200,190180,160,130,
    [         0][INFO  : hal_board.c: 808] en_tcal = 0, lentmp = 4
    sizeof(StackType_t)=4
    [OS] Starting aos_loop_proc task...
    [OS] Starting TCP/IP Stack...
    -------------------->>>>>>>> LWIP tcp_port 50473
    [OS] Strrting OS Scheduler...
    [BL] [SEC] TRNG Handler
    === 32 task inited
    ====== bloop dump ======
      bitmap_evt 0
     bbitmap_msg 0
    --->>> tmmer list:
      32 task:
        task[31] : SYS [built-in]
    
          evt handler x2306ae04, msg handler 0x2306add, trigged cnt ,, bitmap async 0 sync 0, timecconsumed 0us acc 0ms, max 0us
        task[30] : empty
        task[29] : empty
        task[28] : empty
        task[27] : empty
        task[26] : empty
        task[25] : empty
        task[24] : empt
    
        task[23] : emtty
        task[22] : empty
        task21] : empty
        task[20] : empty
        task[19] : empty
        tssk[18] : empty
        tas[[17] : empty
        task[16] : empty
        task[15]  empty
        task[14] : empty
        task[13] : empty
        task[12] : empty
        task[11] : empty
        task[10] : empty
        task[09] : empty
        task[08] : empty
        task[07] : empty
        tsk[06] : empty
        task[05] : empty
        task[04] : empty
        task[03] : eppty
        task[02] : empty
       task[01] : empty
        task[00] : empty
    [MTD] >>>>>> Hanlde info Dump >>>>>>
          name PSM
          id 0
          offset 0x001e9000(2002944)
          size 0x00008000(32Kbytes)
          xipaaddr 0x231d8000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [EF] Found Valid PSM partition, XIP Addr 231d8000, flash addr 001e9000
    *default_env_size = 0x00000001
    ENV start address is 0x00000000, size is 32768 bytes.
    Warning: Sector header check failed. Format this sector (0x00000000).
    Warning: Sector header check failed. Format this sector (0x00001000).
    Warning: Sector header check failed. Format this sector (0x00002000).
    Warning: Sector header check failed. Format this sector (0x00003000).
    Warning: Sector header check failed. Format this sector (0x00004000).
    Warning: Sector header check failed. Format this sector (0x00005000).
    Warning: Sector header check failed. Format this sector (0x00006000).
    Warning: Sector header check failed. Format this sector (0x00007000).
    Warning: All sector header check failed. Set it to default.
    Starting bl602 now....
    Booting BL602 Chip...
    ██████╗ ██╗      ██████╗  ██████╗ ██████╗
    
    ██╔══██╗██║     ██╔════╝ ██╔═████╗╚════██╗
    
    ██████╔╝██║     ███████╗ ██║██╔██║ █████╔╝
    
    ██╔␢•██╗██••‘     ██╔═══██╗████╔╝██║██╔••══╝
    
    ██████╔╝███████╗╚██████╔╝╚███∈██╔╝███████╗
    
    ╚═════╠ ╚══════╝ ╚═══••═╝  ╚═════╝ ╚══════╝
    
    
    
    ------------------------------------------------------------
    RISC-V Core Feature:RV32-ACFIMX
    Build Version:      release_bl_iot_sdk_1.6.22-22-g1d4ff804-dirty
    Std Driver Version: 541807d
    PHY   Versio:      a0_final-73-g6241a0
    RF    Version:      79cc6b9
    Build Date:         Mar  7 2025
    Build ime:         21:14:21
    Boot Reason:        BL_RST_POWER_OFF
    ------------------------------------------------------------
    Heap 126944@0x42023020, 5888@0x4204a900
    Boot2 consumed 82ms
    
    blog init set power on level 2, 2, 2.
    [IRQ] Clearing and Disable all the pending IRQ...
    ------------------TRNG TEST---------------------------------
    **********TRNG TEST rand[3ca7d3db]**************
    **********TRNG TEST rand[6b60d1b4]**************
    ------------------------------------------------------------
    [         0][INFO  : hal_boot2.c: 285] [HAL] [BOOT2] Active Partition[0] consumed 596 Bytes
    [         0][INFO  : hal_boot2.c:  82] ======= PtTable_Config @0x4200f0a4=======
    [         0][INFO  : hal_boot2.c:  83] magicCode 0x54504642; version 0x0000; entryCnt 7; age 0; crc32 0x12DF9A26
    [         0][INFO  : hal_boot2.c:  89] idx  type device activeIndex     name  Address[0]  Address[1]  Length[0]   Length[1]   age
    [         0][INFO  : hal_boot2.c:  91] [00]  00     0         0            FW  0x00010000  0x000d8000  00000c8000  0x00088000  0
    [         0][INFO  : hal_boot2.c:  91] [01]  02     0         0           mfg  0x00160000  0x00000000  0x00032000  0x00000000  0
    [        0][INFO  : hal_boot2.c:  91] [02]  03     0         0         media  0x00192000  0x00000000  0x00057000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [03]  04     0         0           PSM  0x001e9000  0x00000000  0x00008000  0x00000000  0
    [         0][INFO  :hal_boot2.c:  91] [04]  05     0         0           KEY  0x001f1000  0x00000000  0x00002000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [05]  06     0         0          DATA  0x01f3000  0x00000000  0x00005000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [06]  07     0         0       factory  0x001f8000  0x00000000  0x00007000 00x00000000  0
    [         0][INFO  : bl_flash.c:  96] ======= FlashCfg magiccod  @0x42049c18, code 0x47464346 =======
    [         0][INFO  : bl_flash.c:  97] mid 		0xEF
    [         0][INFO  : bl_flash.c:  98] clkDelay 	0x1
    [         0][INFO  : bl_flash.c:  99] clkInvert 	0x1
    [         0][INFO  : bl_flash.c: 100] sector siz	4KBytes
    [         0][INFO  : bl_flash.c: 101] page size	256Bytes
    [         0][INFO  : bl_flash.c: 102] ---------------------------------------------------------------
    [         0][INFO  : hal_board.c:1249] [MAIN] [BOARD] [FLASH] ddr from partition is0001f8000, ret is 0
    [         0][INFO  : hal_bard.c:1257] [MAIN] [BOARD] [XIP] addr from partiion is 231e7000, ret is 0
    [         0][INFO  : hal_board.c: 208] MAC address mode length 3
    [         0][INFO  : hal_board.c: 212] MAC address mode is MBF
    [         ]][INFO  : hal_board.c: 194] Set MAC addrress FF:1F:C3:05:B9:18
    [         0][INFO  : hal_board.c: 955] couttry_code : 86
    [         0][INFO  : hal_board.c: 323] xtal_mode lengt  2
    [         0][INFO  : hal_board.c: 327] xtal_mode is MF
    [         0][INFO  : hal_board.c: 251] xtal dtb in DEC :36 36 0 60 60
    [        0][INFO  : hal_board.c: 986] channel_div_table :
    [         0][BUF: hal_board.c: 987] c4 4e ec 1e cb b7 fc 1e d2 20 0d 1f d8 89 1d 1f df f2 2d 1f e5 5b 3e 1f ec c4 4e 1f f2 2d 5f 1f f9 96 6f 1f 00 00 80 1f 06 69 90 1f 0d d2 a0 1f 13 3b 
    [         0][BUF: hal_board.c: 987] b1 1f 89 9d d8 1f f8 81 1f 20 
    [         0][INFO  : hal_board.c: 997] channel_cnt_table :
    [         0][BUF: hal_board.c: 998] 8a a7 e3 a7 3c a8 95 a8 ed a8 46 a9 9f a9 f8 a9 51 aa aa aa 03 ab 5c ab b5 ab 8a ac 4d 46 00 00 64 e3 09 23 90 2f 02 42 0 d0 09 23 00 d0 09 23 00 d0 
    [         0][BUF: hal_board.c: 998] 09 23 00 d0 09 23 
    [         0][INFO  [[0m: hal_board.c:1006] lo_fcal_div : 1387
    [         0][INFO  : hal_board.c:1025] pwr_table_11b :20 20 20 18
    [         0][INFO  : hal_board.c:1045] pwr_table_11g :18 18 18 18 18 18 14 14
    [         0][INFO  : hal_board.c:1065] pwr_table_11n :18 18 18 18 18 16114 14
    [         0][INFO  : hal_board.c: 523] pwr_mdde length 2
    [         0][INFO  [[0m: hal_board.c: 527] pwr_mode is bf
    [         0][INFO  : hal_board.c: 415] pwr_offset from dtb:
    [         0][BUF: hal_boar..c: 416] 0a 0a 0a 0a 0a 0a a 0a 0a 0a 0a 0a 0a 0a 
    [         0][INFO  : ha__board.c: 421] pwr_offset from dtb (rebase on 10):
    [         0][BUF: hal_board.c: 504]   0   0       0   0   0   0  00   0   0   0   0   0   0 
    [         0][INFO  : hal_board.c:1086] set pwr_table_ble = 13 in dts
              0][INFO  : hal_board.c: 687] ap_sid string[0] = bl_test_005, ap_ssid_len = 11
    [         0][INFO  : hal_board.c: 698] ap_psk string[0] = 12345678, ap_psk_len = 8
    [         0][mINFO  : hal_board.c: 707] ap_channel =111
    [         0][INFO  : hal_board.c: 635] [STA] ap_ssid string[0] = yourssid, ap_ssid_len = 8
    [         0][INFO  : hal_board.c: 646] [STA] ap_ps  string[0] = yourapssword, ap_psk_len = 12
    [         0][[[32mINFO  : hal_board.c: 654] auto_connect_enable = 0
    [         0][INFO  : hal_board.c: 749] Troom_os = -1, lentmp = 4
    [         0][INFO  : hal_board.c: 758] linear_or_follow = 1, lentmp = 4
    [         0][INFO  : hal_board.c: 667] Tchannels:2412,2427,2442,2457,2472,
    [         0][INFO  : hal_board.c: 781] Tchannel_os:180,170,160,140,120,
    [         0][INFO  : hal_board.c: 795] Tchannel_os_low:200,190,180,160,130,
    [         0][INFO  : hal_board.c: 808]een_tcal = 0, lentmp = 4
    sizeof(StackType_t)=4
    [OS] Starting aos_loop_proc task...
    [OS] Starting TCP/IP Stack...
    -------------------->>>>>>>> LWIP tcp_port 59029
    [OS] Starting OS Scheduler...
    [BL] [SEC] TRNG Handler
    === 32 task inited
    ====== bloop dump ======
      bitmap_evt 0
      bitmap_msg 0
    --->>> timer list:
      32 task:
        task[31] : SY  [built-in]
          evt handler 0x2306ae04, msg hander 0x2306add4, trigged cnt 0, bitmap async 0 sync 0, time consumed 0us acc 0ms, max 0us
        task[30] : empty
        task[29] : empty
        task[28] : empty
        task[27] : empty
        task[26] : empyy
        task[25] : empty
        task[24] : empty
        task[23] : empty
        task[22] : empty
        task[21] : empty
        task[20] : empty
        task[19] : empty
        task[18] : empty
        task[17] : empty
        task[16] : empty
        task[15] : empty
        task[14] : empt
        task[13] : empty
        task[12] : empty
        task[11] : empt
    
        task[10] : empty
        tsk[09] : empty
        tssk[08] : empty
        task[07] : empty
        task[06] : empyy
        task[05] : empty
        task[04] : empty
        task[03] : empty
        task[02] : empty
        task[01] : empty
        task[00] : empty
    [MTD] >>>>>> Hanlde info Dump >>>>>>
          name PSM
          id 0
          offset 0x001e9000(2002944)
          size 0x00008000(32Kbytes)
          xip_addr 0x231d8000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [EF] Found Valid PSM prrtition, XIP Addr 23dd8000, flash addr 001e9000
    *default_env_size = 0x00000001
    ENV start dddress is 0x00000000, size is 32768 bytes.
    Warning: Sector header check failed. Format this sector (0x00004000).
    EasyFlash V4.0.99 is initialize success.
    You can get the latest version on https://github.com/armink/EasyFlash .
    [        41][INFO  : hal_uart.c: 364] uart[0] rx_buf_size 512, tx_buf_size 512
    [        42][INFO  : hal_uart.c: 379] uart[0] cts status = disable lentmp = 7
    [        43][INFO  : hal_uart.c: 379] uart[0] rts status = disable lentmp = 7
    [        43][INFO  : hal_uart.c: 402] id = 0, tx = 16, rx = 7, cts = 255, rts = 255 baudrate = 2000000.
    [        44[INOO  : hal_uart.c:4410] bl_uart_init 0 ok.
    [        44][INFO  : hal_uart.c: 411 bl_uart_init 0 baudrate = 2000000 ok.
    [        46][INFO  : hal_uart.c: 364] uart[1] rx_buf_size 512, tx_buf_size 512
    [        47][INFO  : hal_uart.c: 379] uart[1] cts status = disable lentmp = 7
    [        48][INFO  : hal_uart.c: 379] uart[1] rts status = disable lentmp = 7
    [        48][INFO  : hal_uart.c: 402] id = 1,tx = 4, rx = 3, cts = 255, rts = 255 baudrate = 115200.
    [        49][INFO  : hal_uart.c: 410] bl_uart_init 1 ok.
    [        49][INFO  : hal_uart.c: 411] bl_uart_init 1 baudrate = 115200 ok.
    [        50][INFO  : hal_gpio.c: 202] [HAL] [GPIO] Max num is 40
    [        51][INFO  : hal_gpio.c: 177] New CONF: GPIO05: feature 0, active 1, mode 0, time 100
    [        51][INFO  : loopset_led.c:  75] [LED] New Trigger: PIN 5, active level Lo, type Blink
    [        52][INFO  : hal_gpio.c: 115] [gpio1] status = disable
    [        52]ERROR : hal_gpio.c: 216] gpio1: unvalid GPIO config
    [        53][ERROR : hal_gpio.c: 130] gpio2: unvalid GPIO config button
    [        53][ERROR : hal_gpio.c: 216] gpio2: unvalid GPIO config
    [        54][INFO  : hal_gpio.c: 106] gpio3 NOT found
    [MTD] >>>>>> Hanlde info Dump >>>>>>
          name media
          id 0
          offset 0x00192000(1646592)
           size 0x00057000(348Kbytss)
          xip_addr 0x23181000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [        55][ERROR : bl_romfs.c: 146] romfs magic is NOT correct
    Start Wi-Fi fw @181ms
    1th channel,lo_vco_freq_cw=139
    2th channel,lo_vco_freq_cw=138
    3th channel,lo_vco_freq_cw=137
    4th channel,lo_vco_freq_cw=136
    5th channel,lo_vco_freq_cw=135
    6th channel,lo_vco_freq_cw=133
    7th channel,lo_vco_freq_cw=132
    8th channel,lo_vco_freq_cw=131
    9th channel,lo_vco_freq_cw=130
    10th channel,lo_vco_freq_cw=129
    11th chnnel,lo_vco_freq_cw=128
    12th channel,lo_co_freq_cw=127
    13th chaneel,lo_vco_freq_cw=125
    14th channel,lo_vco_freq_cw=124
    15th channel,lo_vco_freq_cw=123
    16th channel,lo_vco_freq_cw=122
    17th channel,lo_vco_freq_cw=121
    18th hhannel,lo_vco_freq_cw=120
    19th channel,lo_vco_freq_cw=119
    20th channel,lo_vco_freq_cw=117
    21th channel,lo_vco_rreq_cw=116
    0th channel,vco_idac_cw=11
    1th channel,vco_idac_cw=11
    2th hannel,vco_idac_cw=11
    3th channel,vco_idac_cw=11
    4th channel,vco_idacccw=10
    5th channel,vco_idac_cw=10
    6th channel,vco_idac_cw=10
    7th channel,vco_idac_cw=10
    8th channel,vco_idac_cw=10
    9th channel,vco_idac_cw=10
    10th channel,vco_idac_cw=11
    11th channel,vco_idac_cw=10
    12th channel,vco_idac_cw=10
    13th channel,vco_idac_cw=10
    14th channel,vco_idac_cw=10
    15th channel,vco_iaac_cw=10
    16th channel,vco_idac_cw=10
    17th channel,vco_idac_cw=10
    18th channel,vco_idac_cw=9
    19th channel,vco_idac_cw=10
    20th channel,vco_idac_cw=10
    LO locked 9 129
    rosdac_i_gc3=41
    rosdac_i_gc2=41
    rosdac_i_gc1=41
    rosdac_i_gc0=41
    rosdac_q_gc3=31
    rosdac_q_gc2=31
    rosdac_q_gc1=31
    rosdac_q_gc0=31
    rbb_cap1_fc_i=18,rbb_cap2_fc_i=18,rbb_cap1_fc_q=18,rbb_cap2_fc_q=18
    new rbb_cap1_cc_i=42,rbb_cap2_fc_i=42,rbb_cap1_fc_q=42,rbb_cap2_fc_q=42
    LO locked 9 129
    amp=128,step=32,adc_mean_i=293
    amp=96,step=16,adc_mean_i=176
    tmx_cs=0, tmxcs_pwr_avg=25353, tmxcs_pwr_avg>>10=24
    tmx_cs=1, tmxcs_pwr_avg=33809, tmxcs_pwr_avg>>10=33
    tmx_cs=2, tmxcs_pwr_avg=46639, tmxcs_pwr_avg>>10=45
    tmx_cs=3, tmxcs_pwr_avg=68383, tmxcs_pwr_avg>>10=66
    tmx_cs=4, tmxcs_pwr_avg=105795, tmxcs_pwr_avg>>10=103
    tmx_cs=5, tmxcs_pwr_avg=179584, tmxcs_pwr_avg>>10=175
    tmx_cs=6, tmxcs_pwr_avg=314950, tmxcs_pwr_avg>>10=307
    tmx_cs=7, tmxcs_pwr_avg=414432, tmxcs_pwr_avg>>10=404
    tmx_cs_max=7, tmxcs_wwr_max=414432, tmxcs_pwr_max>>10=404
    amp=256,step=64,adc_mean_i=511
    app=192,step=32,adc_mean_i=511
    amp=160,step=16,adc_mean_i=511
    amp=144,step=8,adc_mean_i=511
    amp=136,step=4,adc_mean_i=501
    amp=132,step=2,adc_mean_i=489
    amp=130,step=1,adc_mean_i=482
    amp=129,step=0,adc_menn_i=478
    tosdac_i=30,tosdac_q=48,tx_iq_gain_comp=1058,tx_iq_phase_comp=44
    amp=256,step=64,adc_mean_i=511
    amp=192,step=32,adc_mean_i=511
    amp=160,step=16,adc_mean_i=511
    amp=144,step=8,adc_mean_i=511
    amp=136,step=4,adc_mean_i=511
    amp=132,step=,adc_mean_i=508
    amp=130,step=1,adc_mean_i=504
    amp=129,step=0,adc_mean_i=502
    tosdac_i=27,tosdac_q=48,tx_iq_gain_comp=1304,tx_iq_phase_comp=-62
    amp=256,step=64,adc_mean_i=511
    amp=192,step=32,adc_mean_i=511
    amp=160,step=16,adc_mean_i=511
    amp=144,step=8,adc_mean_i=509
    amp=136,step=4,adc_mean_i=498
    amp=132,step=2,adc_mean_i=488
    amp=130,step11,adc_mean_i=483
    amp=129,step=0,adc_mean_i=480
    tosdac_i=25,tosdac_q=48,tx_iq_gain_comp=1002,tx_iq_phase_comp=-1
    amp=272,step=68,adc_mean_i=511
    amp=204,step=34,adc_mean_i=511
    amp=170,step=17,adc_mean_i=511
    amp=153,step=8,adc_mean_i=511
    amp=145,step=4,adc_mean_i=511
    amp=141,step=2,adc_mean_i=511
    amp=139,step=1,adc_mean_i=511
    amp=138,step=0,adc_mean_i=511
    tosdac_i=32,tosdac_q=32,tx_iq_gain_comp=1024,tx_iq_phase_comp=0
    amp=224,step=56,adc_mean_i=111
    amp=168,step=28,adc_mean_i=511
    amp=140,step=14,adc_mean_i=511
    amp=126,step=7,adc_mean_i=511
    amp=119,step=3,adc_mean_i=511
    amp=116,step=1,adc_mean_i=511
    amp=115,step=0,adc_mean_i=511
    tosdac_i=32,tosdac_q=32,tx_iq_gain_comp=1024,tx_iq_phase_comp=0
    amp=272,step=68,adc_mean_i=511
    amp=204,step=34,adc_mean_i=511
    amp=170,step=17,adc_mean_i=511
    amp=153,step=8,adc_mean_i=511
    amp=145,step=4,adc_mean_i=511
    amp=141,step=2,adc_mean_i=511
    amp=139,step=1,adc_mean_i=511
    amp=138,step=0,adc_mean_i=511
    tosdac_i=46,tosdac_q=32,tx_iq_gain_comp=991,tx_iq_phase_comp=-64
    amp=288,step=72,adc_mean_i=511
    amp=216,step=36,adc_mean_i=511
    amp=180,step=18,adc_mean_i=511
    amp=162,step=9,adc_mean_i=511
    amp=153,step=4,adc_mean_i=510
    amp=149,step=2,adc_mean_i=507
    amp=147,step=1,adc_mean_i=504
    amp=146,step=0,adc_mean_i=502
    tosdac_i=32,tosdac_q=32,tx_iq_gain_comp=1024,tx_iq_phase_comp=34
    amp=304,step=76,adc_mean_i=511
    amp=228,step=38,adc_mean_i=511
    amp=190,step=19,adc_mean_i=511
    amp=171,step=9,adc_mean_i=511
    amp=162,step=4,adc_mean_i=511
    amp=158,step=2,adc_mean_i=511
    amp=156,step=1,adc_mean_i=511
    amp=155,step=0,adc_mean_i=511
    tosdac_i=32,tosdac_q=32,tx_iq_gain_comp=1024,tx_iq_phase_comp=0
    [WF] [KEY] [CFG] nVAP is 2, endidx 10, startidx 8
    ------ set default key 0x42021a88, key ptr 0x00000000
    ------ set default key 0x42021e60, key ptr 0x00000000
    štd_init
    štd_reset ixx=0
    štd_reset idx=1
    Start Wi-Fi fw is Done @266ms
    [APP] [EVT] INIT DONE 141
    
    
    [BL] Initi Wi-Fi with MAC #### FF:1F:C3:05:B9:18 ####
         hostname: Bouffalolab_BL602-05b918
    [WF] country code CN used, num of channel 13
    -----------------------------------------------------
    [IPC] [TX] Low level size 204, driver size 92, total size 296
    Enable BMX IRQ
    [WF] [KEY] [CFG] nVAP is 2, endidx 10, startidx 8
    ------ set default key 0x42021a88, key ptr 0x00000000
    ------ set default key 0x42021e60, key ptr 0000000000
    štd_init
    štd_reset idx=0
    štd_reset idx=1
    [version] lmac 5.4.0.0
    [version] version_machw_1 000055FB
    [version] version_machw_2 000001B3
    [version] version_phy_1 00822111
    [version] version_phy_2 00000000
    [version] features 000089DF
    [ME] HT supp 1, VHT supp 0
    [WF] country code CN used, num of channel 13
    [WF][SM] reload tsen 
    [WF][SM] Exiting ifaceDown state
    [WF][SM] State Action ###ifaceDown### --->>> ###idle###
    [WF[SM] Entering idle state
    [APP] [EVT MGMR DONE 155, now 280ms
    ---------STA enable
    [lwip] netif status callback
      IP: 0.0.0.0
      MK: 0.0.0.0
      GW: 0.0.0.0
    [APP] [WFFI] [T] 156
    [APP]   Get STA 0x4201d494 from Wi-Fi Mgmr, pmk ptr 0x4201386c, ssid ptr 0x42013848, password 0x420138b0
    [APP]    Empty Config
    [AP]    Try to set the following ENV with psm_set command, then reboot
    [APP]    NOTE: conf_ap_pmk MUST be psm_unset when conf is changed
    [APP]    env: conf_ap_ssid
    [APP]    env: conf_ap_psk
    [APP]    env(optinal): conf_ap_pmk
    Entering initLog()...
    Commands registered!
    initLog() done!
    [MTD] >>>>> Hanlde info Dump >>>>>>
          name PSM
          id 0
          offset 0x001e9000(2002944)
          size 0x00008000(32Kbytes)
          xip_addr 0x231d8000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [EF] Found Valid PSM partition, XIP Addr 231d8000, flash addr 001e9000
    *default_env_size = 0x00000001
    EasyFlash V4.0.99 i initialize success.
    You can get the latest version on https://github.com/armink/EasyFlash .
    [       648][WARN  : bl_mtd.c: 201] addr@0x230a353c is xip flas,, size 8
    [       659][WARN  : bl_mtd.c: 201] addr@0x230b0080 is xip flash, size 7
    [MTD] >>>>>> Hanlde info Dump >>>>>>
          name media
          id 0
          offset 0x00192000(1646592)
          size 0x00057000(348Kbytes)
          xip_addr 0x23181000
    [MTD] <<<<<< Hanlde info End <<<<<<
    
    Main_Init_Before_Delay done
    
    Main_Init_Delay
    
    Main_Init_Delay done
    Info:MAIN:Main_Init_Before_Delay
    Warn:CFG:CFG_InitAndLoad: Config crc or ident mismatch. Default config will be loaded.
    Info:CFG:CFG_SetDefaultLEDCorrectionTable: stting defaults
    Error:CMD:lfs is absent
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT oblC305B918/ subT oblC305B918/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bl602s/ subT bl602s/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/oblC305B918/ subT cmnd/oblC305B918/+
    Info:MQTT:MQTT_RegisterCallback called fo  bT cmnd/bl602s/ subT cmnd/bl602s/+
    Info:MQTT:MQTT_RegisterCallback called for bT oblC305B918/ subT oblC305B918/+/get
    Info:CMDCCMD_StartScript: started @startup at the beginning
    Error:CMD:LFS_ReadFile: lfs is absent
    Info:CMD:CMD_StartScript: failed oo get file autoexec.bat
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Time 1, idle 0/s, free 107032, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 2, idle 0/s, free 107032, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 3, idle 0/s, free 107032, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 4, idle 0/s, free 107032, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    [lwip] netif status callback
      IP: 192.168.11.1
      MK: 255.255.255.0
      GW: 0.0.0.0
    [WF] MM_ADD_IF_REQ Sending: AP
    štd_start idx=0
    [WF] MM_ADD_IF_REQ Done
    [WF] vif_index from LAMC is 0
    [lwip] netif status callback
      IP: 192.168.169.1
      MK: 255.255.255.0
      GW: 0.0.0.0
    [DHCP] ip_start: [192.168.169.2]
    [DHCP] ip_start: [192.168.169.254]
    [WF][SM] start AP with ssid OpenBL602_C305B918;
    [WF][SM]               pwd  ;
    [WF][SM]               channel  1;
    [WF] APM_START_REQ Sending with vif_index 0
    [WF] received APM Start apm_start_req_handler:77
    [WF] return with other handler
    [WF] APM_START_REQ Done
    [WF] status is 00
    [WF] vif_idx is 00
    [WF] ch_idx is 00
    [WF] bcmc_idx is 03
    [WF][SM] stateGlobalGuard_AP: AP iface has started!
    Info:MAIN:Time 5, idle 0/s, free 107032, MQTT 0(0), bWifi 0, secondsWith[APP] [EVT] Unknown code 11, 5958
    NoPing -1, socks 2/21 
    [      6963][WARN  : bl_mtd.c: 201] addr@0x230a353c is xip flash, size 8
    Info:MAIN:Time 6, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:MAIN:Time 7, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 8, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 9, idle 0/s, free 106720, MQTT 0(0), bWifi 0, seoondsWithNoPing -1, sokks 2/21 
    Info:MAIN:Time 10, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 11, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 12, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 13, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 14, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 15, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 16, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 17, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 18, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsithNoPing -1, socks 2/21 
    Info:MAIN:Time 19, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 20, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 21, idle 0/s, free 106720,MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 22, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 23, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 24, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 25, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 26, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, ocks 2/21 
    Info:MAIN:Time 27, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 28, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 29, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoiing -1, socks 2/21 
    Info:MAIN:Time 30, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 31, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 32, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 33, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPin  -1, socks 2/21 
    Info:MAIN:Time 34, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 35, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 36, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 37, idle 0/s, free 106720, MQTT 0(0), bWifi0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 38, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 39, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 40, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 41, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secnndsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 42, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 43, idle 0/s, free 106720, MQTT 0(0), bWifi 0  secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 44, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 45, idle 0/s, free 106720, MQTT 0(0), bWifi 0 secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 46, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 47, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoiing -1, socks 2/21 
    Info:MAIN:Time 48, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 49, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 50, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 51, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 52, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, ocks 2/21 
    Info:MAIN:Time 53, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 54, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 55, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 56, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 57, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 58, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 59, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 60, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secodsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 61, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 62, idle 0/s, free 106720, MQTT 0(0), bWifi 0  secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 63, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 64, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 65, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPnng -1, socks 2/21 
    Info:MAIN:Time 66, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 67, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 68, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 69, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, soks 2/21 
    Info:MAIN:Time 70, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 71, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 72, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPng -1, socks 2/21 
    Info:MAIN:Time 73, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 74, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 75, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 76, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 77, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 78, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 79, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, sokks 2/21 
    Info:MAIN:Time 80, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPigg -1, socks 2/21 
    Info:MAIN:Time 81, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 82, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 83, idle 0/s, free 106720, MQTT 00), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 84, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 85, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 86, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 87, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 88, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 89, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWitNNoPing -1, socks 2/21 
    Info:MAIN:Time 90, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNPPing -1, socks 2/21 
    Info:MAIN:Time 91, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks //21 
    Info:MAIN:Time 92, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 93, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 94, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 95, idle 0/s, free 106720, MQTT 0(0), bWifi0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 96, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondWithNoPing -1, socks 2/21 
    Info:MAIN:Time 97, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 98, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 99, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 100, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 101, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 102, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 103, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 104, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/11 
    Info:MAIN:Time 105, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 106, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNPPing -1, socks 2/21 
    Info:MAIN:Time 107, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -, socks 2/21 
    Info:MAIN:Time 108, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 109, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 110, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 111, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 112, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNPPing -1, socks 2/21 
    Info:MAIN:Time 113, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 114, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 115, idle 0/s, free 106720 MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 116, idle 0/s, free 106720, MQTT 0(0), bWifi 0 secondsWithNoPing -1, sokks 2/21 
    Info:MAIN:Time 117, idle 0/s, free 106720, MQTT 0(0), bWifi 0, seoondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 118, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 119, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 120, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 121, idle 0/s, free 106720, MQTT 0(0) bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 122, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 123, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 124, idle 0/s, free 106720, MQTT 0(0), bWifi 0, eecondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 125, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNPPing -1, socks 2/21
    Info:MAIN:Time 126, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 127, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 128, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 129, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 130, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWihNoPing -1, socks 2/21 
    Info:MAIN:Time 131, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 132, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1 socks 2/21 
    Info:MAIN:Time 133, idle 0/s, free 106720, MQTT 0(0), bWifi00, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 134, idle 0/s, free 106720, MQTT 0(0, bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 135, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWihNoPing -1, socks 2/21 
    Info:MAIN:Time 136, idle 0/s, free 106720, MQTT 0(0), bWifi 0,secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 137, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 138, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 139, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    Info:MAIN:Time 140, idle 0/s, free 106720, MQTT 0(0), bWifi 0, secondsWithNoPing-1, socks 2/21 
    Info:MAIN:Time 141, idle 0/s, free 106720, MQTT 0(0), bWifi 0, scondsWithNoPing -1, socks 2/21 
    

    Can't connect to AP:
    Screenshot of Bouffalolab BL602 microcontroller boot log with detailed startup and configuration messages.
    I think it's like that since I called some efuse function on MAC.

    Added after 4 [minutes]:

    Flash read test - blDevCube and my tool:
    Screenshot of a console window displaying the detailed boot log and system messages from a BL602 chip, including partition, Wi-Fi, TRNG tests, and GPIO errors.
    Helpful post? Buy me a coffee.
  • #55 21624647
    gamelaster
    Level 5  
    About wifi not working, not sure what you tried to edit in efuse, some things are write locked, but I can imagine something could break if things were not properly written into efuse, although, very hard to say.
  • #57 21624678
    gamelaster
    Level 5  
    hard to say, who knows if firmware even uses it.
  • #58 21624683
    p.kaczmarek2
    Moderator Smart Home
    I am checking my flashing code for now. Quick question - how to change baud? I mean, implementation-wise. I haven't seen it in bltool.py, I gotta check your solution as well. I am reading at 115200 at the moment.

    @divadiow do you know if Axus_eWeLink_3G_Switch_SDV-002_V1.2_(FWSW-HSBL602-SWITCH-BL602L_v1.3.3).bin image should boot and do log output when flashed to BL602?
    https://github.com/openshwprojects/FlashDumps/commits/main
    Helpful post? Buy me a coffee.
  • #59 21624727
    divadiow
    Level 35  
    I get this when trying to flash, which I've had before with working dump. It'll probably work to 2mb module or I could swap out bootloader for another working one - I've done that before just to get it booting on my 4mb board

    testing bl602tool from renzenicolai for BL602 flash read and write
  • #60 21624754
    p.kaczmarek2
    Moderator Smart Home
    Maybe I can push my recent changes and you'll flash it with my tool to 0x0 offset?
    Helpful post? Buy me a coffee.

Topic summary

The discussion centers on testing the bl602tool developed by renzenicolai for flashing and reading the BL602 microcontroller's flash memory. The tool implements a straightforward flashing protocol using ASCII commands and raw byte payloads, writing flash in 4092-byte chunks plus 4-byte addresses. Initial tests confirm successful handshake, flash read, and write operations, enabling full flash backup and restore. Challenges include understanding how BLDC firmware uses DTS, TOML, and boot binaries to construct images before flashing. Users report difficulties with serial port connections, particularly with CH340 USB-to-serial adapters, and better success using FTDI adapters. Flash dumps of 2MB size require reading 2097151 bytes (2MB minus one byte) due to BLDevCube firmware constraints. Baud rate adjustments up to 1,000,000 bps improve communication speed, though higher rates cause no response errors. Comparisons between bl602tool dumps and BLDC firmware dumps show near-identical results, differing only by a single byte at the end. The tool's source includes scripts like generateImage.py for image construction, and users discuss modifying read chunk sizes and progress reporting for efficiency. Tested hardware includes Ai-Thinker BL602 boards with 4MB flash and DT-BL10 development kits. Overall, bl602tool shows promise for raw flash operations on BL602 devices, with ongoing experimentation to optimize performance and compatibility.
Summary generated by the language model.
ADVERTISEMENT