-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Reflash firmware without CCDebugger/Arduino #320
Comments
brilliant |
@kirovilya will this allow to flash sticks in a way that maybe allow a RPI to update firmware without removing stick? I was thinking of a process for example where an addon like we have for hassio would be able to check current stable firmware against the one on the stick and update accordingly if needed? |
@ciotlosm if we can programmatically switch to bootloader mode, then I think yes. |
Is there a download for the bin file available? |
@kirovilya What about this informations: ?? http://processors.wiki.ti.com/index.php/CC253x_Serial_Boot_Loader# |
@lubeda Not yet, but we can build them if you need to... @tb-killa Good link... I looked at example. It says that 0xF8 code in uart will go to serial bootloader... Then I looked at our ZNP-firmware and found code: BUT! Symbol MT_SYS_RESET_HARD = 0 Perhaps this is a mistake in the commentary :)) So, this function called with SYS_RESET_REQ command: Zigbee-Shepherd and cc-znp used this table https://github.com/zigbeer/cc-znp/wiki/6.-Z-Stack-MT-API-Reference-Tables#sys-commands Ok. If we send 0x0 type to resetReq - we going to serial bootloader mode... and what next? :)) I think it's not worthwhile to make the firmware through zigbee2mqtt - this should be done by separate tools that can use zigbee-shepherd to switch to serial bootloader mode. |
@kirovilya a download with a ready made .bin file would be very helpful for all without a cc-debugger. I planed to flash the cc2531 the arduino way until i found that it would take more than an hour... |
@lubeda as I said, this method is suitable only for repeated firmware (not the first). since the bootloader must be flashed first. |
@kirovilya yes the flashing should be complete alone. We could use some sort of api from App to zigbee shepherd for bring in reset. But this is feature :) |
@kirovilya We should check this too: http://processors.wiki.ti.com/index.php/Optimizing_Flash_and_RAM_Usage_of_Z-Stack_for_CC2530 |
Here is my compiled .bin file for the CC2531. I did a optimization before compiling. I resized the XDATA Stack from 0x4D0 to 0x300. After that we can define + allocate the space for the following no. of devices, neighbor NWK_MAX_DEVICE_LIST=40 BIN File (242 KB): CC2531ZNP-D40-N5.bin.zip |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is it possible to use SerialBootLoader to update a CC2531 that was previously flashed (and working) with the Arduino approach? In Windows 10 this always gives "COM Port Open Error". |
Hi, I purchased this module to try with zigbee2mqtt: I tried flashing it using a USB to serial adapter and this method, but I don't get a connection. Can anybody tell me how to flash this thing successfully either using this method or a cc debugger? |
Hi @Michel72 |
Thx, do you know the pinout for this connection? It’s not documented anywhere. |
Does anyone have a newer version of this? Maybe? :) |
No because @Koenkk 's files are perfect for every situation right now. Still waiting to get hands on a zig-a-zig-ah device |
Ok, I guess I was on the wrong track anyway. But maybe someone (@Chrischi- ?) can point me in the right direction. |
Any change you can make me a bin for router firmware? I cannot seem to make a proper bin with the methods on website. It is 256kb instead of 234 and obviously I cant choose to change CRC_SHADOW. |
We need a router edition though? I not sure what software was used to make the .bin file because the link is broken. |
I couldn't find a cross-platform version of SerialBootTool so I implemented it in $ pip install zigpy-znp
$ python -m zigpy_znp.tools.flash_read /dev/serial/by-id/radio -o flash.bin
$ python -m zigpy_znp.tools.flash_write /dev/serial/by-id/radio -i flash.bin Warning: I've used it and it worked for me but I can't guarantee that it will work for you. I don't suggest you try it unless you have a way to recover. |
Referencing to #31 because questions about router bin files came up here too. |
Can the router firmware be flashed by using this method (SBL) on a CC2531 USB dongle preloaded with CC2531ZNP-Prod firmware? |
Hi @Chrischi- Does that mean that I can follow this procedure with this firmware CC2531_DEFAULT_20201127.zip without any changes to the bin and hex? Tks 😄 Edit: |
Utilising the serial boot tool on CC2531 worked for me. Literally stop HA, plug into Windows 10 machine, run the tool, select the com port and then load image (Downloaded from here. https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_Home_1.2/bin/default)... bam done. |
Hi, does anyone happen to have SNIFFER FW for CC2531 in this (bin) format? Is it possible to flash sniffer SW using this method? |
ZNP firmware for cc253* has a built-in bootloader that can be used to updated firmware via USB / UART into the cc2531 stick or simply the cc2530 chip without using CCDebugger or Arduino.
But this requires not a conventional hex-firmware, but a special sbl-firmware (Serial Boot Loader).
For the normal firmware, the process of assembling it is described here https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2531
And for SBL firmware, everything is the same, but the assembly CC2531-ProdSBL (or CC2530) is selected. In this case, not a hex file (680Kb) is generated, but a bin-file (234Kb).
And with one exception - it is necessary to specify MAKE_CRC_SHDW instead of FAKE_CRC_SHDW defined symbols.
This firmware must be flashed through SerialBootTool. It comes with IAR, or you can download it separately here http://processors.wiki.ti.com/index.php/File:SerialBootTool_1_3_2.zip
When starting SerialBootTool, you must select Zigbee family. Then select the SBL firmware (bin-file). And then select port and specify the parameters of the port where cc253* is connected.
After that, you need to re-insert the cc2531 stick or disconnect and reconnect the board with the cc2530 chip and click Load Image. Only in first minute after the connection is available bootloader mode!
The firmware will be executed and the chip can be used again.
The text was updated successfully, but these errors were encountered: