logo elektroda
logo elektroda
X
logo elektroda

Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

p.kaczmarek2 119475 485
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #91 20088846
    p.kaczmarek2
    Moderator Smart Home
    Does the problem persist if you disable the new MQTT flag (flag 3)?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #92 20089584
    any1_
    Level 2  
    Hey there :)
    First of all thank you for doing this awesome project! just received some MagicHome LED controller and wanted to flash them with tasmota when I realized that they had this BL602 chip which isn't supported by them - but you saved me.
    Took me this whole day to set both controllers up with your software and get them to show up in my home assistant instance. (because i'm a noob, your documentation is really nice)
    Sadly I now have some issues which i really think i can't fix on my own;
    one of the led controllers keeps "crashing" after 3-4 minutes. In the first couple of mins it works perfectly - reacts to on/off/colorchange through HA and web interface is reachable.
    But always after 3-4 mins something seems to happen. Interface isn't reachable anymore, and can't switch on/off via mqtt.
    LOG shows this
    Spoiler:
    Debug:API:GET of api/pins
    Debug:API:GET of api/info
    Debug:API:GET of api/logconfig
    Debug:API:POST to api/cmnd
    Debug:CMD:cmd [loglevel 4]
    Debug:CMD:loglevel set 4
    Info:MAIN:Time 128, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Debug:API:GET of api/pins
    Debug:API:GET of api/channels
    Info:MAIN:Time 135, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Debug:API:GET of api/info
    Debug:API:GET of api/pins
    Debug:API:GET of api/pins
    Debug:API:GET of api/channels
    Info:MAIN:Time 139, free 96664, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 140, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 145, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 150, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 154, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 157, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 161, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 165, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Debug:API:GET of api/info
    Info:MAIN:Time 169, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 170, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 174, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 175, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 179, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 180, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 184, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 185, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 189, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 190, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Debug:API:POST to api/cmnd
    Debug:CMD:cmd [logfeature 9 1]
    Debug:CMD:logfeature set 0x01FFFFFF
    Info:MAIN:Time 194, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 197, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 200, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 204, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 209, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 210, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 212, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 217, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    Info:MAIN:Time 218, free 105344, MQTT 1, bWifi 1, secondsWithNoPing -1

    resetted the device multiple times by pulling power 4xbut this didn't help.
    Also; resetting this way seems not to work that well either way as the device shows up as wifi host but when accessed all the input data as still as before reset.
    Hope you can help me <3

    Edit: Maybe one thing that took me a while to fiuggure out and could be improved on the initial post:
    The config.yaml content you provided still follows the old/outdated syntax, right? Update there would maybe help some ppl out
  • ADVERTISEMENT
  • #93 20089677
    p.kaczmarek2
    Moderator Smart Home
    do you have the same magic led device as me or a different one?

    does it work without crashing if you disable MQTT?

    any1_ wrote:

    Also; resetting this way seems not to work that well either way as the device shows up as wifi host but when accessed all the input data as still as before reset.

    it works well, it starts as wifi host and it's run without setting up pins, so you can revert config manually to one that does not crash
    Helpful post? Buy me a coffee.
  • #94 20089870
    any1_
    Level 2  
    i have the version that came only with wifi, without IR remote Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

    how would i go about disabling mqtt? simply removing all entrys in the mqtt config menu?
  • #95 20089961
    p.kaczmarek2
    Moderator Smart Home
    Set empty host and passphrase
    Helpful post? Buy me a coffee.
  • #96 20090295
    any1_
    Level 2  
    ok disabling mqtt stopped the device from crashing again. (checked till time 650)
    but without it it's also quite useless unfortunately :0
  • #97 20090314
    p.kaczmarek2
    Moderator Smart Home
    Ok, so which options are you using, which general flags? Are you using MQTT broadcast every minute or something like that?

    I suspect that you're hitting MQTT buffer limits and I might need to increase them in next build.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #98 20090396
    any1_
    Level 2  
    wanted to check interface for that and seems like device, even without MQTT has crashed now, according to my router it doesn't have a connection anymore :0
    should i maybe try something like flashing it again? or do you think that won't help and maybe hardware is just weaker/broken somewhere? just confused bc other controller works fine
  • #99 20090481
    p.kaczmarek2
    Moderator Smart Home
    You have two devices and one works and the other doesn't? Two same BL602 with the same version?

    Well I will try to find my BL602 dev board and check
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    OpenBL602_1.5.8.bin paired with HA, single LED control (dev board)

    edit: waiting for crash...
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    edit: still stable:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    do you have any flags checked?
    Helpful post? Buy me a coffee.
  • #100 20098762
    droege
    Level 10  
    Hi again,
    so, I tested 1.6.9 on BL602:
    When using the Flag3 MQTT - Report every 30 seconds together with Flag2, the device goes wild.
    It's not really accepting MQTT messages any more, and it doesn't report correctly.
    By just using Flag 2 without Flag 3 it works ok.

    BUT:
    Again, for colors:
    If I set the dim value to e.g. 50% and the sending FF0000 it scales the color down to 50%. This is not intended.
    For me it makes more sense to scale dim-value according to RGB not vice versa and report dim-value like final_color.
    Setting a new RGB overwrites any dim-value, as it is IN the RGB code.

    Reporting Final_color when HUE/SAT changes works well.

    Thanks,
    best.

    BTW: nice new web-interface. Looks more tasmota-ish ;)

    Added after 3 [minutes]:

    One addition:
    When powering on, the device still turns channel 1 shortly to ON, independent what is configured as start-value.
    LED RGBWW controller.
    Thanks,
    best.
  • #101 20098848
    p.kaczmarek2
    Moderator Smart Home
    @droege are you able to compile the binary yourself? I'm just asking, you could help with increasing MQTT limitations from LWIP

    if not, I might get you a binary myself
    Helpful post? Buy me a coffee.
  • #102 20099485
    droege
    Level 10  
    Hey again,
    sorry, I'm not able to compile binaries by myself. The toolchain looks pretty difficult, and on Windows there is no way for me.
    Sorry for that.
    Cheers.
  • ADVERTISEMENT
  • #103 20099490
    p.kaczmarek2
    Moderator Smart Home
    Oh ok then, is your controler RGB or RGBCW? You have 5 separate color channels, right?

    I am asking because it seems that I need to increase the MQTT limits in LWIP library. They are hardcoded limits saying that, for example, there can be at once 4 requests sent, no more.
    Something like I did here:
    https://github.com/openshwprojects/OpenBK7231...mmit/ff6c85e6fe830a3e8efd4af82cb0f8e5536f5b7f
    well, maybe, I will try to increase them now, wait a sec
    EDIT: Can you try latest build, when it finishes and it's up on github?

    I need to know if it improves anything, if not, you'll have wait more for me to investigate
    Helpful post? Buy me a coffee.
  • #104 20099518
    droege
    Level 10  
    Hi again,
    thanks, I will test tomorrow.
    I have a 4 Channel RGBW controller with W= WarmWihte, that of course depends on the stripe.
    I will test with new MQTT settings.
    Will report.
    Cheers.

    Added after 8 [hours] 45 [minutes]:

    Hey again,
    I've tested 1.7.1:
    MQTT seems to work partially fine.
    Used Flag1&2, no problems concerning that for the first minute or two.
    AFTER THAT: The device still works, but doesn't communicate via MQTT reliable. This seems to be shaky, because after a while (again a minute) it gets better, than worse again ....
    Either the device has not the time to communicate via MQTT, or anything else is going on.

    For Flag2: are you reporting only the channels? No other information is updated for me. Is that right?
    BTW: Is the device reporting (at least at startup) it's IP-Adress?
    Thanks,
    best.
  • #105 20102424
    p.kaczmarek2
    Moderator Smart Home
    But with flags 1 and 2 off, there are no problems?

    Ok I will look into it.

    IP is broadcasted every minute.
    Only raw channels values are broadcasted every minute at the moment.

    I am updating LED driver and adding correct (final abstract) controls to web panel:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Please wait a day or so, then I will need help with testing

    EDIT: "I have a 4 Channel RGBW controller with W= WarmWihte, that of course depends on the stripe."
    Is expected behaviour for this controller a separate setting of RGB and separate slider for Warm White?
    Should it behave like:
    a) you can set RGB or warm white, never both at once
    OR
    b) you can set both RGB and warm white anyway you want?
    Helpful post? Buy me a coffee.
  • #106 20102444
    droege
    Level 10  
    Hey again,
    is there a specific topic for IP-broadcast?
    I'm not receiving the IP-address via MQTT.

    For my Stripe-Controller: it's type B (you can set RGB & WarmWhite) however you would like.

    I will wat, until you need testing.

    Thanks,
    best.
  • #107 20102461
    p.kaczmarek2
    Moderator Smart Home
    Topic is like the channel name, but not a number, an "IP" string instead.
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

    Dodano po 1 [godziny] 14 [minuty]:

    Bump bump, topic update, @droege can you check?
    I am investigating some MQTT issues and I can confirm that device used to lock itself with extensive MQTT reporting enabled.

    In the current state, it should not crash, but can still disconnect MQTT if overloaded (then the bulb becomes Unavailable in HA and MQTT shows as 0 in log)

    I am still testing, but it seems that the "locking itself" issue is gone.

    This is not a final fix.

    Can you check?
    ALSO - you might want to go to Flags and enable flag 4 - legacy raw PWM controler instead of new smart one.
    This is how smart LED control looks like now:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Helpful post? Buy me a coffee.
  • #108 20102707
    droege
    Level 10  
    Hey again,
    tested it.
    MQTT is not blocked and the device also not.
    BUT: I used Flags 1,2,3, so FinalColor, every minute & old UI;
    FinalColor is being reported, the old UI is also available, but it's not reporting anything every minute.
    And it's also NOT reporting the IP-Address.
    Sorry. But at least, it's not blocked.

    Best.
  • #109 20103710
    droege
    Level 10  
    So, I tested 1.10.0:
    Broadcast of channel-state & IP_Address works. Great ;)
    Same for other MQTT messages, even when changing colors, etc.

    But: the device, even when no Web-Interface is requested and nor command is issued, gets warm. Meaning: some difficult tasks are running, and burning energy/producing heat. Is it only MQTT that runs all the time?

    Cheers.
  • #110 20103716
    p.kaczmarek2
    Moderator Smart Home
    I haven't replied to your last post because I still consider BL602 MQTT broadcast every minute bugged. I suspect it will crash, sooner or later.

    Currently it has a following adnotation:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

    I am not sure what's wrong, I think there might be multiple issues at fault. I checked the threading issues and stack size multiple times, but the mutex is in place and should work flawlessly, stack size should also fit.

    There was indeed a nasty BL602 platform bug where I assumed that sizeof(StackType_t) is 1 while it was 4 (stack size is given in words), very silly of me, but on vanilla beken platform it was in bytes... thus making all stacks unnecesarily large... but still, there is some other problem at play.

    Right now I'd say "don't broadcast every minute" and you should be fine.

    droege wrote:

    But: the device, even when no Web-Interface is requested and nor command is issued, gets warm. Meaning: some difficult tasks are running, and burning energy/producing heat. Is it only MQTT that runs all the time?

    I think that nothing should change in that regard. You might need to double check, or check without mqtt broadcast


    The funny thing is it never happened for me until I tried to replicate your problem. It's just I didn't use that "every minute" flag.


    PS: @droege , if you also want to improve stability, can you tell me is there something that we should not broadcast but it's broadcasted now? Maybe that final color vs base color broadcast, do you use both of them? Maybe I should split the "base color broadcast" (if that's not used) and add a separate flag for that, so people can disable it if that's not needed?
    Helpful post? Buy me a coffee.
  • #111 20103801
    droege
    Level 10  
    p.kaczmarek2 wrote:

    Right now I'd say "don't broadcast every minute" and you should be fine.

    droege wrote:

    But: the device, even when no Web-Interface is requested and nor command is issued, gets warm. Meaning: some difficult tasks are running, and burning energy/producing heat. Is it only MQTT that runs all the time?

    I think that nothing should change in that regard. You might need to double check, or check without mqtt broadcast

    The funny thing is it never happened for me until I tried to replicate your problem. It's just I didn't use that "every minute" flag.

    PS: @droege , if you also want to improve stability, can you tell me is there something that we should not broadcast but it's broadcasted now? Maybe that final color vs base color broadcast, do you use both of them? Maybe I should split the "base color broadcast" (if that's not used) and add a separate flag for that, so people can disable it if that's not needed?


    Ok, I disabled the broadcast every minute. Looks fine.

    For your question: I wouldn't broadcast the IP-Address every minute, just once at startup of the device. Because that usually doesn't change.
    For colors: I'm not using Flag0 (basecolor), but would love to have dimmer separately. I'm using Flag1 (finalcolor).

    And if you could then modify the dimmer behaviour so that it gets overwritten, when a new RGB color is set (as described earlier), and rebroadcast dimmer/finalcolor, that would be great.

    Thanks,
    best.
  • #113 20115200
    bartek666666
    Level 10  
    Hello

    The batch loads without any problems (on 3 different programmers), but the board does not start.

    [23:15:41.426] - Write check
    [23:15:41.446] - Flash load time cost(ms): 3520.0048828125
    [23:15:41.446] - Finished
    [23:15:41.456] - Sha caled by host: 0e1153e32ab88df80625d76cff354b799c48eda0f83fca86c52f6ea6898a067d
    [23:15:41.456] - xip mode Verify
    [23:15:41.676] - Read Sha256/709504
    [23:15:41.686] - Flash xip readsha time cost(ms): 210.0
    [23:15:41.686] - Finished
    [23:15:41.696] - Sha caled by dev: 0e1153e32ab88df80625d76cff354b799c48eda0f83fca86c52f6ea6898a067d
    [23:15:41.696] - Verify success
    [23:15:41.696] - Dealing Index 4
    [23:15:41.696] - ========= programming chips\bl602\device_tree\ro_params.dtb to 0x1f8000
    [23:15:41.706] - ========= flash load =========
    [23:15:41.706] - ========= flash erase =========
    [23:15:41.706] - Erase flash  from 0x1f8000 to 0x1f9729
    [23:15:41.716] - erase pending
    [23:15:41.756] - erase pending
    [23:15:41.816] - Erase time cost(ms): 110.00048828125
    [23:15:41.826] - decompress flash load 1640
    [23:15:41.836] - Load 1640/1640 {"progress":100}
    [23:15:41.836] - Load 1640/1640 {"progress":100}
    [23:15:41.846] - Write check
    [23:15:41.856] - Flash load time cost(ms): 39.999755859375
    [23:15:41.856] - Finished
    [23:15:41.856] - Sha caled by host: 4fd42b104897efb92f6a396b4e15193b842fd35a4463dacd20f2ea64ff354634
    [23:15:41.856] - xip mode Verify
    [23:15:41.886] - Read Sha256/5930
    [23:15:41.886] - Flash xip readsha time cost(ms): 10.000244140625
    [23:15:41.886] - Finished
    [23:15:41.906] - Sha caled by dev: 4fd42b104897efb92f6a396b4e15193b842fd35a4463dacd20f2ea64ff354634
    [23:15:41.906] - Verify success
    [23:15:41.906] - Program Finished
    [23:15:41.906] - All time cost(ms): 10290.014404296875
    [23:15:42.116] - close interface
    [23:15:42.116] - [All Success]
    


    When I try to check the logs, I get the error "ErrorCode": "0001","ErrorMsg":"BFLB EFLASH LOADER SHAKEHAND FAIL"

    [23:18:06.518] - Flash load shake hand
    [23:18:07.438] - default set DTR high
    [23:18:07.538] - clean buf
    [23:18:07.538] - send sync
    [23:18:07.648] - ack is b''
    [23:18:07.648] - retry
    [23:18:07.648] - default set DTR high
    [23:18:07.748] - clean buf
    [23:18:07.748] - send sync
    [23:18:07.858] - ack is b''
    [23:18:07.858] - retry
    [23:18:07.858] - {"ErrorCode": "0001","ErrorMsg":"BFLB EFLASH LOADER SHAKEHAND FAIL"}
    [23:18:07.858] - Shake hand redo
    [23:18:09.858] - ack is b''
    [23:18:09.858] - Not ack OK
    [23:18:09.858] - Read log
    [23:18:09.858] - Read Fail
    
  • #114 20115338
    p.kaczmarek2
    Moderator Smart Home
    I feel like you`re not following the steps as described.

    The message below does not come from the device logs, but from the programmer:
    bartek666666 wrote:

    When I try to check the logs, I get the error "ErrorCode": "0001","ErrorMsg":"BFLB EFLASH LOADER SHAKEHAND FAIL"

    What appears on UART when you disconnect the boot signal and restart the device by cutting off the power?

    I am attaching logs from correct programming and from programming that failed due to failure to connect the boot signal:

    Spoiler:

    Correct:
    
    [08:09:26.418] - [param]
    interface_type = "Uart"
    comport_uart = "COM10"
    speed_uart = "2000000"
    speed_jlink = "1000"
    bl60x_brd = "IoTKitA"
    bl60x_xtal = "40M"
    aes_key = ""
    aes_iv = ""
    addr = "0x0"
    
    [check_box]
    partition_download = true
    boot2_download = true
    bin_download = true
    media_download = false
    use_romfs = false
    mfg_download = false
    ro_params_download = true
    ckb_erase_all = "False"
    encrypt = false
    download_single = false
    
    [input_path]
    pt_bin_input = "W:\\GIT\\OpenBL602\\tools\\flash_tool\\bl602\\partition\\partition_cfg_2M.toml"
    boot2_bin_input = "W:\\GIT\\OpenBL602\\tools\\flash_tool\\bl602\\builtin_imgs\\blsp_boot2.bin"
    cfg2_bin_input = "W:\\GIT\\OpenBL602\\customer_app\\bl602_sharedApp\\build_out\\bl602_sharedApp.bin"
    meida_bin_input = ""
    romfs_dir_input = ""
    mfg_bin_input = ""
    img_bin_input = ""
    [08:09:26.425] - ========= Interface is Uart =========
    [08:09:26.432] - eflash loader bin is eflash_loader_40m.bin
    [08:09:26.435] - ========= chip flash id: ef4015 =========
    [08:09:26.447] - Update flash cfg finished
    [08:09:26.452] - create partition.bin, pt_new is True
    [08:09:26.456] - bl60x_fw_boot_head_gen xtal: 40M
    [08:09:26.461] - Create bootheader using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:09:26.462] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [08:09:26.466] - Created file len:176
    [08:09:26.471] - Create efuse using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:09:26.474] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [08:09:26.478] - Created file len:128
    [08:09:26.483] - ========= sp image create =========
    [08:09:26.486] - Image hash is b'c5e2ce515a5783ac80efdd4910238a466572f882b53b3284e63c763e1da9847f'
    [08:09:26.487] - Header crc: b'52b188af'
    [08:09:26.487] - Write flash img
    [08:09:26.496] - bl60x_fw_boot_head_gen xtal: 40M
    [08:09:26.501] - Create bootheader using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:09:26.501] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [08:09:26.505] - Created file len:176
    [08:09:26.509] - Create efuse using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:09:26.511] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [08:09:26.514] - Created file len:128
    [08:09:26.520] - ========= sp image create =========
    [08:09:26.533] - Image hash is b'4f3139b89da357f6d4b9c058eaf8d161a55237996f1d22e27c13105ec13f963c'
    [08:09:26.534] - Header crc: b'64cee850'
    [08:09:26.534] - Write flash img
    [08:09:26.550] - FW Header is 176, 3920 still needed
    [08:09:26.552] - FW OTA bin header is Done. Len is 4096
    [08:09:26.909] - FW OTA bin is Done. Len is 707584
    [08:09:27.911] - FW OTA xz is Done
    [08:09:27.912] - ========= eflash loader config =========
    [08:09:28.009] - =========W:\GIT\OpenBL602\tools\flash_tool\bl602\device_tree/bl_factory_params_IoTKitA_40M.dts ——> bl602/device_tree/ro_params.dtb=========
    [08:09:28.338] - Version: bflb_eflash_loader_v2.0.0
    [08:09:28.339] - Program Start
    [08:09:28.339] - ========= eflash loader cmd arguments =========
    chipname : None
    chipid : False
    usage : False
    flash : True
    efuse : False
    write : True
    erase : False
    read : False
    none : False
    port : COM10
    baudrate : None
    config : None
    interface : None
    xtal : None
    start : None
    end : None
    addr : None
    mac : None
    file : None
    data : None
    mass : None
    loadstr : None
    loadfile : None
    userarea : None
    csvfile : None
    csvaddr : None
    para : None
    aeskey : None
    aesiv : None
    key : None
    ecdh : False
    echo : False
    auto : False
    version : False
    [08:09:28.392] - Config file: W:\GIT\OpenBL602\tools\flash_tool\bl602\eflash_loader/eflash_loader_cfg.ini
    [08:09:28.394] - serial port is COM10
    [08:09:28.395] - chiptype: bl602
    [08:09:28.396] - ========= Interface is Uart =========
    [08:09:28.396] - com speed: 2000000
    [08:09:28.396] - Eflash load helper file: W:\GIT\OpenBL602\tools\flash_tool\bl602\eflash_loader/eflash_loader_40m.bin
    [08:09:28.397] - Eflash load helper file: W:\GIT\OpenBL602\tools\flash_tool\bl602\eflash_loader/eflash_loader_40m.bin
    [08:09:28.397] - ========= load eflash_loader.bin =========
    [08:09:28.398] - Load eflash_loader.bin via uart
    [08:09:28.399] - ========= image load =========
    [08:09:28.671] - tx rx and power off, press the machine!
    [08:09:28.672] - cutoff time is 0.1
    [08:09:28.779] - power on tx and rx
    [08:09:29.588] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
    [08:09:29.589] - clean buf
    [08:09:29.696] - send sync
    [08:09:29.928] - ack is b'4f4b'
    [08:09:29.974] - shake hand success
    [08:09:29.990] - get_boot_info
    [08:09:29.994] - data read is b'010000000000000003000000b0cada42e8b41a00'
    [08:09:29.995] - sign is 0 encrypt is 0
    [08:09:30.017] - segcnt is 1
    [08:09:30.026] - segdata_len is 30192
    [08:09:30.111] - 4080/30192
    [08:09:30.196] - 8160/30192
    [08:09:30.282] - 12240/30192
    [08:09:30.367] - 16320/30192
    [08:09:30.453] - 20400/30192
    [08:09:30.537] - 24480/30192
    [08:09:30.624] - 28560/30192
    [08:09:30.660] - 30192/30192
    [08:09:30.663] - Run img
    [08:09:30.778] - Load helper bin time cost(ms): 2378.57373046875
    [08:09:30.886] - ========= flash read jedec ID =========
    [08:09:30.887] - Flash load shake hand
    [08:09:30.889] - clean buf
    [08:09:30.995] - send sync
    [08:09:31.226] - ack is b'4f4b'
    [08:09:31.274] - Read flash jedec ID
    [08:09:31.275] - readdata:
    [08:09:31.276] - b'ef401500'
    [08:09:31.277] - Finished
    [08:09:31.278] - Program operation
    [08:09:31.280] - Dealing Index 0
    [08:09:31.281] - ========= programming bl602/img_create/whole_img_boot2.bin to 0x00000000
    [08:09:31.281] - ========= flash load =========
    [08:09:31.283] - ========= flash erase =========
    [08:09:31.284] - Erase flash  from 0x0 to 0xb98f
    [08:09:31.683] - Erase time cost(ms): 398.25439453125
    [08:09:31.730] - decompress flash load 22164
    [08:09:31.747] - Load 2048/22164 {"progress":9}
    [08:09:31.764] - Load 4096/22164 {"progress":18}
    [08:09:31.780] - Load 6144/22164 {"progress":27}
    [08:09:31.796] - Load 8192/22164 {"progress":36}
    [08:09:31.813] - Load 10240/22164 {"progress":46}
    [08:09:31.829] - Load 12288/22164 {"progress":55}
    [08:09:31.846] - Load 14336/22164 {"progress":64}
    [08:09:31.862] - Load 16384/22164 {"progress":73}
    [08:09:31.878] - Load 18432/22164 {"progress":83}
    [08:09:31.895] - Load 20480/22164 {"progress":92}
    [08:09:31.910] - Load 22164/22164 {"progress":100}
    [08:09:31.911] - Load 22164/22164 {"progress":100}
    [08:09:31.912] - Write check
    [08:09:31.938] - Flash load time cost(ms): 252.806884765625
    [08:09:31.938] - Finished
    [08:09:31.940] - Sha caled by host: 194e180166ca945012e261580c23e9a181fb3d34a9e1a50c54d0dd649754a400
    [08:09:31.941] - xip mode Verify
    [08:09:31.950] - Read Sha256/47504
    [08:09:31.951] - Flash xip readsha time cost(ms): 7.568115234375
    [08:09:31.952] - Finished
    [08:09:31.955] - Sha caled by dev: 194e180166ca945012e261580c23e9a181fb3d34a9e1a50c54d0dd649754a400
    [08:09:31.956] - Verify success
    [08:09:31.957] - Dealing Index 1
    [08:09:31.959] - ========= programming bl602/partition/partition.bin to 0xe000
    [08:09:31.960] - ========= flash load =========
    [08:09:31.961] - ========= flash erase =========
    [08:09:31.962] - Erase flash  from 0xe000 to 0xe10f
    [08:09:32.008] - Erase time cost(ms): 45.746337890625
    [08:09:32.013] - Load 272/272 {"progress":100}
    [08:09:32.014] - Load 272/272 {"progress":100}
    [08:09:32.014] - Write check
    [08:09:32.016] - Flash load time cost(ms): 6.9921875
    [08:09:32.017] - Finished
    [08:09:32.018] - Sha caled by host: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [08:09:32.018] - xip mode Verify
    [08:09:32.023] - Read Sha256/272
    [08:09:32.024] - Flash xip readsha time cost(ms): 2.991943359375
    [08:09:32.024] - Finished
    [08:09:32.026] - Sha caled by dev: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [08:09:32.027] - Verify success
    [08:09:32.028] - Dealing Index 2
    [08:09:32.029] - ========= programming bl602/partition/partition.bin to 0xf000
    [08:09:32.029] - ========= flash load =========
    [08:09:32.030] - ========= flash erase =========
    [08:09:32.030] - Erase flash  from 0xf000 to 0xf10f
    [08:09:32.092] - Erase time cost(ms): 60.98291015625
    [08:09:32.096] - Load 272/272 {"progress":100}
    [08:09:32.097] - Load 272/272 {"progress":100}
    [08:09:32.097] - Write check
    [08:09:32.100] - Flash load time cost(ms): 5.9833984375
    [08:09:32.100] - Finished
    [08:09:32.101] - Sha caled by host: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [08:09:32.101] - xip mode Verify
    [08:09:32.106] - Read Sha256/272
    [08:09:32.106] - Flash xip readsha time cost(ms): 2.961669921875
    [08:09:32.107] - Finished
    [08:09:32.109] - Sha caled by dev: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [08:09:32.110] - Verify success
    [08:09:32.110] - Dealing Index 3
    [08:09:32.111] - ========= programming bl602/img_create/whole_img.bin to 0x10000
    [08:09:32.111] - ========= flash load =========
    [08:09:32.113] - ========= flash erase =========
    [08:09:32.114] - Erase flash  from 0x10000 to 0xbcbff
    [08:09:35.357] - Erase time cost(ms): 3242.83447265625
    [08:09:36.069] - decompress flash load 379080
    [08:09:36.086] - Load 2048/379080 {"progress":0}
    [08:09:36.106] - Load 4096/379080 {"progress":1}
    [08:09:36.123] - Load 6144/379080 {"progress":1}
    [08:09:36.140] - Load 8192/379080 {"progress":2}
    [08:09:36.158] - Load 10240/379080 {"progress":2}
    [08:09:36.175] - Load 12288/379080 {"progress":3}
    [08:09:36.193] - Load 14336/379080 {"progress":3}
    [08:09:36.210] - Load 16384/379080 {"progress":4}
    [08:09:36.228] - Load 18432/379080 {"progress":4}
    [08:09:36.246] - Load 20480/379080 {"progress":5}
    [08:09:36.262] - Load 22528/379080 {"progress":5}
    [08:09:36.278] - Load 24576/379080 {"progress":6}
    [08:09:36.294] - Load 26624/379080 {"progress":7}
    [08:09:36.310] - Load 28672/379080 {"progress":7}
    [08:09:36.326] - Load 30720/379080 {"progress":8}
    [08:09:36.343] - Load 32768/379080 {"progress":8}
    [08:09:36.359] - Load 34816/379080 {"progress":9}
    [08:09:36.376] - Load 36864/379080 {"progress":9}
    [08:09:36.392] - Load 38912/379080 {"progress":10}
    [08:09:36.409] - Load 40960/379080 {"progress":10}
    [08:09:36.425] - Load 43008/379080 {"progress":11}
    [08:09:36.442] - Load 45056/379080 {"progress":11}
    [08:09:36.464] - Load 47104/379080 {"progress":12}
    [08:09:36.481] - Load 49152/379080 {"progress":12}
    [08:09:36.498] - Load 51200/379080 {"progress":13}
    [08:09:36.514] - Load 53248/379080 {"progress":14}
    [08:09:36.530] - Load 55296/379080 {"progress":14}
    [08:09:36.547] - Load 57344/379080 {"progress":15}
    [08:09:36.563] - Load 59392/379080 {"progress":15}
    [08:09:36.580] - Load 61440/379080 {"progress":16}
    [08:09:36.596] - Load 63488/379080 {"progress":16}
    [08:09:36.611] - Load 65536/379080 {"progress":17}
    [08:09:36.629] - Load 67584/379080 {"progress":17}
    [08:09:36.645] - Load 69632/379080 {"progress":18}
    [08:09:36.661] - Load 71680/379080 {"progress":18}
    [08:09:36.677] - Load 73728/379080 {"progress":19}
    [08:09:36.694] - Load 75776/379080 {"progress":19}
    [08:09:36.711] - Load 77824/379080 {"progress":20}
    [08:09:36.727] - Load 79872/379080 {"progress":21}
    [08:09:36.744] - Load 81920/379080 {"progress":21}
    [08:09:36.760] - Load 83968/379080 {"progress":22}
    [08:09:36.776] - Load 86016/379080 {"progress":22}
    [08:09:36.792] - Load 88064/379080 {"progress":23}
    [08:09:36.809] - Load 90112/379080 {"progress":23}
    [08:09:36.825] - Load 92160/379080 {"progress":24}
    [08:09:36.841] - Load 94208/379080 {"progress":24}
    [08:09:36.858] - Load 96256/379080 {"progress":25}
    [08:09:36.874] - Load 98304/379080 {"progress":25}
    [08:09:36.890] - Load 100352/379080 {"progress":26}
    [08:09:36.907] - Load 102400/379080 {"progress":27}
    [08:09:36.923] - Load 104448/379080 {"progress":27}
    [08:09:36.939] - Load 106496/379080 {"progress":28}
    [08:09:36.956] - Load 108544/379080 {"progress":28}
    [08:09:36.972] - Load 110592/379080 {"progress":29}
    [08:09:36.989] - Load 112640/379080 {"progress":29}
    [08:09:37.005] - Load 114688/379080 {"progress":30}
    [08:09:37.021] - Load 116736/379080 {"progress":30}
    [08:09:37.037] - Load 118784/379080 {"progress":31}
    [08:09:37.054] - Load 120832/379080 {"progress":31}
    [08:09:37.070] - Load 122880/379080 {"progress":32}
    [08:09:37.087] - Load 124928/379080 {"progress":32}
    [08:09:37.103] - Load 126976/379080 {"progress":33}
    [08:09:37.118] - Load 129024/379080 {"progress":34}
    [08:09:37.135] - Load 131072/379080 {"progress":34}
    [08:09:37.152] - Load 133120/379080 {"progress":35}
    [08:09:37.168] - Load 135168/379080 {"progress":35}
    [08:09:37.184] - Load 137216/379080 {"progress":36}
    [08:09:37.201] - Load 139264/379080 {"progress":36}
    [08:09:37.224] - Load 141312/379080 {"progress":37}
    [08:09:37.240] - Load 143360/379080 {"progress":37}
    [08:09:37.257] - Load 145408/379080 {"progress":38}
    [08:09:37.273] - Load 147456/379080 {"progress":38}
    [08:09:37.289] - Load 149504/379080 {"progress":39}
    [08:09:37.306] - Load 151552/379080 {"progress":39}
    [08:09:37.322] - Load 153600/379080 {"progress":40}
    [08:09:37.338] - Load 155648/379080 {"progress":41}
    [08:09:37.355] - Load 157696/379080 {"progress":41}
    [08:09:37.371] - Load 159744/379080 {"progress":42}
    [08:09:37.388] - Load 161792/379080 {"progress":42}
    [08:09:37.404] - Load 163840/379080 {"progress":43}
    [08:09:37.421] - Load 165888/379080 {"progress":43}
    [08:09:37.437] - Load 167936/379080 {"progress":44}
    [08:09:37.454] - Load 169984/379080 {"progress":44}
    [08:09:37.470] - Load 172032/379080 {"progress":45}
    [08:09:37.487] - Load 174080/379080 {"progress":45}
    [08:09:37.503] - Load 176128/379080 {"progress":46}
    [08:09:37.519] - Load 178176/379080 {"progress":47}
    [08:09:37.536] - Load 180224/379080 {"progress":47}
    [08:09:37.552] - Load 182272/379080 {"progress":48}
    [08:09:37.568] - Load 184320/379080 {"progress":48}
    [08:09:37.585] - Load 186368/379080 {"progress":49}
    [08:09:37.601] - Load 188416/379080 {"progress":49}
    [08:09:37.617] - Load 190464/379080 {"progress":50}
    [08:09:37.634] - Load 192512/379080 {"progress":50}
    [08:09:37.650] - Load 194560/379080 {"progress":51}
    [08:09:37.666] - Load 196608/379080 {"progress":51}
    [08:09:37.683] - Load 198656/379080 {"progress":52}
    [08:09:37.699] - Load 200704/379080 {"progress":52}
    [08:09:37.716] - Load 202752/379080 {"progress":53}
    [08:09:37.731] - Load 204800/379080 {"progress":54}
    [08:09:37.748] - Load 206848/379080 {"progress":54}
    [08:09:37.765] - Load 208896/379080 {"progress":55}
    [08:09:37.781] - Load 210944/379080 {"progress":55}
    [08:09:37.797] - Load 212992/379080 {"progress":56}
    [08:09:37.814] - Load 215040/379080 {"progress":56}
    [08:09:37.831] - Load 217088/379080 {"progress":57}
    [08:09:37.847] - Load 219136/379080 {"progress":57}
    [08:09:37.863] - Load 221184/379080 {"progress":58}
    [08:09:37.880] - Load 223232/379080 {"progress":58}
    [08:09:37.896] - Load 225280/379080 {"progress":59}
    [08:09:37.912] - Load 227328/379080 {"progress":59}
    [08:09:37.928] - Load 229376/379080 {"progress":60}
    [08:09:37.945] - Load 231424/379080 {"progress":61}
    [08:09:37.961] - Load 233472/379080 {"progress":61}
    [08:09:37.978] - Load 235520/379080 {"progress":62}
    [08:09:37.994] - Load 237568/379080 {"progress":62}
    [08:09:38.010] - Load 239616/379080 {"progress":63}
    [08:09:38.027] - Load 241664/379080 {"progress":63}
    [08:09:38.043] - Load 243712/379080 {"progress":64}
    [08:09:38.060] - Load 245760/379080 {"progress":64}
    [08:09:38.076] - Load 247808/379080 {"progress":65}
    [08:09:38.091] - Load 249856/379080 {"progress":65}
    [08:09:38.109] - Load 251904/379080 {"progress":66}
    [08:09:38.125] - Load 253952/379080 {"progress":66}
    [08:09:38.141] - Load 256000/379080 {"progress":67}
    [08:09:38.158] - Load 258048/379080 {"progress":68}
    [08:09:38.174] - Load 260096/379080 {"progress":68}
    [08:09:38.191] - Load 262144/379080 {"progress":69}
    [08:09:38.208] - Load 264192/379080 {"progress":69}
    [08:09:38.223] - Load 266240/379080 {"progress":70}
    [08:09:38.239] - Load 268288/379080 {"progress":70}
    [08:09:38.255] - Load 270336/379080 {"progress":71}
    [08:09:38.272] - Load 272384/379080 {"progress":71}
    [08:09:38.288] - Load 274432/379080 {"progress":72}
    [08:09:38.304] - Load 276480/379080 {"progress":72}
    [08:09:38.321] - Load 278528/379080 {"progress":73}
    [08:09:38.337] - Load 280576/379080 {"progress":74}
    [08:09:38.353] - Load 282624/379080 {"progress":74}
    [08:09:38.369] - Load 284672/379080 {"progress":75}
    [08:09:38.386] - Load 286720/379080 {"progress":75}
    [08:09:38.401] - Load 288768/379080 {"progress":76}
    [08:09:38.418] - Load 290816/379080 {"progress":76}
    [08:09:38.434] - Load 292864/379080 {"progress":77}
    [08:09:38.450] - Load 294912/379080 {"progress":77}
    [08:09:38.466] - Load 296960/379080 {"progress":78}
    [08:09:38.482] - Load 299008/379080 {"progress":78}
    [08:09:38.499] - Load 301056/379080 {"progress":79}
    [08:09:38.516] - Load 303104/379080 {"progress":79}
    [08:09:38.532] - Load 305152/379080 {"progress":80}
    [08:09:38.549] - Load 307200/379080 {"progress":81}
    [08:09:38.564] - Load 309248/379080 {"progress":81}
    [08:09:38.580] - Load 311296/379080 {"progress":82}
    [08:09:38.597] - Load 313344/379080 {"progress":82}
    [08:09:38.614] - Load 315392/379080 {"progress":83}
    [08:09:38.630] - Load 317440/379080 {"progress":83}
    [08:09:38.646] - Load 319488/379080 {"progress":84}
    [08:09:38.662] - Load 321536/379080 {"progress":84}
    [08:09:38.679] - Load 323584/379080 {"progress":85}
    [08:09:38.695] - Load 325632/379080 {"progress":85}
    [08:09:38.712] - Load 327680/379080 {"progress":86}
    [08:09:38.728] - Load 329728/379080 {"progress":86}
    [08:09:38.745] - Load 331776/379080 {"progress":87}
    [08:09:38.768] - Load 333824/379080 {"progress":88}
    [08:09:38.784] - Load 335872/379080 {"progress":88}
    [08:09:38.800] - Load 337920/379080 {"progress":89}
    [08:09:38.824] - Load 339968/379080 {"progress":89}
    [08:09:38.841] - Load 342016/379080 {"progress":90}
    [08:09:38.859] - Load 344064/379080 {"progress":90}
    [08:09:38.883] - Load 346112/379080 {"progress":91}
    [08:09:38.908] - Load 348160/379080 {"progress":91}
    [08:09:38.933] - Load 350208/379080 {"progress":92}
    [08:09:38.949] - Load 352256/379080 {"progress":92}
    [08:09:38.965] - Load 354304/379080 {"progress":93}
    [08:09:38.981] - Load 356352/379080 {"progress":94}
    [08:09:39.007] - Load 358400/379080 {"progress":94}
    [08:09:39.031] - Load 360448/379080 {"progress":95}
    [08:09:39.047] - Load 362496/379080 {"progress":95}
    [08:09:39.071] - Load 364544/379080 {"progress":96}
    [08:09:39.095] - Load 366592/379080 {"progress":96}
    [08:09:39.119] - Load 368640/379080 {"progress":97}
    [08:09:39.136] - Load 370688/379080 {"progress":97}
    [08:09:39.152] - Load 372736/379080 {"progress":98}
    [08:09:39.177] - Load 374784/379080 {"progress":98}
    [08:09:39.201] - Load 376832/379080 {"progress":99}
    [08:09:39.218] - Load 378880/379080 {"progress":99}
    [08:09:39.243] - Load 379080/379080 {"progress":100}
    [08:09:39.243] - Load 379080/379080 {"progress":100}
    [08:09:39.244] - Write check
    [08:09:39.250] - Flash load time cost(ms): 3889.471435546875
    [08:09:39.250] - Finished
    [08:09:39.260] - Sha caled by host: 469240392be281c47779d31ba00ded6e7d949108dfa0f49ece31b7bd28aded16
    [08:09:39.261] - xip mode Verify
    [08:09:39.335] - Read Sha256/707584
    [08:09:39.336] - Flash xip readsha time cost(ms): 73.4736328125
    [08:09:39.337] - Finished
    [08:09:39.339] - Sha caled by dev: 469240392be281c47779d31ba00ded6e7d949108dfa0f49ece31b7bd28aded16
    [08:09:39.339] - Verify success
    [08:09:39.340] - Dealing Index 4
    [08:09:39.341] - ========= programming bl602/device_tree/ro_params.dtb to 0x1f8000
    [08:09:39.341] - ========= flash load =========
    [08:09:39.342] - ========= flash erase =========
    [08:09:39.343] - Erase flash  from 0x1f8000 to 0x1f9729
    [08:09:39.437] - Erase time cost(ms): 93.661376953125
    [08:09:39.447] - decompress flash load 1640
    [08:09:39.461] - Load 1640/1640 {"progress":100}
    [08:09:39.461] - Load 1640/1640 {"progress":100}
    [08:09:39.462] - Write check
    [08:09:39.480] - Flash load time cost(ms): 42.276123046875
    [08:09:39.480] - Finished
    [08:09:39.481] - Sha caled by host: 4fd42b104897efb92f6a396b4e15193b842fd35a4463dacd20f2ea64ff354634
    [08:09:39.482] - xip mode Verify
    [08:09:39.487] - Read Sha256/5930
    [08:09:39.488] - Flash xip readsha time cost(ms): 3.97802734375
    [08:09:39.488] - Finished
    [08:09:39.490] - Sha caled by dev: 4fd42b104897efb92f6a396b4e15193b842fd35a4463dacd20f2ea64ff354634
    [08:09:39.491] - Verify success
    [08:09:39.491] - Program Finished
    [08:09:39.492] - All time cost(ms): 11153.431640625
    [08:09:39.601] - [All Success]
    
    



    Spoiler:

    With error:
    
    [08:08:27.526] - [param]
    interface_type = "Uart"
    comport_uart = "COM10"
    speed_uart = "2000000"
    speed_jlink = "1000"
    bl60x_brd = "IoTKitA"
    bl60x_xtal = "40M"
    aes_key = ""
    aes_iv = ""
    addr = "0x0"
    
    [check_box]
    partition_download = true
    boot2_download = true
    bin_download = true
    media_download = false
    use_romfs = false
    mfg_download = false
    ro_params_download = true
    ckb_erase_all = "False"
    encrypt = false
    download_single = false
    
    [input_path]
    pt_bin_input = "W:\\GIT\\OpenBL602\\tools\\flash_tool\\bl602\\partition\\partition_cfg_2M.toml"
    boot2_bin_input = "W:\\GIT\\OpenBL602\\tools\\flash_tool\\bl602\\builtin_imgs\\blsp_boot2.bin"
    cfg2_bin_input = "W:\\GIT\\OpenBL602\\customer_app\\bl602_sharedApp\\build_out\\bl602_sharedApp.bin"
    meida_bin_input = ""
    romfs_dir_input = ""
    mfg_bin_input = ""
    img_bin_input = ""
    [08:08:27.540] - ========= Interface is Uart =========
    [08:08:27.572] - eflash loader bin is eflash_loader_40m.bin
    [08:08:27.574] - ========= chip flash id: ef4015 =========
    [08:08:27.603] - Update flash cfg finished
    [08:08:27.616] - create partition.bin, pt_new is True
    [08:08:27.620] - bl60x_fw_boot_head_gen xtal: 40M
    [08:08:27.625] - Create bootheader using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:08:27.626] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [08:08:27.629] - Created file len:176
    [08:08:27.634] - Create efuse using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:08:27.637] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [08:08:27.640] - Created file len:128
    [08:08:27.656] - ========= sp image create =========
    [08:08:27.668] - Image hash is b'c5e2ce515a5783ac80efdd4910238a466572f882b53b3284e63c763e1da9847f'
    [08:08:27.669] - Header crc: b'52b188af'
    [08:08:27.669] - Write flash img
    [08:08:27.676] - bl60x_fw_boot_head_gen xtal: 40M
    [08:08:27.681] - Create bootheader using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:08:27.682] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [08:08:27.686] - Created file len:176
    [08:08:27.690] - Create efuse using W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini
    [08:08:27.693] - Updating data according to <W:\GIT\OpenBL602\tools\flash_tool\bl602\efuse_bootheader/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [08:08:27.697] - Created file len:128
    [08:08:27.710] - ========= sp image create =========
    [08:08:27.733] - Image hash is b'4f3139b89da357f6d4b9c058eaf8d161a55237996f1d22e27c13105ec13f963c'
    [08:08:27.734] - Header crc: b'64cee850'
    [08:08:27.735] - Write flash img
    [08:08:27.748] - FW Header is 176, 3920 still needed
    [08:08:27.750] - FW OTA bin header is Done. Len is 4096
    [08:08:28.081] - FW OTA bin is Done. Len is 707584
    [08:08:29.153] - FW OTA xz is Done
    [08:08:29.162] - ========= eflash loader config =========
    [08:08:29.258] - =========W:\GIT\OpenBL602\tools\flash_tool\bl602\device_tree/bl_factory_params_IoTKitA_40M.dts ——> bl602/device_tree/ro_params.dtb=========
    [08:08:29.604] - Version: bflb_eflash_loader_v2.0.0
    [08:08:29.604] - Program Start
    [08:08:29.605] - ========= eflash loader cmd arguments =========
    chipname : None
    chipid : False
    usage : False
    flash : True
    efuse : False
    write : True
    erase : False
    read : False
    none : False
    port : COM10
    baudrate : None
    config : None
    interface : None
    xtal : None
    start : None
    end : None
    addr : None
    mac : None
    file : None
    data : None
    mass : None
    loadstr : None
    loadfile : None
    userarea : None
    csvfile : None
    csvaddr : None
    para : None
    aeskey : None
    aesiv : None
    key : None
    ecdh : False
    echo : False
    auto : False
    version : False
    [08:08:29.666] - Config file: W:\GIT\OpenBL602\tools\flash_tool\bl602\eflash_loader/eflash_loader_cfg.ini
    [08:08:29.668] - serial port is COM10
    [08:08:29.669] - chiptype: bl602
    [08:08:29.670] - ========= Interface is Uart =========
    [08:08:29.670] - com speed: 2000000
    [08:08:29.671] - Eflash load helper file: W:\GIT\OpenBL602\tools\flash_tool\bl602\eflash_loader/eflash_loader_40m.bin
    [08:08:29.671] - Eflash load helper file: W:\GIT\OpenBL602\tools\flash_tool\bl602\eflash_loader/eflash_loader_40m.bin
    [08:08:29.672] - ========= load eflash_loader.bin =========
    [08:08:29.673] - Load eflash_loader.bin via uart
    [08:08:29.674] - ========= image load =========
    [08:08:29.945] - tx rx and power off, press the machine!
    [08:08:29.946] - cutoff time is 0.1
    [08:08:30.055] - power on tx and rx
    [08:08:30.860] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
    [08:08:30.861] - clean buf
    [08:08:30.970] - send sync
    [08:08:31.092] - ack is b''
    [08:08:31.093] - retry
    [08:08:31.371] - tx rx and power off, press the machine!
    [08:08:31.372] - cutoff time is 0.1
    [08:08:31.479] - power on tx and rx
    [08:08:32.281] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
    [08:08:32.282] - clean buf
    [08:08:32.391] - send sync
    [08:08:32.513] - ack is b''
    [08:08:32.514] - retry
    [08:08:32.516] - shake hand fail
    [08:08:32.517] - ########################################################################
    [08:08:32.519] - 请按照以下描述排查问题:
    [08:08:32.520] - GPIO8是否上拉到板子自身的3.3V,而不是外部的3.3V
    [08:08:32.520] - GPIO7(RX)是否连接到USB转串口的TX引脚
    [08:08:32.521] - GPIO16(TX)是否连接到USB转串口的RX引脚
    [08:08:32.522] - 在使用烧录软件进行烧录前,是否在GPIO8拉高的情况下,使用Reset/Chip_En复位了芯片
    [08:08:32.522] - 烧录软件所选择的COM口,是否是连接芯片的串口
    [08:08:32.523] - 烧录软件上选择的波特率是否是USB转串口支持的波特率
    [08:08:32.524] - 3.3V供电是否正常
    [08:08:32.526] - 板子供电电流是否正常(烧录模式下,芯片耗电电流5-7mA)
    [08:08:32.527] - ########################################################################
    [08:08:32.528] - shake hand fail
    [08:08:32.530] - Load helper bin time cost(ms): 2856.3779296875
    [08:08:32.531] - {"ErrorCode": "0003","ErrorMsg":"BFLB LOAD HELP BIN FAIL"}
    [08:08:32.532] - Burn Retry
    [08:08:32.532] - 0
    [08:08:32.534] - Burn return with retry fail
    


    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Helpful post? Buy me a coffee.
  • #115 20115934
    droege
    Level 10  
    Hey there,
    any updates on BL602? MQTT, Dimmer, etc.?
    OTA would be great, sooner or later ;)

    Thanks,
    best
  • #116 20116445
    bartek666666
    Level 10  
    For me it looks like this:

    Spoiler:
    [22:02:48.770] - ========= Interface is Uart =========
    [22:02:48.800] - eflash loader bin is eflash_loader_40m.bin
    [22:02:48.800] - ========= chip flash id: ef4015 =========
    [22:02:48.840] - create partition.bin, pt_new is True
    [22:02:48.900] - bl60x_fw_boot_head_gen xtal: 40M
    [22:02:48.900] - Create bootheader using D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
    [22:02:48.900] - Updating data according to <D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [22:02:48.900] - Created file len:176
    [22:02:48.920] - Create efuse using D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
    [22:02:48.930] - Updating data according to <D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [22:02:48.930] - Created file len:128
    [22:02:48.940] - ========= sp image create =========
    [22:02:48.960] - Image hash is b'c5e2ce515a5783ac80efdd4910238a466572f882b53b3284e63c763e1da9847f'
    [22:02:48.960] - Hash ignored
    [22:02:48.960] - Header crc ignored
    [22:02:48.960] - Write flash img
    [22:02:48.980] - bl60x_fw_boot_head_gen xtal: 40M
    [22:02:48.990] - Create bootheader using D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
    [22:02:48.990] - Updating data according to <D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [22:02:48.990] - Created file len:176
    [22:02:48.990] - Create efuse using D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
    [22:02:48.990] - Updating data according to <D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [22:02:49.000] - Created file len:128
    [22:02:49.010] - ========= sp image create =========
    [22:02:49.020] - Image hash is b'431e880948189fa0a34c490fa8e58920ded4a847a2b13165478b33881d87d43f'
    [22:02:49.020] - Header crc: b'a77e98f1'
    [22:02:49.020] - Write flash img
    [22:02:49.040] - FW Header is 176, 3920 still needed
    [22:02:49.050] - FW OTA bin header is Done. Len is 4096
    [22:02:49.160] - BL60X_OTA_Ver1.0
    [22:02:49.270] - FW OTA bin is Done. Len is 709504
    [22:02:49.800] - OTA XZ file len = 380120
    [22:02:49.800] - Partiton len = 557056
    [22:02:49.800] - BL60X_OTA_Ver1.0
    [22:02:49.870] - FW OTA xz is Done
    [22:02:49.880] - ========= eflash loader config =========
    [22:02:49.950] - =========D:\firmware\bl_factory_params_IoTKitA_40M.dts ——> D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602/device_tree/ro_params.dtb=========
    [22:02:50.230] - Version: eflash_loader_v2.4.1
    [22:02:50.230] - Program Start
    [22:02:50.230] - ========= eflash loader cmd arguments =========
    [22:02:50.230] - D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\eflash_loader/eflash_loader_cfg.ini
    [22:02:50.230] - Config file: D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\eflash_loader/eflash_loader_cfg.ini
    [22:02:50.240] - serial port is COM5
    [22:02:50.240] - cpu_reset=False
    [22:02:50.240] - chiptype: bl602
    [22:02:50.240] - ========= Interface is uart =========
    [22:02:50.240] - com speed: 2000000
    [22:02:50.240] - Eflash load helper file: D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\eflash_loader/eflash_loader_40m.bin
    [22:02:50.240] - Eflash load helper file: D:\BouffaloLabDevCube-1.7.5-win32\chips\bl602\eflash_loader/eflash_loader_40m.bin
    [22:02:50.240] - ========= load eflash_loader.bin =========
    [22:02:50.240] - Load eflash_loader.bin via uart
    [22:02:50.240] - ========= image load =========
    [22:02:50.500] - tx rx and power off, press the machine!
    [22:02:50.500] - cutoff time is 0.1
    [22:02:50.600] - power on tx and rx
    [22:02:51.340] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
    [22:02:51.340] - clean buf
    [22:02:51.340] - send sync
    [22:02:51.540] - ack is b'4f4b'
    [22:02:51.570] - shake hand success
    [22:02:51.580] - get_boot_info
    [22:02:51.580] - data read is b'0100000000000000030000000ece9d42e8b41900'
    [22:02:51.580] - ========= ChipID: b4e8429dce0e =========
    [22:02:51.590] - last boot info: None
    [22:02:51.590] - sign is 0 encrypt is 0
    [22:02:51.590] - segcnt is 1
    [22:02:51.620] - segdata_len is 37152
    [22:02:51.710] - 4080/37152
    [22:02:51.810] - 8160/37152
    [22:02:51.900] - 12240/37152
    [22:02:52.000] - 16320/37152
    [22:02:52.100] - 20400/37152
    [22:02:52.190] - 24480/37152
    [22:02:52.290] - 28560/37152
    [22:02:52.380] - 32640/37152
    [22:02:52.480] - 36720/37152
    [22:02:52.490] - 37152/37152
    [22:02:52.510] - Run img
    [22:02:52.630] - Load helper bin time cost(ms): 2390.00341796875
    [22:02:52.730] - Flash load shake hand
    [22:02:52.740] - default set DTR high
    [22:02:52.840] - clean buf
    [22:02:52.840] - send sync
    [22:02:53.050] - ack is b'4f4b'
    [22:02:53.080] - Read mac addr
    [22:02:53.090] - flash set para
    [22:02:53.090] - ========= flash read jedec ID =========
    [22:02:53.100] - Read flash jedec ID
    [22:02:53.100] - readdata:
    [22:02:53.100] - b'ef401580'
    [22:02:53.110] - Finished
    [22:02:53.150] - Program operation
    [22:02:53.150] - Dealing Index 0
    [22:02:53.150] - ========= programming chips\bl602\img_create_iot\whole_img_boot2.bin to 0x00000000
    [22:02:53.160] - ========= flash load =========
    [22:02:53.160] - ========= flash erase =========
    [22:02:53.160] - Erase flash  from 0x0 to 0xb98f
    [22:02:53.180] - erase pending
    [22:02:53.330] - erase pending
    [22:02:53.360] - erase pending
    [22:02:53.370] - erase pending
    [22:02:53.410] - erase pending
    [22:02:53.460] - Erase time cost(ms): 300.000732421875
    [22:02:53.490] - decompress flash load 22124
    [22:02:53.520] - Load 2048/22124 {"progress":9}
    [22:02:53.530] - Load 4096/22124 {"progress":18}
    [22:02:53.550] - Load 6144/22124 {"progress":27}
    [22:02:53.570] - Load 8192/22124 {"progress":37}
    [22:02:53.580] - Load 10240/22124 {"progress":46}
    [22:02:53.600] - Load 12288/22124 {"progress":55}
    [22:02:53.610] - Load 14336/22124 {"progress":64}
    [22:02:53.630] - Load 16384/22124 {"progress":74}
    [22:02:53.650] - Load 18432/22124 {"progress":83}
    [22:02:53.660] - Load 20480/22124 {"progress":92}
    [22:02:53.680] - Load 22124/22124 {"progress":100}
    [22:02:53.680] - Load 22124/22124 {"progress":100}
    [22:02:53.680] - Write check
    [22:02:53.710] - Flash load time cost(ms): 250.000244140625
    [22:02:53.710] - Finished
    [22:02:53.710] - Sha caled by host: b987f677ce281b949af2bf8de15d2916aabffc58dd121cbc95bf5cab17d7db4b
    [22:02:53.710] - xip mode Verify
    [22:02:53.740] - Read Sha256/47504
    [22:02:53.740] - Flash xip readsha time cost(ms): 10.000244140625
    [22:02:53.740] - Finished
    [22:02:53.760] - Sha caled by dev: b987f677ce281b949af2bf8de15d2916aabffc58dd121cbc95bf5cab17d7db4b
    [22:02:53.760] - Verify success
    [22:02:53.760] - Dealing Index 1
    [22:02:53.760] - ========= programming chips\bl602\partition\partition.bin to 0xe000
    [22:02:53.770] - ========= flash load =========
    [22:02:53.770] - ========= flash erase =========
    [22:02:53.770] - Erase flash  from 0xe000 to 0xe10f
    [22:02:53.790] - erase pending
    [22:02:53.830] - Erase time cost(ms): 60.000244140625
    [22:02:53.840] - Load 272/272 {"progress":100}
    [22:02:53.840] - Load 272/272 {"progress":100}
    [22:02:53.840] - Write check
    [22:02:53.860] - Flash load time cost(ms): 29.999755859375
    [22:02:53.860] - Finished
    [22:02:53.860] - Sha caled by host: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [22:02:53.860] - xip mode Verify
    [22:02:53.890] - Read Sha256/272
    [22:02:53.890] - Flash xip readsha time cost(ms): 20.0
    [22:02:53.890] - Finished
    [22:02:53.900] - Sha caled by dev: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [22:02:53.900] - Verify success
    [22:02:53.900] - Dealing Index 2
    [22:02:53.910] - ========= programming chips\bl602\partition\partition.bin to 0xf000
    [22:02:53.910] - ========= flash load =========
    [22:02:53.910] - ========= flash erase =========
    [22:02:53.910] - Erase flash  from 0xf000 to 0xf10f
    [22:02:53.920] - erase pending
    [22:02:53.970] - Erase time cost(ms): 60.000244140625
    [22:02:53.980] - Load 272/272 {"progress":100}
    [22:02:53.980] - Load 272/272 {"progress":100}
    [22:02:53.980] - Write check
    [22:02:54.000] - Flash load time cost(ms): 30.0
    [22:02:54.000] - Finished
    [22:02:54.000] - Sha caled by host: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [22:02:54.000] - xip mode Verify
    [22:02:54.030] - Read Sha256/272
    [22:02:54.030] - Flash xip readsha time cost(ms): 20.000244140625
    [22:02:54.030] - Finished
    [22:02:54.050] - Sha caled by dev: da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
    [22:02:54.050] - Verify success
    [22:02:54.050] - Dealing Index 3
    [22:02:54.050] - ========= programming chips\bl602\img_create_iot\whole_img.bin to 0x10000
    [22:02:54.060] - ========= flash load =========
    [22:02:54.060] - ========= flash erase =========
    [22:02:54.060] - Erase flash  from 0x10000 to 0xbd37f
    [22:02:54.080] - erase pending
    [22:02:54.290] - erase pending
    [22:02:54.490] - erase pending
    [22:02:54.700] - erase pending
    [22:02:54.930] - erase pending
    [22:02:55.130] - erase pending
    [22:02:55.340] - erase pending
    [22:02:55.580] - erase pending
    [22:02:55.810] - erase pending
    [22:02:56.030] - erase pending
    [22:02:56.220] - erase pending
    [22:02:56.370] - erase pending
    [22:02:56.400] - erase pending
    [22:02:56.430] - erase pending
    [22:02:56.460] - erase pending
    [22:02:56.490] - erase pending
    [22:02:56.530] - erase pending
    [22:02:56.580] - Erase time cost(ms): 2520.00341796875
    [22:02:56.950] - decompress flash load 380120
    [22:02:56.970] - Load 2048/380120 {"progress":0}
    [22:02:56.990] - Load 4096/380120 {"progress":1}
    [22:02:57.000] - Load 6144/380120 {"progress":1}
    [22:02:57.020] - Load 8192/380120 {"progress":2}
    [22:02:57.040] - Load 10240/380120 {"progress":2}
    [22:02:57.050] - Load 12288/380120 {"progress":3}
    [22:02:57.070] - Load 14336/380120 {"progress":3}
    [22:02:57.080] - Load 16384/380120 {"progress":4}
    [22:02:57.100] - Load 18432/380120 {"progress":4}
    [22:02:57.120] - Load 20480/380120 {"progress":5}
    [22:02:57.130] - Load 22528/380120 {"progress":5}
    [22:02:57.150] - Load 24576/380120 {"progress":6}
    [22:02:57.160] - Load 26624/380120 {"progress":7}
    [22:02:57.180] - Load 28672/380120 {"progress":7}
    [22:02:57.200] - Load 30720/380120 {"progress":8}
    [22:02:57.210] - Load 32768/380120 {"progress":8}
    [22:02:57.230] - Load 34816/380120 {"progress":9}
    [22:02:57.240] - Load 36864/380120 {"progress":9}
    [22:02:57.260] - Load 38912/380120 {"progress":10}
    [22:02:57.280] - Load 40960/380120 {"progress":10}
    [22:02:57.290] - Load 43008/380120 {"progress":11}
    [22:02:57.310] - Load 45056/380120 {"progress":11}
    [22:02:57.320] - Load 47104/380120 {"progress":12}
    [22:02:57.340] - Load 49152/380120 {"progress":12}
    [22:02:57.360] - Load 51200/380120 {"progress":13}
    [22:02:57.370] - Load 53248/380120 {"progress":14}
    [22:02:57.390] - Load 55296/380120 {"progress":14}
    [22:02:57.400] - Load 57344/380120 {"progress":15}
    [22:02:57.420] - Load 59392/380120 {"progress":15}
    [22:02:57.440] - Load 61440/380120 {"progress":16}
    [22:02:57.450] - Load 63488/380120 {"progress":16}
    [22:02:57.470] - Load 65536/380120 {"progress":17}
    [22:02:57.480] - Load 67584/380120 {"progress":17}
    [22:02:57.500] - Load 69632/380120 {"progress":18}
    [22:02:57.520] - Load 71680/380120 {"progress":18}
    [22:02:57.530] - Load 73728/380120 {"progress":19}
    [22:02:57.550] - Load 75776/380120 {"progress":19}
    [22:02:57.560] - Load 77824/380120 {"progress":20}
    [22:02:57.580] - Load 79872/380120 {"progress":21}
    [22:02:57.600] - Load 81920/380120 {"progress":21}
    [22:02:57.610] - Load 83968/380120 {"progress":22}
    [22:02:57.630] - Load 86016/380120 {"progress":22}
    [22:02:57.640] - Load 88064/380120 {"progress":23}
    [22:02:57.660] - Load 90112/380120 {"progress":23}
    [22:02:57.680] - Load 92160/380120 {"progress":24}
    [22:02:57.690] - Load 94208/380120 {"progress":24}
    [22:02:57.710] - Load 96256/380120 {"progress":25}
    [22:02:57.720] - Load 98304/380120 {"progress":25}
    [22:02:57.740] - Load 100352/380120 {"progress":26}
    [22:02:57.760] - Load 102400/380120 {"progress":26}
    [22:02:57.770] - Load 104448/380120 {"progress":27}
    [22:02:57.790] - Load 106496/380120 {"progress":28}
    [22:02:57.800] - Load 108544/380120 {"progress":28}
    [22:02:57.820] - Load 110592/380120 {"progress":29}
    [22:02:57.840] - Load 112640/380120 {"progress":29}
    [22:02:57.850] - Load 114688/380120 {"progress":30}
    [22:02:57.870] - Load 116736/380120 {"progress":30}
    [22:02:57.880] - Load 118784/380120 {"progress":31}
    [22:02:57.900] - Load 120832/380120 {"progress":31}
    [22:02:57.920] - Load 122880/380120 {"progress":32}
    [22:02:57.930] - Load 124928/380120 {"progress":32}
    [22:02:57.950] - Load 126976/380120 {"progress":33}
    [22:02:57.960] - Load 129024/380120 {"progress":33}
    [22:02:57.980] - Load 131072/380120 {"progress":34}
    [22:02:58.000] - Load 133120/380120 {"progress":35}
    [22:02:58.010] - Load 135168/380120 {"progress":35}
    [22:02:58.030] - Load 137216/380120 {"progress":36}
    [22:02:58.040] - Load 139264/380120 {"progress":36}
    [22:02:58.060] - Load 141312/380120 {"progress":37}
    [22:02:58.080] - Load 143360/380120 {"progress":37}
    [22:02:58.090] - Load 145408/380120 {"progress":38}
    [22:02:58.110] - Load 147456/380120 {"progress":38}
    [22:02:58.120] - Load 149504/380120 {"progress":39}
    [22:02:58.140] - Load 151552/380120 {"progress":39}
    [22:02:58.160] - Load 153600/380120 {"progress":40}
    [22:02:58.170] - Load 155648/380120 {"progress":40}
    [22:02:58.190] - Load 157696/380120 {"progress":41}
    [22:02:58.200] - Load 159744/380120 {"progress":42}
    [22:02:58.220] - Load 161792/380120 {"progress":42}
    [22:02:58.240] - Load 163840/380120 {"progress":43}
    [22:02:58.250] - Load 165888/380120 {"progress":43}
    [22:02:58.270] - Load 167936/380120 {"progress":44}
    [22:02:58.280] - Load 169984/380120 {"progress":44}
    [22:02:58.300] - Load 172032/380120 {"progress":45}
    [22:02:58.320] - Load 174080/380120 {"progress":45}
    [22:02:58.330] - Load 176128/380120 {"progress":46}
    [22:02:58.350] - Load 178176/380120 {"progress":46}
    [22:02:58.360] - Load 180224/380120 {"progress":47}
    [22:02:58.380] - Load 182272/380120 {"progress":47}
    [22:02:58.400] - Load 184320/380120 {"progress":48}
    [22:02:58.410] - Load 186368/380120 {"progress":49}
    [22:02:58.430] - Load 188416/380120 {"progress":49}
    [22:02:58.440] - Load 190464/380120 {"progress":50}
    [22:02:58.460] - Load 192512/380120 {"progress":50}
    [22:02:58.480] - Load 194560/380120 {"progress":51}
    [22:02:58.490] - Load 196608/380120 {"progress":51}
    [22:02:58.510] - Load 198656/380120 {"progress":52}
    [22:02:58.520] - Load 200704/380120 {"progress":52}
    [22:02:58.540] - Load 202752/380120 {"progress":53}
    [22:02:58.560] - Load 204800/380120 {"progress":53}
    [22:02:58.570] - Load 206848/380120 {"progress":54}
    [22:02:58.590] - Load 208896/380120 {"progress":54}
    [22:02:58.600] - Load 210944/380120 {"progress":55}
    [22:02:58.620] - Load 212992/380120 {"progress":56}
    [22:02:58.640] - Load 215040/380120 {"progress":56}
    [22:02:58.650] - Load 217088/380120 {"progress":57}
    [22:02:58.670] - Load 219136/380120 {"progress":57}
    [22:02:58.680] - Load 221184/380120 {"progress":58}
    [22:02:58.700] - Load 223232/380120 {"progress":58}
    [22:02:58.720] - Load 225280/380120 {"progress":59}
    [22:02:58.730] - Load 227328/380120 {"progress":59}
    [22:02:58.750] - Load 229376/380120 {"progress":60}
    [22:02:58.760] - Load 231424/380120 {"progress":60}
    [22:02:58.780] - Load 233472/380120 {"progress":61}
    [22:02:58.800] - Load 235520/380120 {"progress":61}
    [22:02:58.810] - Load 237568/380120 {"progress":62}
    [22:02:58.830] - Load 239616/380120 {"progress":63}
    [22:02:58.840] - Load 241664/380120 {"progress":63}
    [22:02:58.860] - Load 243712/380120 {"progress":64}
    [22:02:58.880] - Load 245760/380120 {"progress":64}
    [22:02:58.890] - Load 247808/380120 {"progress":65}
    [22:02:58.910] - Load 249856/380120 {"progress":65}
    [22:02:58.920] - Load 251904/380120 {"progress":66}
    [22:02:58.940] - Load 253952/380120 {"progress":66}
    [22:02:58.960] - Load 256000/380120 {"progress":67}
    [22:02:58.970] - Load 258048/380120 {"progress":67}
    [22:02:58.990] - Load 260096/380120 {"progress":68}
    [22:02:59.000] - Load 262144/380120 {"progress":68}
    [22:02:59.020] - Load 264192/380120 {"progress":69}
    [22:02:59.040] - Load 266240/380120 {"progress":70}
    [22:02:59.050] - Load 268288/380120 {"progress":70}
    [22:02:59.070] - Load 270336/380120 {"progress":71}
    [22:02:59.080] - Load 272384/380120 {"progress":71}
    [22:02:59.100] - Load 274432/380120 {"progress":72}
    [22:02:59.120] - Load 276480/380120 {"progress":72}
    [22:02:59.130] - Load 278528/380120 {"progress":73}
    [22:02:59.150] - Load 280576/380120 {"progress":73}
    [22:02:59.160] - Load 282624/380120 {"progress":74}
    [22:02:59.180] - Load 284672/380120 {"progress":74}
    [22:02:59.200] - Load 286720/380120 {"progress":75}
    [22:02:59.210] - Load 288768/380120 {"progress":75}
    [22:02:59.230] - Load 290816/380120 {"progress":76}
    [22:02:59.240] - Load 292864/380120 {"progress":77}
    [22:02:59.260] - Load 294912/380120 {"progress":77}
    [22:02:59.280] - Load 296960/380120 {"progress":78}
    [22:02:59.290] - Load 299008/380120 {"progress":78}
    [22:02:59.310] - Load 301056/380120 {"progress":79}
    [22:02:59.320] - Load 303104/380120 {"progress":79}
    [22:02:59.340] - Load 305152/380120 {"progress":80}
    [22:02:59.360] - Load 307200/380120 {"progress":80}
    [22:02:59.370] - Load 309248/380120 {"progress":81}
    [22:02:59.390] - Load 311296/380120 {"progress":81}
    [22:02:59.400] - Load 313344/380120 {"progress":82}
    [22:02:59.420] - Load 315392/380120 {"progress":82}
    [22:02:59.440] - Load 317440/380120 {"progress":83}
    [22:02:59.450] - Load 319488/380120 {"progress":84}
    [22:02:59.470] - Load 321536/380120 {"progress":84}
    [22:02:59.480] - Load 323584/380120 {"progress":85}
    [22:02:59.500] - Load 325632/380120 {"progress":85}
    [22:02:59.520] - Load 327680/380120 {"progress":86}
    [22:02:59.530] - Load 329728/380120 {"progress":86}
    [22:02:59.550] - Load 331776/380120 {"progress":87}
    [22:02:59.580] - Load 333824/380120 {"progress":87}
    [22:02:59.600] - Load 335872/380120 {"progress":88}
    [22:02:59.630] - Load 337920/380120 {"progress":88}
    [22:02:59.640] - Load 339968/380120 {"progress":89}
    [22:02:59.660] - Load 342016/380120 {"progress":89}
    [22:02:59.680] - Load 344064/380120 {"progress":90}
    [22:02:59.710] - Load 346112/380120 {"progress":91}
    [22:02:59.720] - Load 348160/380120 {"progress":91}
    [22:02:59.760] - Load 350208/380120 {"progress":92}
    [22:02:59.770] - Load 352256/380120 {"progress":92}
    [22:02:59.790] - Load 354304/380120 {"progress":93}
    [22:02:59.800] - Load 356352/380120 {"progress":93}
    [22:02:59.840] - Load 358400/380120 {"progress":94}
    [22:02:59.850] - Load 360448/380120 {"progress":94}
    [22:02:59.870] - Load 362496/380120 {"progress":95}
    [22:02:59.880] - Load 364544/380120 {"progress":95}
    [22:02:59.920] - Load 366592/380120 {"progress":96}
    [22:02:59.930] - Load 368640/380120 {"progress":96}
    [22:02:59.960] - Load 370688/380120 {"progress":97}
    [22:02:59.980] - Load 372736/380120 {"progress":98}
    [22:03:00.010] - Load 374784/380120 {"progress":98}
    [22:03:00.030] - Load 376832/380120 {"progress":99}
    [22:03:00.060] - Load 378880/380120 {"progress":99}
    [22:03:00.080] - Load 380120/380120 {"progress":100}
    [22:03:00.080] - Load 380120/380120 {"progress":100}
    [22:03:00.080] - Write check
    [22:03:00.090] - Flash load time cost(ms): 3510.005126953125
    [22:03:00.090] - Finished
    [22:03:00.110] - Sha caled by host: 0e1153e32ab88df80625d76cff354b799c48eda0f83fca86c52f6ea6898a067d
    [22:03:00.110] - xip mode Verify
    [22:03:00.330] - Read Sha256/709504
    [22:03:00.330] - Flash xip readsha time cost(ms): 210.000244140625
    [22:03:00.330] - Finished
    [22:03:00.350] - Sha caled by dev: 0e1153e32ab88df80625d76cff354b799c48eda0f83fca86c52f6ea6898a067d
    [22:03:00.350] - Verify success
    [22:03:00.350] - Dealing Index 4
    [22:03:00.350] - ========= programming chips\bl602\device_tree\ro_params.dtb to 0x1f8000
    [22:03:00.360] - ========= flash load =========
    [22:03:00.360] - ========= flash erase =========
    [22:03:00.360] - Erase flash  from 0x1f8000 to 0x1f9729
    [22:03:00.360] - erase pending
    [22:03:00.410] - erase pending
    [22:03:00.460] - Erase time cost(ms): 100.000244140625
    [22:03:00.470] - decompress flash load 1640
    [22:03:00.490] - Load 1640/1640 {"progress":100}
    [22:03:00.490] - Load 1640/1640 {"progress":100}
    [22:03:00.490] - Write check
    [22:03:00.510] - Flash load time cost(ms): 50.0
    [22:03:00.510] - Finished
    [22:03:00.510] - Sha caled by host: 4fd42b104897efb92f6a396b4e15193b842fd35a4463dacd20f2ea64ff354634
    [22:03:00.510] - xip mode Verify
    [22:03:00.540] - Read Sha256/5930
    [22:03:00.540] - Flash xip readsha time cost(ms): 20.0
    [22:03:00.540] - Finished
    [22:03:00.550] - Sha caled by dev: 4fd42b104897efb92f6a396b4e15193b842fd35a4463dacd20f2ea64ff354634
    [22:03:00.560] - Verify success
    [22:03:00.560] - Program Finished
    [22:03:00.560] - All time cost(ms): 10330.0146484375
    [22:03:00.770] - close interface
    [22:03:00.770] - [All Success]
    


    nothing at all
  • #117 20116472
    p.kaczmarek2
    Moderator Smart Home
    And the latest version with today`s fixes?

    But that`s strange, no matter what, messages from the batch should appear on the UART, even if it is supposed to hang later.
    Helpful post? Buy me a coffee.
  • #118 20116479
    bartek666666
    Level 10  
    ok, I downloaded the entire flash tool from your repo, partition table, boot2 and factory too and on the uart we have something like this


    Spoiler:
    [22:58:00.389] - Info:MAIN:Time 4, free 85776, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:01.489] - [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
    歵d_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_429DCE0E;
    [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!
    [APP] [EVT] Unknown code 11, 6057
    Info:MAIN:Time 5, free 85776, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:02.489] - Info:MAIN:Time 6, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:03.489] - Info:MAIN:Time 7, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:04.489] - Info:MAIN:Time 8, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:05.489] - Info:MAIN:Time 9, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:06.489] - Info:MAIN:Time 10, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:07.489] - Info:MQTT:mqtt_userName homeassistant
    mqtt_pass qqqqqqqqqq
    mqtt_clientID obl429DCE0E
    mqtt_host 192.168.0.113:1883
    
    Info:MAIN:Time 11, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:08.489] - Info:MAIN:Time 12, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:09.489] - Info:MAIN:Time 13, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:10.489] - Info:MAIN:Time 14, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:11.489] - Info:MAIN:Time 15, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:12.489] - Info:MAIN:Time 16, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:13.489] - Info:MAIN:Time 17, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:14.490] - Info:MAIN:Time 18, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    [22:58:15.490] - Info:MAIN:Time 19, free 85464, MQTT 0, bWifi 0, secondsWithNoPing 0, socks 2/21
    


    and the latest version works great, great project
  • #119 20117857
    p.kaczmarek2
    Moderator Smart Home
    I`m glad I could help.

    I know about OTA, there is no time to get down to it.

    Due to a conversation with one user on PM, I am posting here the now proven GPIO demo along with the proven flash_tool .
    This is as part of testing, if someone wanted to check if uploading a batch works.

    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    The attachments contain what is shown in the screenshots. Verified on the board with LED controller from the topic. Dev Cube 1.4.8. Binary customer_app/sdk_app_gpio.
    Helpful post? Buy me a coffee.
  • #120 20127464
    droege
    Level 10  
    Hi there,
    any news concerning final_color report via MQTT and Dimmer, especially after overwriting via RGB?
    Thanks,
    best

Topic summary

The discussion revolves around the development and integration of firmware for devices based on the BL602 chip, particularly focusing on flashing procedures, MQTT connectivity, and Home Assistant integration. Users share their experiences with various models, including Magic Home LED controllers and Sonoff devices, detailing successful flashing processes, issues with WiFi connectivity, and the need for stable power supplies. The conversation also touches on the implementation of features like OTA updates, Alexa integration, and the challenges faced with different firmware versions. Users report on the behavior of their devices post-flashing, including boot loops and MAC address duplication issues, while seeking solutions and sharing troubleshooting tips.
Summary generated by the language model.
ADVERTISEMENT