-
-
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
Alt Firmware Flashing -> use CCLoader instead of CCLib #1057
Comments
Great, I think there is still a usecase for CCLib as CCLoader only seems to support windows. Could you make a pr to update the documentation? (https://github.com/Koenkk/zigbee2mqtt/blob/master/docs/information/alternative_flashing_methods.md#via-arduinoesp8266) |
Is ccloader working for a cc2531 or cc2530 stick? Using hex2bin with the hex files provided in the zip files causes an error. |
I have testet CCloader but it didnt work for me (although it should work according to the datasheet of cc254X and cc253X). What i did:
ccloader connected to the arduino but, didnt find the chip. Error message "no chip detected", which means that ccloader cant communicate to the chip via DD. Apart from that ccloader said that the bin is corrupt. Havent tried the files from here https://github.com/mtornblad/zstack-1.2.2a.44539/tree/master/CC2531 yet. Maybe it is a power problem. Eventually i am going to power the cc2531 via usb instead of 3,3. Could also be the problem mentioned here #78 (comment) Possible solution/to be tested:
|
I got mine to flash without issue with CC_Loader, and it was much faster about 2-3 minutes. I created PR 9 for this. |
PR is merged, thanks all. |
@Nomsplease : you flashed the SBL .bin version of the firmware with CCLoader from here? By the way, CCLoader has Linux/Mac version as well. This fork works for ESP8266. |
@AS137430 Yes that is the firmware in the updated documentation. I tested this with a Uno/Windows. If you can get it to work on Linux/Max and an ESP reliably please update that documentation with any other steps necessary. It never hurts to have more options. :) |
@Nomsplease: Thanks for your clarifications on the bin file used. I already flashed my first CC2531 with the first Arduino/ESP method. But I am waiting for delivery of the second CC2531 (which is taking a while..) and will definitely try the CCLoader method since it is much faster and report back if I am successful with the ESP8266 on Linux. |
i tried to flash my cc2531 with this new method (useing ESP8266, wemos D1 r2) and it seemed to work:
but after "flashing" the stick seems to be dead... the led does no longer flash and i do not get a device if i connect it to the pc/raspberrypi :( ...re-flashing with the "old" alternative flashing method did revive the cc2531 stick, now it is blinking again :) |
@Nomsplease : Did you have any similar issue? |
After playing around a bit, a few thoughts ... Using the bin file from zigbee2mqtt repository will not work. $ objcopy --gap-fill 0xFF --pad-to 0x040000 -I ihex CC2531ZNP-Prod.hex -O binary CC2531ZNP-Prod.bin $ ls -lt CC2531ZNP-Prod.* objcopy is part of binutils package. The resulting file can be passed to CCLoader for flashing: $ /opt/CCLoader/SourceCode/Linux$ ./a.out /dev/ttyACM0 /tmp/CC2531ZNP-Prod.bin 1 Baud:115200 data:8 parity:none stopbit:1 DTR:on RTS:off If CCLoader gets stuck at "Request sent already! Waiting for respond..." press CTRL-C and try changing the last parameter from 1 to 0 ... (also check your wiring) $ /opt/CCLoader/SourceCode/Linux$ ./a.out /dev/ttyACM0 /tmp/CC2531ZNP-Prod.bin 0 This will set DTR to "off" during initialization phase. Also - I adapted my CCLoader.inc and changed the pinout to have the pins in a row: int DD = 2; This makes wiring more easy. Hope this helps. |
@kianusch: Thanks for the detailed instructions especially the objcopy command. Is that an Arduino Pro Micro you are using? You are using GND and pins 2-4 from what I can make out for the picture. How is CC2531 powered? |
Yep - this is a Pro-Micro, I know, I soldered the pins on the wrong side :) And - yes: Arduino -- CC2531
CC2531 can be powered via VDD (PIN1) - I tried 3.3V and 5V - both worked - but I'm not sure, if all CC2531 sticks are 5V save. |
@kianusch : Thanks. Will you raise a PR to update the wiki https://www.zigbee2mqtt.io/information/alternative_flashing_methods.html? |
Sorry - I have no idea how to raise a PR. |
@kianusch : A Github Pull Request (PR). Similar to https://github.com/Koenkk/zigbee2mqtt.io/pull/9. |
For those with limited time available: I can confirm that the CCLoader route works in a flash (;-)). Spend a day on the CCLib route but couldn;t get to reliable uploading, although the communication through the chain worked as such. Rather than an Arduino, I used a Jeenode which works with 3.3v off the shelf. |
Trying to do this (nodemcu v3), but still
If pins changed to
I get another result:
Any ideas please? |
I haven't tried programming via ESP myself ... but you might have a problem with the pin numbering ... Maybe this helps: |
I can confirm that I needed to use @kianusch's |
FYI, also see #3694 for another alternative method of firmware flashing. |
I tried CCLib to flash firmware, but got too much problems and flashing time took many hours
I discovered that using CCLoader that works very fine and flash took a few minutes...
https://github.com/RedBearLab/CCLoader
I needed to use Z-Stack-Firmware .hex file, convert it using hex2bin then flash it using CCLoader_x86_64.exe
The text was updated successfully, but these errors were encountered: