-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unrecognized chip 0x540A8B75 #24
Comments
Hi, please read: For dumping the firmware and flashing new one, try using this version of bk7231tools: |
dump2 from other lamp |
Have you flashed anything to the device before dumping that firmware? It has odd data at 0x132000, which look like some firmware which shouldn't be there. |
both dump genue from new lamps |
I have another new lamp - I can still read from it |
e14-2.zip |
ESPHome config for these two devices: esphome:
name: my-device
platformio_options:
board_build.bkcrypt_coeffs: 7d1ff9b3e3ffefde5d93b57eefefeb8b
board_build.bkota.key: 908f771bac2ff1aa619b897c14c5a88b
board_build.bkota.iv: 1e647fab598d727c
board_flash.download: "0x132000+0xAE000" |
friend, maybe i ask stupid question
|
As I mentioned, you need to use the other branch of bk7231tools: First install ltchiptool using Python, with |
as i understand it not work at windows |
It does work on Windows. If you install Python 3.10 or newer it will work on Windows. |
ok thanks i try |
You didn't run the |
Now the firmware is written successfully without crc errors, but lamp not start - not connect to wi-fi |
You haven't added Wi-Fi AP to the config. Please do that and try again. |
Please post a screenshot of "get chip info" window. This version of bk7231tools should give more helpful information. |
When i return stok - lamp start |
Worked for me, used OTA image and flashed at 0x132000, now it boots. |
Yes |
Thx. at evening i try |
OpenBK7231N_App_1.0.0.zip |
Just disassembled another lamp, and this method didn't work. So i erased the flash (either erase fully and flash bootloader only and restore RF, or start flashing backup, and after it wrote sector 0x10000 remove power). Then just flash uf2. |
No. The encryption keys are stored in eFuse and are not changeable. |
I am not talking about keys, but about bootloader itself. AFAIK there are bootloaders, which will allow OTA without encryption, and then flash it while encrypting. Not sure about that it is how it works. What about flashing bootloader? I built OpenBK7231N sdk with correct keys, and tried flashing both bk7231n_bootloader_enc.bin and QIO app at 0x0. Neither booted. |
We don't have bootloader sources. All we have are binaries from either Beken SDKs or extracted from devices. The bootloader needs to know the eFuse encryption keys in order to run the OTA update. It is possible to modify an existing bootloader (say, 1.0.1) to change its encryption keys and enable unencrypted OTA, but it would require decompiling and modifying it, as well as packaging the bootloader binary to work with the device's keys. An easier option is to simply pass the existing keys to LibreTiny in the ESPHome YAML, which generates a firmware binary that can just be flashed to 0x11000. If that doesn't work, then either you're doing something wrong, or the encryption routines used in LibreTiny are somehow incorrect. It is believed that they could be wrong, because with a particular set of keys (a different SBER device) they were crashing, while working just fine on the device. If you want us to try and fix it, please:
|
Understood. I thought, reading build.sh and seeing bootloader encryption, that it is built from source. LibreTiny OTA works normally, i thought that replacing stock bootloader will allow OpenBeken OTA to function, without manually rebuilding it from source. |
I'm not familiar with the OpenBeken codebase. I don't know what solutions they use to deal with OTA and encryption. I also don't know what device you're using. If you have another SBER device, OTA packages are most likely encrypted with a non-default key. LibreTiny allows to change the encryption keys, OpenBeken doesn't, AFAIK. |
My device is the same as in the issue, SBER SBDV-00117 (LED C37 E14). Encryption keys are from your earlier reply
LibreTiny works OK with them, as does OpenBeken. But OpenBeken requires to be built manually, while replacing original tuya keys with sber ones, and OTA will work only with manually built binaries, not those, provided in github-actions. |
Yes, as I mentioned, OpenBeken uses default keys and not SBER keys, and doesn't allow changing it. If you want to use OpenBeken, you're going to need to manually build it, or reach out to the project author to allow that. Also note that the OTA key is not related to the encryption key (bkcrypt_coeffs). Your device might use the same OTA key but a different encryption key, in which case flashing UF2 will not work, but flashing manual OTA will. |
bkcrypt_coeffs is probably the same. I erased my device fully, then flashed only bootloader and RF, and then flashed UF2. It worked normally. |
it work!!!! THANKS |
Hello
![image](https://private-user-images.githubusercontent.com/77722476/313464105-c4735c16-df0d-4982-a269-bbd019675623.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExMDcyNTQsIm5iZiI6MTcyMTEwNj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XotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4NzMxNWUwZGU4YWZlZmQ4YmFmODI3MTVkNjZkMTg0ZWFiZjdlZDVkODIzZDQzMjYzODRmNjYwYTY5ZTRjYWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Las7Th567yP7v5zdP_Cpwt1YsK4e7knRdof-Qr4GMmI)
Sber lamp at CBLC9
The text was updated successfully, but these errors were encountered: