openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602
https://openbekeniot.github.io/webapp/devicesList.html
1.34k stars 228 forks source link

BL602 Factory firmware backup before flashing OpenBK #680

Open ataa opened 1 year ago

ataa commented 1 year ago

I have some BL602 based RGBCW bulbs, flashed some of them successfully but a some their features (Bluetooth remote control, ...) lost as yet to be implemented in this firmware. Is there a way to dump/backup the factory firmware before flashing this firmware. I have BLDevCube but couldn't find any way to backup the firmware.

openshwprojects commented 1 year ago

Hello, accordinng to my knowledge there is no way to do this in BLDevCube, but I may be wrong.

ataa commented 1 year ago

After many unsuccessful attempts, I managed to dump the flash using blflash, using the command below, but I am not sure if I did it correctly, The part I am not sure about is the ending address.

blflash-windows-amd64.exe dump BL602-Lamp.bin -b 230400 --port COM3 0 0x200000

openshwprojects commented 1 year ago

Wow, nice, this is very useful. Can you submit it in form of a short tutorial/topic to our Tutorials section? https://www.elektroda.com/rtvforum/forum517.html Give a proper title to topic, write short description how to do that, etc, where to get blflash Thanks!

ataa commented 1 year ago

Sure, I'll do that as soon as I make sure I did it right, the ending address is correct and the dumped firmware is valid. Do you know the BL602 flash ending address? or a way to check the dumped flash validity? I found 0x200000 end address in blfash repo.

openshwprojects commented 1 year ago

I don't know, but... if you launch flasher from our SDK: image You get reference to: W:\GIT\OpenBL602\tools\flash_tool\bl602\partition\partition_cfg_2M.toml and that file contains:

[pt_table]
#partition table is 4K in size
address0 = 0xE000
address1 = 0xF000

[[pt_entry]]
type = 0
name = "FW"
device = 0
address0 = 0x10000
size0 = 0xC8000
address1 = 0xD8000
size1 = 0x88000
# compressed image must set len,normal image can left it to 0
len = 0

[[pt_entry]]
type = 2
name = "mfg"
device = 0
address0 = 0x160000
size0 = 0x32000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0

[[pt_entry]]
type = 3
name = "media"
device = 0
address0 = 0x192000
size0 = 0x57000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0

[[pt_entry]]
type = 4
name = "PSM"
device = 0
address0 = 0x1E9000
size0 = 0x8000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0

[[pt_entry]]
type = 5
name = "KEY"
device = 0
address0 = 0x1F1000
size0 = 0x2000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0

[[pt_entry]]
type = 6
name = "DATA"
device = 0
address0 = 0x1F3000
size0 = 0x5000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0

[[pt_entry]]
type = 7
name = "factory"
device = 0
address0 = 0x1F8000
size0 = 0x7000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0

#if user want to put RF calibration data on flash, uncomment following pt entry
#[[pt_entry]]
#type = 8
#name = "rf_para"
#device = 0
#address0 = 0x1FF000
#size0 = 0x1000
#address1 = 0
#size1 = 0
## compressed image must set len,normal image can left it to 0
#len = 0
ataa commented 1 year ago

Latest BLDevCube is 1.8.2 which looks different than your screenshot and there are changes in tabs, filenames and partition table. After running it and selecting that partition cfg, I get Warning: This v1 partition table is deprecated.

To test if the dumped flash is valid, I flashed your firmware on BL602, then flash the factory one again to check if the dumped flash is valid and working as expected. I'll report back.

Edit: Didn't work, while flashing was successful, I got [WARN blflash::flasher] sha256 not match and it didn't boot!

C:\Users\Ataa\>blflash-windows-amd64.exe flash bl602lamp.bin -b 230400 --port COM3
[INFO  blflash::flasher] Start connection...
[TRACE blflash::flasher] 5ms send count 55
[TRACE blflash::flasher] handshake sent elapsed 262.9µs
[INFO  blflash::flasher] Connection Succeed
[INFO  blflash] Bootrom version: 1
[TRACE blflash] Boot info: BootInfo { len: 14, bootrom_version: 1, otp_info: [0, 0, 0, 0, 3, 0, 0, 0, 91, 63, 41, 94, 94, 24, 1f, 0] }
[INFO  blflash::flasher] Sending eflash_loader...
[INFO  blflash::flasher] Finished 2.5382285s 11.26KiB/s
[TRACE blflash::flasher] 5ms send count 115
[TRACE blflash::flasher] handshake sent elapsed 415.5µs
[INFO  blflash::flasher] Entered eflash_loader
[INFO  blflash::flasher] Erase flash addr: 0 size: 47504
[INFO  blflash::flasher] Program flash... c85e11a0083a27f72f6e1bab9b67cac98d5d31ed90b64b78e6e89e070d782c58
[INFO  blflash::flasher] Program done 2.0866784s 22.24KiB/s
[INFO  blflash::flasher] Erase flash addr: e000 size: 272
[INFO  blflash::flasher] Program flash... da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
[INFO  blflash::flasher] Program done 14.3073ms 18.97KiB/s
[INFO  blflash::flasher] Erase flash addr: f000 size: 272
[INFO  blflash::flasher] Program flash... da4d2fe7d42a71246b0e84d64665b70ad701435f89716c48e6f23ef55340eaa0
[INFO  blflash::flasher] Program done 16.8348ms 16.60KiB/s
[INFO  blflash::flasher] Erase flash addr: 10000 size: 2101248
[INFO  blflash::flasher] Program flash... 591ebe9b5400a873cf7b8d115c4c96b2460b24d69a9b69a6d9717101a79178de
[INFO  blflash::flasher] Program done 92.3340188s 22.22KiB/s
[WARN  blflash::flasher] sha256 not match: 8cbc027f65bc373946f876604ac9b8689e7a9d82927834fb06921b23f1a8fe54 != 591ebe9b5400a873cf7b8d115c4c96b2460b24d69a9b69a6d9717101a79178de
[INFO  blflash::flasher] Erase flash addr: 1f8000 size: 5671
[INFO  blflash::flasher] Program flash... ae42d69b09c2eb134b202b412c00ff175e10b625e2d3c0a2820378bd341926b8
[INFO  blflash::flasher] Program done 252.0974ms 21.98KiB/s
[INFO  blflash] Success
openshwprojects commented 1 year ago

But does OBK boot correctly?

Sso far I've been using the older version of BLDevCube. I am not aware yet how to use the newest version, it seems that Bouffalo Lab has changed something in their partitions standard. It requires more investigation.

If you flash device with OBK, and then read back binary, are the files same?

Maybe binary for flashing needs to be prefixed with a certain header?

ataa commented 1 year ago

I tested it and it does work on mine, but it may not be the case for recent chips with new partition table. Also please use newer version in the upcoming video tutorials as the newer version of BLDevCube has new UI and different tabs (IoT, MCU, MFG).

bldevcube

openshwprojects commented 1 year ago

Wait, my BL602 knowledge is very small, so the new BLDevCube works on older chips if you use older TOML (older partition table)?

That's good to know. We already have recorded the BL602 Magic Strip tutorial on older DevCube, but I will try to check out the new version soon.

ataa commented 1 year ago

Yes, I tested it for BL-M5 V1.2 Board on ZJ-PWH-RGBWW-L2 V1.1 Bulb and flashed the latest release of your firmware successfully.

Flash Log:


[05:30:31.592] - ========= Interface is Uart =========
[05:30:31.608] - eflash loader bin is eflash_loader_40m.bin
[05:30:31.608] - ========= chip flash id: ef4015 =========
[05:30:31.623] - create partition.bin, pt_new is True
[05:30:31.639] - fw_boot_head_gen xtal: 40M
[05:30:31.639] - Create bootheader using C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
[05:30:31.639] - Updating data according to <C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
[05:30:31.639] - Created file len:176
[05:30:31.654] - Create efuse using C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
[05:30:31.654] - Updating data according to <C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[EFUSE_CFG]>
[05:30:31.670] - Created file len:128
[05:30:31.670] - ========= sp image create =========
[05:30:31.670] - Image hash is b'2b6e636f8817b35bc922846d7a82f3c9b3947bb7c19fad1078859fa8b9692e10'
[05:30:31.670] - Hash ignored
[05:30:31.670] - Header crc ignored
[05:30:31.670] - Write flash img
[05:30:31.701] - fw_boot_head_gen xtal: 40M
[05:30:31.701] - Create bootheader using C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
[05:30:31.701] - Updating data according to <C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
[05:30:31.716] - Created file len:176
[05:30:31.716] - Create efuse using C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini
[05:30:31.716] - Updating data according to <C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\img_create_iot/efuse_bootheader_cfg.ini[EFUSE_CFG]>
[05:30:31.716] - Created file len:128
[05:30:31.733] - ========= sp image create =========
[05:30:31.748] - Image hash is b'a1cb783954e80fe98f263e509b5da2080fb40caa55f1c4cb2a7e910c91aa45ce'
[05:30:31.748] - Header crc: b'0d97d3cf'
[05:30:31.748] - Write flash img
[05:30:31.764] - FW Header is 176, 3920 still needed
[05:30:31.764] - FW OTA bin header is Done. Len is 4096
[05:30:32.123] - BL60X_OTA_Ver1.0
[05:30:32.483] - FW OTA bin is Done. Len is 793120
[05:30:33.733] - OTA XZ file len = 423872
[05:30:33.733] - Partiton len = 557056
[05:30:33.733] - BL60X_OTA_Ver1.0
[05:30:33.935] - FW OTA xz is Done
[05:30:33.935] - ========= eflash loader config =========
[05:30:34.482] - Version: eflash_loader_v2.4.3
[05:30:34.482] - Program Start
[05:30:34.482] - ========= eflash loader cmd arguments =========
[05:30:34.482] - C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\eflash_loader/eflash_loader_cfg.ini
[05:30:34.482] - Config file: C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\eflash_loader/eflash_loader_cfg.ini
[05:30:34.498] - serial port is COM3
[05:30:34.498] - cpu_reset=False
[05:30:34.498] - chiptype: bl602
[05:30:34.498] - ========= Interface is uart =========
[05:30:34.498] - com speed: 2000000
[05:30:34.498] - Eflash load helper file: C:\Users\Ataa\Downloads\BouffaloLabDevCube-v1.8.2\chips\bl602\eflash_loader/eflash_loader_40m.bin
[05:30:34.498] - ========= load eflash_loader.bin =========
[05:30:34.498] - Load eflash_loader.bin via uart
[05:30:34.498] - ========= image load =========
[05:30:34.882] - tx rx and power off, press the machine!
[05:30:34.882] - cutoff time is 0.1
[05:30:34.991] - power on tx and rx
[05:30:35.820] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
[05:30:35.820] - clean buf
[05:30:35.850] - send sync
[05:30:36.070] - ack is b'4f4b'
[05:30:36.116] - shake hand success
[05:30:36.132] - get_boot_info
[05:30:36.132] - data read is b'0100000000000000030000008ca65542e8b41b00'
[05:30:36.132] - ========= ChipID: b4e84255a68c =========
[05:30:36.132] - last boot info: None
[05:30:36.132] - sign is 0 encrypt is 0
[05:30:36.132] - segcnt is 1
[05:30:36.132] - segdata_len is 37184
[05:30:36.226] - 4080/37184
[05:30:36.320] - 8160/37184
[05:30:36.413] - 12240/37184
[05:30:36.506] - 16320/37184
[05:30:36.601] - 20400/37184
[05:30:36.694] - 24480/37184
[05:30:36.788] - 28560/37184
[05:30:36.882] - 32640/37184
[05:30:36.976] - 36720/37184
[05:30:36.992] - 37184/37184
[05:30:36.992] - Run img
[05:30:37.100] - Load helper bin time cost(ms): 2602.434814453125
[05:30:37.210] - Flash load shake hand
[05:30:37.226] - default set DTR high
[05:30:37.350] - clean buf
[05:30:37.382] - send sync
[05:30:37.601] - ack is b'4f4b'
[05:30:37.648] - Read mac addr
[05:30:37.648] - flash set para
[05:30:37.648] - ========= flash read jedec ID =========
[05:30:37.648] - Read flash jedec ID
[05:30:37.648] - readdata:
[05:30:37.648] - b'ef401580'
[05:30:37.648] - Finished
[05:30:37.663] - Program operation
[05:30:37.663] - Dealing Index 0
[05:30:37.663] - ========= programming chips\bl602\img_create_iot\whole_img_boot2.bin to 0x00000000
[05:30:37.663] - ========= flash load =========
[05:30:37.663] - ========= flash erase =========
[05:30:37.663] - Erase flash from 0x0 to 0xb40f
[05:30:37.694] - erase pending
[05:30:37.835] - erase pending
[05:30:37.866] - erase pending
[05:30:37.897] - erase pending
[05:30:37.944] - erase pending
[05:30:38.022] - Erase time cost(ms): 359.343505859375
[05:30:38.085] - decompress flash load 24464
[05:30:38.101] - Load 2048/24464 {"progress":8}
[05:30:38.132] - Load 4096/24464 {"progress":16}
[05:30:38.147] - Load 6144/24464 {"progress":25}
[05:30:38.163] - Load 8192/24464 {"progress":33}
[05:30:38.194] - Load 10240/24464 {"progress":41}
[05:30:38.210] - Load 12288/24464 {"progress":50}
[05:30:38.225] - Load 14336/24464 {"progress":58}
[05:30:38.241] - Load 16384/24464 {"progress":66}
[05:30:38.272] - Load 18432/24464 {"progress":75}
[05:30:38.288] - Load 20480/24464 {"progress":83}
[05:30:38.317] - Load 22528/24464 {"progress":92}
[05:30:38.336] - Load 24464/24464 {"progress":100}
[05:30:38.336] - Load 24464/24464 {"progress":100}
[05:30:38.336] - Write check
[05:30:38.366] - Flash load time cost(ms): 328.901123046875
[05:30:38.366] - Finished
[05:30:38.366] - Sha caled by host: 2346b39f21efa45901118d419aa234f10677f848465c265132ed61528c6e68c0
[05:30:38.366] - xip mode Verify
[05:30:38.382] - Read Sha256/46096
[05:30:38.382] - Flash xip readsha time cost(ms): 15.707763671875
[05:30:38.382] - Finished
[05:30:38.382] - Sha caled by dev: 2346b39f21efa45901118d419aa234f10677f848465c265132ed61528c6e68c0
[05:30:38.382] - Verify success
[05:30:38.397] - Dealing Index 1
[05:30:38.397] - ========= programming chips\bl602\partition\partition.bin to 0x0000E000
[05:30:38.413] - ========= flash load =========
[05:30:38.413] - ========= flash erase =========
[05:30:38.413] - Erase flash from 0xe000 to 0xe10f
[05:30:38.428] - erase pending
[05:30:38.506] - Erase time cost(ms): 93.34033203125
[05:30:38.522] - Load 272/272 {"progress":100}
[05:30:38.522] - Load 272/272 {"progress":100}
[05:30:38.522] - Write check
[05:30:38.538] - Flash load time cost(ms): 15.997802734375
[05:30:38.538] - Finished
[05:30:38.538] - Sha caled by host: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
[05:30:38.538] - xip mode Verify
[05:30:38.538] - Read Sha256/272
[05:30:38.538] - Flash xip readsha time cost(ms): 0.0
[05:30:38.554] - Finished
[05:30:38.554] - Sha caled by dev: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
[05:30:38.554] - Verify success
[05:30:38.569] - Dealing Index 2
[05:30:38.569] - ========= programming chips\bl602\partition\partition.bin to 0x0000F000
[05:30:38.585] - ========= flash load =========
[05:30:38.585] - ========= flash erase =========
[05:30:38.585] - Erase flash from 0xf000 to 0xf10f
[05:30:38.601] - erase pending
[05:30:38.678] - Erase time cost(ms): 93.602294921875
[05:30:38.694] - Load 272/272 {"progress":100}
[05:30:38.694] - Load 272/272 {"progress":100}
[05:30:38.694] - Write check
[05:30:38.711] - Flash load time cost(ms): 17.034423828125
[05:30:38.711] - Finished
[05:30:38.711] - Sha caled by host: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
[05:30:38.711] - xip mode Verify
[05:30:38.711] - Read Sha256/272
[05:30:38.711] - Flash xip readsha time cost(ms): 0.0
[05:30:38.725] - Finished
[05:30:38.725] - Sha caled by dev: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
[05:30:38.725] - Verify success
[05:30:38.741] - Dealing Index 3
[05:30:38.741] - ========= programming chips\bl602\img_create_iot\whole_img.bin to 0x00010000
[05:30:38.757] - ========= flash load =========
[05:30:38.757] - ========= flash erase =========
[05:30:38.757] - Erase flash from 0x10000 to 0xd1a1f
[05:30:38.773] - erase pending
[05:30:39.006] - erase pending
[05:30:39.226] - erase pending
[05:30:39.444] - erase pending
[05:30:39.679] - erase pending
[05:30:39.898] - erase pending
[05:30:40.132] - erase pending
[05:30:40.365] - erase pending
[05:30:40.585] - erase pending
[05:30:40.804] - erase pending
[05:30:41.038] - erase pending
[05:30:41.272] - erase pending
[05:30:41.491] - erase pending
[05:30:41.522] - erase pending
[05:30:41.616] - Erase time cost(ms): 2858.9833984375
[05:30:42.398] - decompress flash load 423872
[05:30:42.413] - Load 2048/423872 {"progress":0}
[05:30:42.444] - Load 4096/423872 {"progress":0}
[05:30:42.460] - Load 6144/423872 {"progress":1}
[05:30:42.476] - Load 8192/423872 {"progress":1}
[05:30:42.491] - Load 10240/423872 {"progress":2}
[05:30:42.523] - Load 12288/423872 {"progress":2}
[05:30:42.538] - Load 14336/423872 {"progress":3}
[05:30:42.553] - Load 16384/423872 {"progress":3}
[05:30:42.585] - Load 18432/423872 {"progress":4}
[05:30:42.601] - Load 20480/423872 {"progress":4}
[05:30:42.616] - Load 22528/423872 {"progress":5}
[05:30:42.647] - Load 24576/423872 {"progress":5}
[05:30:42.664] - Load 26624/423872 {"progress":6}
[05:30:42.679] - Load 28672/423872 {"progress":6}
[05:30:42.710] - Load 30720/423872 {"progress":7}
[05:30:42.725] - Load 32768/423872 {"progress":7}
[05:30:42.741] - Load 34816/423872 {"progress":8}
[05:30:42.773] - Load 36864/423872 {"progress":8}
[05:30:42.788] - Load 38912/423872 {"progress":9}
[05:30:42.804] - Load 40960/423872 {"progress":9}
[05:30:42.819] - Load 43008/423872 {"progress":10}
[05:30:42.850] - Load 45056/423872 {"progress":10}
[05:30:42.866] - Load 47104/423872 {"progress":11}
[05:30:42.882] - Load 49152/423872 {"progress":11}
[05:30:42.913] - Load 51200/423872 {"progress":12}
[05:30:42.929] - Load 53248/423872 {"progress":12}
[05:30:42.944] - Load 55296/423872 {"progress":13}
[05:30:42.975] - Load 57344/423872 {"progress":13}
[05:30:42.991] - Load 59392/423872 {"progress":14}
[05:30:43.006] - Load 61440/423872 {"progress":14}
[05:30:43.038] - Load 63488/423872 {"progress":14}
[05:30:43.054] - Load 65536/423872 {"progress":15}
[05:30:43.069] - Load 67584/423872 {"progress":15}
[05:30:43.085] - Load 69632/423872 {"progress":16}
[05:30:43.116] - Load 71680/423872 {"progress":16}
[05:30:43.132] - Load 73728/423872 {"progress":17}
[05:30:43.147] - Load 75776/423872 {"progress":17}
[05:30:43.178] - Load 77824/423872 {"progress":18}
[05:30:43.194] - Load 79872/423872 {"progress":18}
[05:30:43.210] - Load 81920/423872 {"progress":19}
[05:30:43.241] - Load 83968/423872 {"progress":19}
[05:30:43.257] - Load 86016/423872 {"progress":20}
[05:30:43.272] - Load 88064/423872 {"progress":20}
[05:30:43.288] - Load 90112/423872 {"progress":21}
[05:30:43.319] - Load 92160/423872 {"progress":21}
[05:30:43.335] - Load 94208/423872 {"progress":22}
[05:30:43.350] - Load 96256/423872 {"progress":22}
[05:30:43.382] - Load 98304/423872 {"progress":23}
[05:30:43.397] - Load 100352/423872 {"progress":23}
[05:30:43.413] - Load 102400/423872 {"progress":24}
[05:30:43.445] - Load 104448/423872 {"progress":24}
[05:30:43.460] - Load 106496/423872 {"progress":25}
[05:30:43.475] - Load 108544/423872 {"progress":25}
[05:30:43.491] - Load 110592/423872 {"progress":26}
[05:30:43.522] - Load 112640/423872 {"progress":26}
[05:30:43.538] - Load 114688/423872 {"progress":27}
[05:30:43.554] - Load 116736/423872 {"progress":27}
[05:30:43.570] - Load 118784/423872 {"progress":28}
[05:30:43.600] - Load 120832/423872 {"progress":28}
[05:30:43.616] - Load 122880/423872 {"progress":28}
[05:30:43.631] - Load 124928/423872 {"progress":29}
[05:30:43.663] - Load 126976/423872 {"progress":29}
[05:30:43.678] - Load 129024/423872 {"progress":30}
[05:30:43.694] - Load 131072/423872 {"progress":30}
[05:30:43.726] - Load 133120/423872 {"progress":31}
[05:30:43.741] - Load 135168/423872 {"progress":31}
[05:30:43.757] - Load 137216/423872 {"progress":32}
[05:30:43.788] - Load 139264/423872 {"progress":32}
[05:30:43.804] - Load 141312/423872 {"progress":33}
[05:30:43.819] - Load 143360/423872 {"progress":33}
[05:30:43.835] - Load 145408/423872 {"progress":34}
[05:30:43.866] - Load 147456/423872 {"progress":34}
[05:30:43.882] - Load 149504/423872 {"progress":35}
[05:30:43.898] - Load 151552/423872 {"progress":35}
[05:30:43.929] - Load 153600/423872 {"progress":36}
[05:30:43.944] - Load 155648/423872 {"progress":36}
[05:30:43.960] - Load 157696/423872 {"progress":37}
[05:30:43.990] - Load 159744/423872 {"progress":37}
[05:30:44.007] - Load 161792/423872 {"progress":38}
[05:30:44.023] - Load 163840/423872 {"progress":38}
[05:30:44.054] - Load 165888/423872 {"progress":39}
[05:30:44.069] - Load 167936/423872 {"progress":39}
[05:30:44.085] - Load 169984/423872 {"progress":40}
[05:30:44.116] - Load 172032/423872 {"progress":40}
[05:30:44.132] - Load 174080/423872 {"progress":41}
[05:30:44.147] - Load 176128/423872 {"progress":41}
[05:30:44.163] - Load 178176/423872 {"progress":42}
[05:30:44.194] - Load 180224/423872 {"progress":42}
[05:30:44.210] - Load 182272/423872 {"progress":43}
[05:30:44.226] - Load 184320/423872 {"progress":43}
[05:30:44.257] - Load 186368/423872 {"progress":43}
[05:30:44.272] - Load 188416/423872 {"progress":44}
[05:30:44.288] - Load 190464/423872 {"progress":44}
[05:30:44.304] - Load 192512/423872 {"progress":45}
[05:30:44.335] - Load 194560/423872 {"progress":45}
[05:30:44.350] - Load 196608/423872 {"progress":46}
[05:30:44.366] - Load 198656/423872 {"progress":46}
[05:30:44.398] - Load 200704/423872 {"progress":47}
[05:30:44.413] - Load 202752/423872 {"progress":47}
[05:30:44.429] - Load 204800/423872 {"progress":48}
[05:30:44.444] - Load 206848/423872 {"progress":48}
[05:30:44.475] - Load 208896/423872 {"progress":49}
[05:30:44.491] - Load 210944/423872 {"progress":49}
[05:30:44.507] - Load 212992/423872 {"progress":50}
[05:30:44.538] - Load 215040/423872 {"progress":50}
[05:30:44.554] - Load 217088/423872 {"progress":51}
[05:30:44.569] - Load 219136/423872 {"progress":51}
[05:30:44.600] - Load 221184/423872 {"progress":52}
[05:30:44.616] - Load 223232/423872 {"progress":52}
[05:30:44.632] - Load 225280/423872 {"progress":53}
[05:30:44.647] - Load 227328/423872 {"progress":53}
[05:30:44.679] - Load 229376/423872 {"progress":54}
[05:30:44.695] - Load 231424/423872 {"progress":54}
[05:30:44.710] - Load 233472/423872 {"progress":55}
[05:30:44.741] - Load 235520/423872 {"progress":55}
[05:30:44.756] - Load 237568/423872 {"progress":56}
[05:30:44.772] - Load 239616/423872 {"progress":56}
[05:30:44.803] - Load 241664/423872 {"progress":57}
[05:30:44.819] - Load 243712/423872 {"progress":57}
[05:30:44.835] - Load 245760/423872 {"progress":57}
[05:30:44.850] - Load 247808/423872 {"progress":58}
[05:30:44.882] - Load 249856/423872 {"progress":58}
[05:30:44.898] - Load 251904/423872 {"progress":59}
[05:30:44.913] - Load 253952/423872 {"progress":59}
[05:30:44.944] - Load 256000/423872 {"progress":60}
[05:30:44.960] - Load 258048/423872 {"progress":60}
[05:30:44.976] - Load 260096/423872 {"progress":61}
[05:30:45.006] - Load 262144/423872 {"progress":61}
[05:30:45.022] - Load 264192/423872 {"progress":62}
[05:30:45.038] - Load 266240/423872 {"progress":62}
[05:30:45.054] - Load 268288/423872 {"progress":63}
[05:30:45.085] - Load 270336/423872 {"progress":63}
[05:30:45.101] - Load 272384/423872 {"progress":64}
[05:30:45.116] - Load 274432/423872 {"progress":64}
[05:30:45.147] - Load 276480/423872 {"progress":65}
[05:30:45.163] - Load 278528/423872 {"progress":65}
[05:30:45.178] - Load 280576/423872 {"progress":66}
[05:30:45.210] - Load 282624/423872 {"progress":66}
[05:30:45.225] - Load 284672/423872 {"progress":67}
[05:30:45.241] - Load 286720/423872 {"progress":67}
[05:30:45.273] - Load 288768/423872 {"progress":68}
[05:30:45.288] - Load 290816/423872 {"progress":68}
[05:30:45.304] - Load 292864/423872 {"progress":69}
[05:30:45.320] - Load 294912/423872 {"progress":69}
[05:30:45.351] - Load 296960/423872 {"progress":70}
[05:30:45.366] - Load 299008/423872 {"progress":70}
[05:30:45.382] - Load 301056/423872 {"progress":71}
[05:30:45.413] - Load 303104/423872 {"progress":71}
[05:30:45.429] - Load 305152/423872 {"progress":71}
[05:30:45.445] - Load 307200/423872 {"progress":72}
[05:30:45.475] - Load 309248/423872 {"progress":72}
[05:30:45.491] - Load 311296/423872 {"progress":73}
[05:30:45.506] - Load 313344/423872 {"progress":73}
[05:30:45.537] - Load 315392/423872 {"progress":74}
[05:30:45.553] - Load 317440/423872 {"progress":74}
[05:30:45.569] - Load 319488/423872 {"progress":75}
[05:30:45.585] - Load 321536/423872 {"progress":75}
[05:30:45.616] - Load 323584/423872 {"progress":76}
[05:30:45.632] - Load 325632/423872 {"progress":76}
[05:30:45.647] - Load 327680/423872 {"progress":77}
[05:30:45.678] - Load 329728/423872 {"progress":77}
[05:30:45.694] - Load 331776/423872 {"progress":78}
[05:30:45.710] - Load 333824/423872 {"progress":78}
[05:30:45.741] - Load 335872/423872 {"progress":79}
[05:30:45.757] - Load 337920/423872 {"progress":79}
[05:30:45.772] - Load 339968/423872 {"progress":80}
[05:30:45.788] - Load 342016/423872 {"progress":80}
[05:30:45.819] - Load 344064/423872 {"progress":81}
[05:30:45.835] - Load 346112/423872 {"progress":81}
[05:30:45.850] - Load 348160/423872 {"progress":82}
[05:30:45.882] - Load 350208/423872 {"progress":82}
[05:30:45.897] - Load 352256/423872 {"progress":83}
[05:30:45.913] - Load 354304/423872 {"progress":83}
[05:30:45.944] - Load 356352/423872 {"progress":84}
[05:30:45.960] - Load 358400/423872 {"progress":84}
[05:30:45.975] - Load 360448/423872 {"progress":85}
[05:30:45.991] - Load 362496/423872 {"progress":85}
[05:30:46.023] - Load 364544/423872 {"progress":86}
[05:30:46.038] - Load 366592/423872 {"progress":86}
[05:30:46.054] - Load 368640/423872 {"progress":86}
[05:30:46.085] - Load 370688/423872 {"progress":87}
[05:30:46.100] - Load 372736/423872 {"progress":87}
[05:30:46.117] - Load 374784/423872 {"progress":88}
[05:30:46.147] - Load 376832/423872 {"progress":88}
[05:30:46.164] - Load 378880/423872 {"progress":89}
[05:30:46.179] - Load 380928/423872 {"progress":89}
[05:30:46.210] - Load 382976/423872 {"progress":90}
[05:30:46.226] - Load 385024/423872 {"progress":90}
[05:30:46.257] - Load 387072/423872 {"progress":91}
[05:30:46.272] - Load 389120/423872 {"progress":91}
[05:30:46.304] - Load 391168/423872 {"progress":92}
[05:30:46.319] - Load 393216/423872 {"progress":92}
[05:30:46.350] - Load 395264/423872 {"progress":93}
[05:30:46.367] - Load 397312/423872 {"progress":93}
[05:30:46.383] - Load 399360/423872 {"progress":94}
[05:30:46.413] - Load 401408/423872 {"progress":94}
[05:30:46.429] - Load 403456/423872 {"progress":95}
[05:30:46.460] - Load 405504/423872 {"progress":95}
[05:30:46.475] - Load 407552/423872 {"progress":96}
[05:30:46.492] - Load 409600/423872 {"progress":96}
[05:30:46.522] - Load 411648/423872 {"progress":97}
[05:30:46.538] - Load 413696/423872 {"progress":97}
[05:30:46.570] - Load 415744/423872 {"progress":98}
[05:30:46.585] - Load 417792/423872 {"progress":98}
[05:30:46.616] - Load 419840/423872 {"progress":99}
[05:30:46.631] - Load 421888/423872 {"progress":99}
[05:30:46.647] - Load 423872/423872 {"progress":100}
[05:30:46.647] - Load 423872/423872 {"progress":100}
[05:30:46.663] - Write check
[05:30:46.694] - Flash load time cost(ms): 5078.30029296875
[05:30:46.694] - Finished
[05:30:46.710] - Sha caled by host: e3ffb219e63d7141f09d5ba0335a7a1ed1faa0043517e7e193d6769c54e9d962
[05:30:46.710] - xip mode Verify
[05:30:46.929] - Read Sha256/793120
[05:30:46.929] - Flash xip readsha time cost(ms): 218.76708984375
[05:30:46.929] - Finished
[05:30:46.929] - Sha caled by dev: e3ffb219e63d7141f09d5ba0335a7a1ed1faa0043517e7e193d6769c54e9d962
[05:30:46.929] - Verify success
[05:30:46.945] - Program Finished
[05:30:46.945] - All time cost(ms): 12462.46826171875
[05:30:47.069] - close interface
[05:30:47.069] - [All Success]```
openshwprojects commented 1 year ago

Hello, is the [WARN blflash::flasher] sha256 not match issue resolved?

Btw, do you know how to reset BL602 efuse to factory settings?

ataa commented 1 year ago
ataa commented 1 year ago

Good News! Reprogramed CP2102 for 2000000 baudrate and reflashed factory firmware using Latest BLDevCube and it was a success. Everything works as expected even the Bluetooth remote for BL602 Bulbs. Now I have to figure out a way to make an OTA flash out of it. It would be nice if you can add a section to your forum for sharing factory firmwares. (For research purposes OFC)

openshwprojects commented 1 year ago

That's great, what was exactly the steps you've taken to do a read and then backup restore?

Hmmm I think you can just attach factory firmware to the teardown article, we have our own attachment (and images) hosting on Elektroda.

Also, I am currently having an issue with my BL602 dev board - I tried to change mac and supposedly I overwrote efuse and it does not connect to wifi even after full erase of flash. Maybe your dump could help me recover my device.

ataa commented 1 year ago

bldevcube-reflash-factory

I have two factory images:

dump.zip Bl602Lamp-4th.zip

openshwprojects commented 1 year ago

From which exactly devices are those firmwares and how to pair them with (which app?) for testing purposes?

ataa commented 1 year ago
openshwprojects commented 1 year ago

After flashing Bl602Lamp-4th.zip, should I get anything on UART, like a log output?

ataa commented 1 year ago

Yes, it will output board model name every few seconds.

openshwprojects commented 1 year ago

Well, it's not working for me. Not in 1.4.0 BldevCube and not in the 1.8.0.

Console doesn't print anything after I repower the module into the run mode. With Chip Erase = True: image

Witch Chip Erase = False; image

nothing: image

ataa commented 1 year ago

does it activate Wifi AP after removing boot pin connection and power cycle? AP SSID should start with LEDnet00

openshwprojects commented 1 year ago

No AP at all.

It only shows AP when I flash OpenBL602 build by the old method with old dev cube like in my guide, but the AP is not functional after I supposedly broke refuse (AP shows up but my PC is unable to connect to it). I was playing with MAC address change and it's like that since I used EF_Ctrl_Write_MAC_Address_Opt function. The device on OpenBL602 works, but my PC fails to connect to it's AP, and when it's in client mode, the device fails to get DHCP IP from my Router (even though it has unique MAC).

@ataa btw didn't you read flash from offset 0x0 and ain't I flashing it now to 0x2000 offset? Just a hunch...

Log:


[17:46:51.075] - EFUSE_CFG
[17:46:51.076] - BOOTHEADER_CFG
[17:46:51.092] - Create bootheader using W:\GIT\bl_iot_sdk\tools\flash_tool\chips\bl602\img_create_mcu/efuse_bootheader_cfg.ini
[17:46:51.093] - Updating data according to <W:\GIT\bl_iot_sdk\tools\flash_tool\chips\bl602\img_create_mcu/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
[17:46:51.100] - Created file len:176
[17:46:51.111] - Image create path: W:\GIT\bl_iot_sdk\tools\flash_tool\chips\bl602\img_create_mcu
[17:46:51.113] - Config file: W:\GIT\bl_iot_sdk\tools\flash_tool\chips\bl602\img_create_mcu/img_create_cfg.ini
[17:46:51.152] - Image hash is b'4d0927172cb417c9a8c3dba45fd7a2ca5f38ebe10586f37e99517d832bc90e7d'
[17:46:51.154] - Header crc: b'9567167c'
[17:46:51.156] - Write flash img
[17:46:51.201] - ========= eflash loader config =========
[17:46:51.667] - Version: eflash_loader_v2.4.2
[17:46:51.669] - Program Start
[17:46:51.669] - ========= eflash loader cmd arguments =========
[17:46:51.670] - None
[17:46:51.670] - Config file: W:\GIT\bl_iot_sdk\tools\flash_tool\chips\bl602\eflash_loader\eflash_loader_cfg.ini
[17:46:51.676] - serial port is COM15
[17:46:51.677] - cpu_reset=False
[17:46:51.683] - chiptype: bl602
[17:46:51.683] - ========= Interface is uart =========
[17:46:51.683] - com speed: 2000000
[17:46:51.684] - Eflash load helper file: W:\GIT\bl_iot_sdk\tools\flash_tool\chips\bl602\eflash_loader/eflash_loader_40m.bin
[17:46:51.685] - ========= load eflash_loader.bin =========
[17:46:51.685] - Load eflash_loader.bin via uart
[17:46:51.685] - ========= image load =========
[17:46:51.951] - tx rx and power off, press the machine!
[17:46:51.953] - cutoff time is 0.1
[17:46:52.055] - power on tx and rx
[17:46:52.785] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
[17:46:52.786] - clean buf
[17:46:52.787] - send sync
[17:46:53.003] - ack is b'4f4b'
[17:46:53.035] - shake hand success
[17:46:53.047] - get_boot_info
[17:46:53.050] - data read is b'010000000000000003000000fd1fc305b9181700'
[17:46:53.051] - ========= ChipID: 18b905c31ffd =========
[17:46:53.051] - last boot info: None
[17:46:53.051] - sign is 0 encrypt is 0
[17:46:53.052] - segcnt is 1
[17:46:53.062] - segdata_len is 37152
[17:46:53.147] - 4080/37152
[17:46:53.232] - 8160/37152
[17:46:53.318] - 12240/37152
[17:46:53.404] - 16320/37152
[17:46:53.488] - 20400/37152
[17:46:53.574] - 24480/37152
[17:46:53.659] - 28560/37152
[17:46:53.745] - 32640/37152
[17:46:53.830] - 36720/37152
[17:46:53.841] - 37152/37152
[17:46:53.844] - Run img
[17:46:53.947] - Load helper bin time cost(ms): 2261.14111328125
[17:46:54.048] - Flash load shake hand
[17:46:54.060] - default set DTR high
[17:46:54.162] - clean buf
[17:46:54.164] - send sync
[17:46:54.381] - ack is b'4f4b'
[17:46:54.414] - Read mac addr
[17:46:54.417] - flash set para
[17:46:54.418] - ========= flash read jedec ID =========
[17:46:54.421] - Read flash jedec ID
[17:46:54.421] - readdata:
[17:46:54.422] - b'ef401580'
[17:46:54.422] - Finished
[17:46:54.432] - Program operation
[17:46:54.433] - Dealing Index 0
[17:46:54.434] - ========= programming chips\bl602\img_create_mcu\bootinfo.bin to 0x00000000
[17:46:54.441] - ========= flash load =========
[17:46:54.446] - ========= flash erase =========
[17:46:54.446] - Erase flash from 0x0 to 0xaf
[17:46:54.449] - erase pending
[17:46:54.504] - Erase time cost(ms): 58.43017578125
[17:46:54.508] - Load 176/176 {"progress":100}
[17:46:54.510] - Load 176/176 {"progress":100}
[17:46:54.511] - Write check
[17:46:54.513] - Flash load time cost(ms): 6.980712890625
[17:46:54.513] - Finished
[17:46:54.518] - Sha caled by host: 1ac8420101ebbf7b8b77413a602ea32007ceea3792a3f636eb99aa9b0b592661
[17:46:54.518] - xip mode Verify
[17:46:54.523] - Read Sha256/176
[17:46:54.523] - Flash xip readsha time cost(ms): 2.99072265625
[17:46:54.524] - Finished
[17:46:54.526] - Sha caled by dev: 1ac8420101ebbf7b8b77413a602ea32007ceea3792a3f636eb99aa9b0b592661
[17:46:54.528] - Verify success
[17:46:54.530] - Dealing Index 1
[17:46:54.530] - ========= programming chips\bl602\img_create_mcu\img.bin to 0x00002000
[17:46:54.546] - ========= flash load =========
[17:46:54.549] - ========= flash erase =========
[17:46:54.550] - Erase flash from 0x2000 to 0x201fff
[17:46:54.558] - erase pending
[17:46:54.593] - erase pending
[17:46:54.622] - erase pending
[17:46:54.660] - erase pending
[17:46:54.691] - erase pending
[17:46:54.722] - erase pending
[17:46:54.765] - erase pending
[17:46:54.905] - erase pending
[17:46:55.094] - erase pending
[17:46:55.301] - erase pending
[17:46:55.491] - erase pending
[17:46:55.694] - erase pending
[17:46:55.909] - erase pending
[17:46:56.128] - erase pending
[17:46:56.345] - erase pending
[17:46:56.541] - erase pending
[17:46:56.732] - erase pending
[17:46:56.953] - erase pending
[17:46:57.148] - erase pending
[17:46:57.372] - erase pending
[17:46:57.578] - erase pending
[17:46:57.781] - erase pending
[17:46:57.989] - erase pending
[17:46:58.205] - erase pending
[17:46:58.405] - erase pending
[17:46:58.598] - erase pending
[17:46:58.801] - erase pending
[17:46:59.002] - erase pending
[17:46:59.200] - erase pending
[17:46:59.390] - erase pending
[17:46:59.574] - erase pending
[17:46:59.775] - erase pending
[17:46:59.982] - erase pending
[17:47:00.200] - erase pending
[17:47:00.408] - erase pending
[17:47:00.591] - erase pending
[17:47:00.773] - erase pending
[17:47:00.953] - erase pending
[17:47:01.153] - erase pending
[17:47:01.186] - erase pending
[17:47:01.236] - Erase time cost(ms): 6684.005126953125
[17:47:02.193] - decompress flash load 441016
[17:47:02.211] - Load 2048/441016 {"progress":0}
[17:47:02.227] - Load 4096/441016 {"progress":0}
[17:47:02.244] - Load 6144/441016 {"progress":1}
[17:47:02.262] - Load 8192/441016 {"progress":1}
[17:47:02.279] - Load 10240/441016 {"progress":2}
[17:47:02.297] - Load 12288/441016 {"progress":2}
[17:47:02.313] - Load 14336/441016 {"progress":3}
[17:47:02.330] - Load 16384/441016 {"progress":3}
[17:47:02.347] - Load 18432/441016 {"progress":4}
[17:47:02.364] - Load 20480/441016 {"progress":4}
[17:47:02.382] - Load 22528/441016 {"progress":5}
[17:47:02.399] - Load 24576/441016 {"progress":5}
[17:47:02.416] - Load 26624/441016 {"progress":6}
[17:47:02.450] - Load 28672/441016 {"progress":6}
[17:47:02.470] - Load 30720/441016 {"progress":6}
[17:47:02.486] - Load 32768/441016 {"progress":7}
[17:47:02.503] - Load 34816/441016 {"progress":7}
[17:47:02.519] - Load 36864/441016 {"progress":8}
[17:47:02.535] - Load 38912/441016 {"progress":8}
[17:47:02.551] - Load 40960/441016 {"progress":9}
[17:47:02.570] - Load 43008/441016 {"progress":9}
[17:47:02.586] - Load 45056/441016 {"progress":10}
[17:47:02.602] - Load 47104/441016 {"progress":10}
[17:47:02.617] - Load 49152/441016 {"progress":11}
[17:47:02.634] - Load 51200/441016 {"progress":11}
[17:47:02.650] - Load 53248/441016 {"progress":12}
[17:47:02.666] - Load 55296/441016 {"progress":12}
[17:47:02.683] - Load 57344/441016 {"progress":13}
[17:47:02.699] - Load 59392/441016 {"progress":13}
[17:47:02.716] - Load 61440/441016 {"progress":13}
[17:47:02.732] - Load 63488/441016 {"progress":14}
[17:47:02.749] - Load 65536/441016 {"progress":14}
[17:47:02.765] - Load 67584/441016 {"progress":15}
[17:47:02.781] - Load 69632/441016 {"progress":15}
[17:47:02.798] - Load 71680/441016 {"progress":16}
[17:47:02.815] - Load 73728/441016 {"progress":16}
[17:47:02.833] - Load 75776/441016 {"progress":17}
[17:47:02.851] - Load 77824/441016 {"progress":17}
[17:47:02.867] - Load 79872/441016 {"progress":18}
[17:47:02.884] - Load 81920/441016 {"progress":18}
[17:47:02.900] - Load 83968/441016 {"progress":19}
[17:47:02.918] - Load 86016/441016 {"progress":19}
[17:47:02.935] - Load 88064/441016 {"progress":19}
[17:47:02.952] - Load 90112/441016 {"progress":20}
[17:47:02.969] - Load 92160/441016 {"progress":20}
[17:47:02.986] - Load 94208/441016 {"progress":21}
[17:47:03.003] - Load 96256/441016 {"progress":21}
[17:47:03.019] - Load 98304/441016 {"progress":22}
[17:47:03.037] - Load 100352/441016 {"progress":22}
[17:47:03.054] - Load 102400/441016 {"progress":23}
[17:47:03.070] - Load 104448/441016 {"progress":23}
[17:47:03.086] - Load 106496/441016 {"progress":24}
[17:47:03.103] - Load 108544/441016 {"progress":24}
[17:47:03.119] - Load 110592/441016 {"progress":25}
[17:47:03.135] - Load 112640/441016 {"progress":25}
[17:47:03.151] - Load 114688/441016 {"progress":26}
[17:47:03.169] - Load 116736/441016 {"progress":26}
[17:47:03.186] - Load 118784/441016 {"progress":26}
[17:47:03.203] - Load 120832/441016 {"progress":27}
[17:47:03.219] - Load 122880/441016 {"progress":27}
[17:47:03.238] - Load 124928/441016 {"progress":28}
[17:47:03.256] - Load 126976/441016 {"progress":28}
[17:47:03.272] - Load 129024/441016 {"progress":29}
[17:47:03.289] - Load 131072/441016 {"progress":29}
[17:47:03.306] - Load 133120/441016 {"progress":30}
[17:47:03.322] - Load 135168/441016 {"progress":30}
[17:47:03.339] - Load 137216/441016 {"progress":31}
[17:47:03.357] - Load 139264/441016 {"progress":31}
[17:47:03.373] - Load 141312/441016 {"progress":32}
[17:47:03.390] - Load 143360/441016 {"progress":32}
[17:47:03.407] - Load 145408/441016 {"progress":32}
[17:47:03.424] - Load 147456/441016 {"progress":33}
[17:47:03.441] - Load 149504/441016 {"progress":33}
[17:47:03.457] - Load 151552/441016 {"progress":34}
[17:47:03.475] - Load 153600/441016 {"progress":34}
[17:47:03.493] - Load 155648/441016 {"progress":35}
[17:47:03.510] - Load 157696/441016 {"progress":35}
[17:47:03.526] - Load 159744/441016 {"progress":36}
[17:47:03.543] - Load 161792/441016 {"progress":36}
[17:47:03.559] - Load 163840/441016 {"progress":37}
[17:47:03.576] - Load 165888/441016 {"progress":37}
[17:47:03.593] - Load 167936/441016 {"progress":38}
[17:47:03.609] - Load 169984/441016 {"progress":38}
[17:47:03.626] - Load 172032/441016 {"progress":39}
[17:47:03.643] - Load 174080/441016 {"progress":39}
[17:47:03.660] - Load 176128/441016 {"progress":39}
[17:47:03.676] - Load 178176/441016 {"progress":40}
[17:47:03.693] - Load 180224/441016 {"progress":40}
[17:47:03.710] - Load 182272/441016 {"progress":41}
[17:47:03.727] - Load 184320/441016 {"progress":41}
[17:47:03.744] - Load 186368/441016 {"progress":42}
[17:47:03.761] - Load 188416/441016 {"progress":42}
[17:47:03.777] - Load 190464/441016 {"progress":43}
[17:47:03.794] - Load 192512/441016 {"progress":43}
[17:47:03.810] - Load 194560/441016 {"progress":44}
[17:47:03.826] - Load 196608/441016 {"progress":44}
[17:47:03.843] - Load 198656/441016 {"progress":45}
[17:47:03.860] - Load 200704/441016 {"progress":45}
[17:47:03.877] - Load 202752/441016 {"progress":45}
[17:47:03.893] - Load 204800/441016 {"progress":46}
[17:47:03.910] - Load 206848/441016 {"progress":46}
[17:47:03.926] - Load 208896/441016 {"progress":47}
[17:47:03.943] - Load 210944/441016 {"progress":47}
[17:47:03.959] - Load 212992/441016 {"progress":48}
[17:47:03.976] - Load 215040/441016 {"progress":48}
[17:47:03.993] - Load 217088/441016 {"progress":49}
[17:47:04.010] - Load 219136/441016 {"progress":49}
[17:47:04.025] - Load 221184/441016 {"progress":50}
[17:47:04.045] - Load 223232/441016 {"progress":50}
[17:47:04.061] - Load 225280/441016 {"progress":51}
[17:47:04.078] - Load 227328/441016 {"progress":51}
[17:47:04.096] - Load 229376/441016 {"progress":52}
[17:47:04.112] - Load 231424/441016 {"progress":52}
[17:47:04.129] - Load 233472/441016 {"progress":52}
[17:47:04.146] - Load 235520/441016 {"progress":53}
[17:47:04.163] - Load 237568/441016 {"progress":53}
[17:47:04.182] - Load 239616/441016 {"progress":54}
[17:47:04.198] - Load 241664/441016 {"progress":54}
[17:47:04.215] - Load 243712/441016 {"progress":55}
[17:47:04.232] - Load 245760/441016 {"progress":55}
[17:47:04.249] - Load 247808/441016 {"progress":56}
[17:47:04.265] - Load 249856/441016 {"progress":56}
[17:47:04.282] - Load 251904/441016 {"progress":57}
[17:47:04.298] - Load 253952/441016 {"progress":57}
[17:47:04.315] - Load 256000/441016 {"progress":58}
[17:47:04.331] - Load 258048/441016 {"progress":58}
[17:47:04.349] - Load 260096/441016 {"progress":58}
[17:47:04.366] - Load 262144/441016 {"progress":59}
[17:47:04.385] - Load 264192/441016 {"progress":59}
[17:47:04.401] - Load 266240/441016 {"progress":60}
[17:47:04.421] - Load 268288/441016 {"progress":60}
[17:47:04.437] - Load 270336/441016 {"progress":61}
[17:47:04.455] - Load 272384/441016 {"progress":61}
[17:47:04.471] - Load 274432/441016 {"progress":62}
[17:47:04.487] - Load 276480/441016 {"progress":62}
[17:47:04.504] - Load 278528/441016 {"progress":63}
[17:47:04.521] - Load 280576/441016 {"progress":63}
[17:47:04.537] - Load 282624/441016 {"progress":64}
[17:47:04.555] - Load 284672/441016 {"progress":64}
[17:47:04.572] - Load 286720/441016 {"progress":65}
[17:47:04.589] - Load 288768/441016 {"progress":65}
[17:47:04.606] - Load 290816/441016 {"progress":65}
[17:47:04.624] - Load 292864/441016 {"progress":66}
[17:47:04.640] - Load 294912/441016 {"progress":66}
[17:47:04.659] - Load 296960/441016 {"progress":67}
[17:47:04.679] - Load 299008/441016 {"progress":67}
[17:47:04.697] - Load 301056/441016 {"progress":68}
[17:47:04.713] - Load 303104/441016 {"progress":68}
[17:47:04.730] - Load 305152/441016 {"progress":69}
[17:47:04.746] - Load 307200/441016 {"progress":69}
[17:47:04.763] - Load 309248/441016 {"progress":70}
[17:47:04.779] - Load 311296/441016 {"progress":70}
[17:47:04.797] - Load 313344/441016 {"progress":71}
[17:47:04.814] - Load 315392/441016 {"progress":71}
[17:47:04.830] - Load 317440/441016 {"progress":71}
[17:47:04.846] - Load 319488/441016 {"progress":72}
[17:47:04.864] - Load 321536/441016 {"progress":72}
[17:47:04.881] - Load 323584/441016 {"progress":73}
[17:47:04.899] - Load 325632/441016 {"progress":73}
[17:47:04.915] - Load 327680/441016 {"progress":74}
[17:47:04.933] - Load 329728/441016 {"progress":74}
[17:47:04.950] - Load 331776/441016 {"progress":75}
[17:47:04.966] - Load 333824/441016 {"progress":75}
[17:47:04.984] - Load 335872/441016 {"progress":76}
[17:47:05.001] - Load 337920/441016 {"progress":76}
[17:47:05.018] - Load 339968/441016 {"progress":77}
[17:47:05.035] - Load 342016/441016 {"progress":77}
[17:47:05.051] - Load 344064/441016 {"progress":78}
[17:47:05.069] - Load 346112/441016 {"progress":78}
[17:47:05.088] - Load 348160/441016 {"progress":78}
[17:47:05.105] - Load 350208/441016 {"progress":79}
[17:47:05.123] - Load 352256/441016 {"progress":79}
[17:47:05.138] - Load 354304/441016 {"progress":80}
[17:47:05.157] - Load 356352/441016 {"progress":80}
[17:47:05.173] - Load 358400/441016 {"progress":81}
[17:47:05.192] - Load 360448/441016 {"progress":81}
[17:47:05.209] - Load 362496/441016 {"progress":82}
[17:47:05.226] - Load 364544/441016 {"progress":82}
[17:47:05.243] - Load 366592/441016 {"progress":83}
[17:47:05.258] - Load 368640/441016 {"progress":83}
[17:47:05.276] - Load 370688/441016 {"progress":84}
[17:47:05.293] - Load 372736/441016 {"progress":84}
[17:47:05.311] - Load 374784/441016 {"progress":84}
[17:47:05.327] - Load 376832/441016 {"progress":85}
[17:47:05.343] - Load 378880/441016 {"progress":85}
[17:47:05.360] - Load 380928/441016 {"progress":86}
[17:47:05.377] - Load 382976/441016 {"progress":86}
[17:47:05.394] - Load 385024/441016 {"progress":87}
[17:47:05.412] - Load 387072/441016 {"progress":87}
[17:47:05.429] - Load 389120/441016 {"progress":88}
[17:47:05.447] - Load 391168/441016 {"progress":88}
[17:47:05.462] - Load 393216/441016 {"progress":89}
[17:47:05.479] - Load 395264/441016 {"progress":89}
[17:47:05.496] - Load 397312/441016 {"progress":90}
[17:47:05.512] - Load 399360/441016 {"progress":90}
[17:47:05.532] - Load 401408/441016 {"progress":91}
[17:47:05.556] - Load 403456/441016 {"progress":91}
[17:47:05.581] - Load 405504/441016 {"progress":91}
[17:47:05.597] - Load 407552/441016 {"progress":92}
[17:47:05.620] - Load 409600/441016 {"progress":92}
[17:47:05.637] - Load 411648/441016 {"progress":93}
[17:47:05.662] - Load 413696/441016 {"progress":93}
[17:47:05.686] - Load 415744/441016 {"progress":94}
[17:47:05.703] - Load 417792/441016 {"progress":94}
[17:47:05.720] - Load 419840/441016 {"progress":95}
[17:47:05.743] - Load 421888/441016 {"progress":95}
[17:47:05.760] - Load 423936/441016 {"progress":96}
[17:47:05.777] - Load 425984/441016 {"progress":96}
[17:47:05.801] - Load 428032/441016 {"progress":97}
[17:47:05.819] - Load 430080/441016 {"progress":97}
[17:47:05.837] - Load 432128/441016 {"progress":97}
[17:47:05.854] - Load 434176/441016 {"progress":98}
[17:47:05.877] - Load 436224/441016 {"progress":98}
[17:47:05.894] - Load 438272/441016 {"progress":99}
[17:47:05.918] - Load 440320/441016 {"progress":99}
[17:47:07.230] - Load 441016/441016 {"progress":100}
[17:47:07.231] - Load 441016/441016 {"progress":100}
[17:47:07.231] - Write check
[17:47:07.271] - Flash load time cost(ms): 6034.134521484375
[17:47:07.274] - Finished
[17:47:07.296] - Sha caled by host: 4d0927172cb417c9a8c3dba45fd7a2ca5f38ebe10586f37e99517d832bc90e7d
[17:47:07.298] - xip mode Verify
[17:47:07.869] - Read Sha256/2097152
[17:47:07.870] - Flash xip readsha time cost(ms): 569.56005859375
[17:47:07.870] - Finished
[17:47:07.872] - Sha caled by dev: 4d0927172cb417c9a8c3dba45fd7a2ca5f38ebe10586f37e99517d832bc90e7d
[17:47:07.872] - Verify success
[17:47:07.874] - Program Finished
[17:47:07.874] - All time cost(ms): 16204.5615234375
[17:47:07.977] - close interface
[17:47:07.978] - [All Success]

I don't have another BL602 dev board currently and I don't know if I can recover my one and if the issue with your flash is related to my board having broken mac efuse or to something else. BUt judging from OpenBL602 behaviour, I would at least expect log output to work and AP to show up.

ataa commented 1 year ago

I have 10s of the same board at the moment and no access to other BL602 boards, If I flash OpenBK and then reflash the factory bin file using the above method, after removing boot pin connection and power cycle, factory firmware works fine, AP shows up and I get model number on the terminal.

So I am not sure if there's security feature in place to prevent you from using it on your board or not. even in that case we should at least get some error messages