Error when flashing the new firmware
minimmi opened this issue · 72 comments
Hello,
I am currently trying to flash the latest router firmware:
but I always get the following error message:
What am I doing wrong? Can anyone help me?
I'm getting the same.. A bit of googling suggests it may be something to do with the method that was used to compile the hex..?
did you unzip the file?
Yes and followed the flashing guidelines. Haven't had an issue with previous firmwares.. just this one. Please see my linked closed issue for a full screenshot of the window
Yes and followed the flashing guidelines. Haven't had an issue with previous firmwares.. just this one
I can confirm that. With the previous firmware version everything works without problems. If I then try to flash the new in the same way, I get the error message.
Same error here as well using the TI software to update the Sonoff Zigbee 3.0 dongle. I flashed the previous firmware to see if something was wrong with my device and it worked perfectly.
Same here
Same here for a Sonoff CC2652P
Initiate access to target: COM6 using 2-pin cJTAG.
Reading file: C:/ATemp/ZIGBEE Firmware/Coordinator/CC1352P2_CC2652P_launchpad_coordinator_20221102.hex.
Unknown record type: 3.
Reset target ...
Reset of target successful.
Initiate access to target: COM6 using 2-pin cJTAG.
Reading file: C:/ATemp/ZIGBEE Firmware/Coordinator/CC1352P2_CC2652P_launchpad_coordinator_20221102.hex.
Unknown record type: 3.
Reset target ...
Reset of target successful.
Initiate access to target: COM6 using 2-pin cJTAG.
No response from device. Device may not be in bootloader mode. Reset device and try again.
If problem persists, check connection and baud rate.
Connecting over serial bootloader failed: No response from device. Device may not be in bootloader mode. Reset device and try again.
If problem persists, check connection and baud rate.
Failed to create device object.
used now the stable one which works without an issue , using Texas Instruments flasher
Just to add - this the same error when trying the router firmware
Same here, unable to flash as per what others are saying above.
Follow these instructions
Seems that the issue is specific to Uniflash 8.1.0, Uniflash 8.0.0 works fine for me.
Downloaded UniFlash here:
https://www.ti.com/tool/download/UNIFLASH/8.0.0
I tried to flash the firmware with Uniflash, but I can't get it to work because my dongle is not recognized:
TI Flash Programmer 2 is what I have been using (and others posting) that doesn’t work with the new firmware. I hadn’t seen Uniflash mentioned for flashing the Sonoff dongle.
Update:
Have now tried to flash the firmware with the help of the python script as described in this video:
https://youtu.be/iCE5Z43EKpk?t=1254
It looked like everything worked out:
but after i reconnected the stick, zigbee2mqtt still shows me the old firmware:
I'm getting the same error that others have reported.
Initiate access to target: COM3 using 2-pin cJTAG.
Reading file: Z:/Projects/Zigbee_Flash/CC1352P2_CC2652P_launchpad_router_20221102/CC1352P2_CC2652P_launchpad_router_20221102.hex.
Unknown record type: 3.
Reset target ...
I can still flash the older FW but not this new one.
TI responded that this is a known issue of Uniflash 8.1.0, so nothing we can do from the z2m side. Use Uniflash 8.0.0 or cc2538-bsl or zigstar flasher instead.
TI responded that this is a known issue of Uniflash 8.1.0, so nothing we can do from the z2m side. Use Uniflash 8.0.0 or cc2538-bsl or zigstar flasher instead.
As you can see in my last comment, I did the flashing with cc2538-bsl. In zigbee2mqtt I still see the old firmware.
@minimmi Try it again, I succesfully flashed coordinator via cc2538-bsl and it works.
Downgrading to Uniflash 8.0.0 worked for me. Thanks!
Also please try ZigStar Multitool (https://zig-star.com/radio-docs/zigstar-multi-tool/) developed for zigstar works with any CC2652p adapter.
I used now successfully the ZigStar Multitool. Is a bit tricky for writing the firmware.
First it detects the COM Port, when starting writing you need to push the Boot button again multiple times and click on start in parallel. Suddenly it will start writing - is a bit confusing this behaviour but it worked.
cc2538-bsl woked for me, used a windows machine, command such as:
python cc2538-bsl.py -ewv -p /dev/ttyUSB0 --bootloader-sonoff-usb .\PATH_TO_FIRMWARE.hex
I used now successfully the ZigStar Multitool. Is a bit tricky for writing the firmware. First it detects the COM Port, when starting writing you need to push the Boot button again multiple times and click on start in parallel. Suddenly it will start writing - is a bit confusing this behaviour but it worked.
Thanks for that. I was able to get mine working as well with some fiddling around.
I just don't know what I'm doing wrong or what it could be?! I have now flashed it again successfully with both cc2538-bsl.py and ZigStar. But every time the old firmware is displayed afterwards in zigbee2mqtt:
And you are using the dev version? I never checked afterwards...
Yes, I use this version:
I am interested in the possibility of adjusting the transmitting power, but I still do not have this option.
But every time the old firmware is displayed
For Router firmware?
I had the same problem. It's more a z2m issue than a flashing issue.
@Koenkk recommended doing a force remove, restart, then re-pair. Worked for me.
But every time the old firmware is displayed
For Router firmware?
I had the same problem. It's more a z2m issue than a flashing issue.
@Koenkk recommended doing a force remove, restart, then re-pair. Worked for me.
Thanks for this tip. After force remove, restart and re-pair it shows now the correct firmware.
I can confirm under these circumstances that flashing with Zigstar as well as with cc2538-bsl.py works.
But I still have no way to set the transmit power:
@minimmi If you update to the latest development code of z2m, the option for changing the transmit power will be there:
However I don't recomment you to update to the latest dev yet, as there is a bug preventing pairing of new devices:
Koenkk/zigbee2mqtt#14925 (comment)
I've patched the code as a workaround for the time being in order to be able to test the new router firmware and setting transmit_power indeed works as intended.
@minimmi If you update to the latest development code of z2m, the option for changing the transmit power will be there:
However I don't recomment you to update to the latest dev yet, as there is a bug preventing pairing of new devices:
Koenkk/zigbee2mqtt#14925 (comment)
I've patched the code as a workaround for the time being in order to be able to test the new router firmware and setting transmit_power indeed works as intended.
Ah ok, I didn't know that I needed the dev version of z2m for this. Thanks for your answer. Then I'll wait until the dev version is tested and officially released.
I see in your screenshot that it says 5dBm max for CC2652. Is the max transmit power not 20 dBm for CC2652 ?
I see in your screenshot that it says 5dBm max for CC2652. Is the max transmit power not 20 dBm for CC2652 ?
Just now I noticed your follow-up question about the max power. I think the help text is indeed a bit misleading. My adapter is a home-made "Egony V4" stick (the module uses internally a CC2652P chip) and changing the power slider to values above 5 dBm is definitely reflected in the LQI value. As far as I'm aware, the P versions of the CC1352 / CC2652 chips can go up to 20 dBm, so the wording of the helptext might be changed to something like:
"Transmit power, supported from firmware 20221102. The max for CC1352P/CC2562P is 20 dBm and 5 dBm for CC1352/CC2652 (any higher value is converted to 5dBm)"
But every time the old firmware is displayed
For Router firmware?
I had the same problem. It's more a z2m issue than a flashing issue.
@Koenkk recommended doing a force remove, restart, then re-pair. Worked for me.Thanks for this tip. After force remove, restart and re-pair it shows now the correct firmware.
I can confirm under these circumstances that flashing with Zigstar as well as with cc2538-bsl.py works.
But I still have no way to set the transmit power:
I flashed an already paired sonoff ZBDongle-P with CC1352P2_CC2652P_other_router_20221102.zip router firmware using the cc2538-bsl script. All went smoothly and the firmware was flashed without issues.
As it is already reported the device shows up that is has the previous firmware.
I am using the latest release of zigbee2mqtt (1.28.2) not from the dev channel that it has the pairing issue. I forced removed the device but afterwards the device was recognized as unknown device.
@Koenkk
Is something that I should expect ?
@nkrepo Shouldn't you be using CC1352P2_CC2652P_launchpad_router_20220125.zip with ZBDongle-P (instead of CC1352P2_CC2652P_other_router_20221102.zip) ?
I'm also using a ZBDongle-P and flashed it with the launchpad_router firmware variant, as seen in the last row of the table here:
https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/README.md
Slight update here. UniFlash 8.1.1 works fine. I read that some used the SmartRF Flash Programmer 2 as I did, too.
Nope. Still v1.8.3 and still unuseable...
Short update from my side:
- cc2538-bsl.py works
- ZigStar works
- TI Flash Programmer v2 does not work
- Uniflash 8.1.X does not work
- Uniflash 8.0.0 works partially ( not for me, because stick is not recognized. For others it seems to work)
Should this stay open until it works with all methods or can it be closed, what do you say?
had also the same issue with TI flash programmer 2 ver. 1.8.2 and was sucessful with cc2538-bsl.py ;)
Is there some that have flash a sonoff plus dongle flashed with the new firmware?
What software is working the best.
And simple?
Noob here.
Thanks guys
@Dylantje I find the cc2538-bsl.py
script working flawless, every time. It's simple to use it too. You just need to have Python installed first, then invoke the script like this:
python cc2538-bsl.py -e -w -v -p PORT firmware.hex
where PORT
is the serial port where your ZigBee device has been attached.
In Linux that might be /dev/ttyUSB0
, in Windows - COM4
etc.
@znanev
Thanks
Only never worked with python. Running on a windows pc..
Will try it, only can i brick the stick?
Prefere a windows option for me.
Perhaps a good working option
I haven't used it, but the zigstar tool is open source, cc2538-bsl based, and the releases include both Windows and Mac GUI builds.
nkrepo
Good to notice , I have indeed flashed with CC1352P2_CC2652P_launchpad_router_20221102 , it was just a text copy paste error.
I upgraded to latest zigbee2mqtt 1.28.4 and the now the sonoff p dongle flashed with 20221102 is paired without any issue.
Hi Guys. im trying to flash my CC2652R zzh coordinator with the new 20221102 firmware but on Uniflash it doesnt auto detect my coordinator and from their list i cant see a CC2652R. I do see a CC2652R1F and a 1F(Bootloader) any advice which one to choose?
@znanev Thanks Only never worked with python. Running on a windows pc.. Will try it, only can i brick the stick?
Prefere a windows option for me. Perhaps a good working option
Follow the instructions in this video:
https://youtu.be/iCE5Z43EKpk?t=1254
With this I managed to do it without any problem.
Same as yours: problems with TI flash programmer but it works with python script (I mean Sonoff 3.0 and router firmware) and now ZHA (🤫) has power transmitter slider too. Thanks @Koenkk
I used a Hex2bin converter on the .hex file which converted it to a .bin file and was able to flash that using the TI Flash Programmer.
I also tryed to convert to BIN, with Hex2bin, and now it works with TI Flash :-)
I'll close this thread since it is an issue of the TI tooling and not this firmware.
Following procedure worked for me on Sonoff ZIgbee 3.0 USB Dongle Plus (ZBDongle-P):
-
Converting CC1352P2_CC2652P_launchpad_router_20221102.hex to binary format using https://srecord.sourceforge.net/:
srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary -
Programming CC1352P2_CC2652P_launchpad_router_20221102.bin file using TI SmartRF Flash Programmer 2 (ver. 1.8.2) (target: CC2652P)
Following procedure worked for me on Sonoff ZIgbee 3.0 USB Dongle Plus (ZBDongle-P):
- Converting CC1352P2_CC2652P_launchpad_router_20221102.hex to binary format using https://srecord.sourceforge.net/:
srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary- Programming CC1352P2_CC2652P_launchpad_router_20221102.bin file using TI SmartRF Flash Programmer 2 (ver. 1.8.2) (target: CC2652P)
Worked for me.
Following procedure worked for me on Sonoff ZIgbee 3.0 USB Dongle Plus (ZBDongle-P):
- Converting CC1352P2_CC2652P_launchpad_router_20221102.hex to binary format using https://srecord.sourceforge.net/:
srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary- Programming CC1352P2_CC2652P_launchpad_router_20221102.bin file using TI SmartRF Flash Programmer 2 (ver. 1.8.2) (target: CC2652P)
Worked for me.
How to use srecord? I have no idea! Have download it but there is noch app to open and use for converting it.
Download srecord from sourceforge, unzip and execute srec_cat from bin folder as per the the command line example above.
This is what i did:
- Install ‘SRecord’
- Open power shell with administrator tight
- Guide to the ‘SRecord’ install folder ‘C:\Program Files\srecord\bin’
- Copy the firmware (CC1352P2_CC2652P_launchpad_router_20221102.hex) to above folder
- Run this command to start converting the files
.\srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary
A Big Thanks to You!!!
This is what i did:
- Install ‘SRecord’
- Open power shell with administrator tight
- Guide to the ‘SRecord’ install folder ‘C:\Program Files\srecord\bin’
- Copy the firmware (CC1352P2_CC2652P_launchpad_router_20221102.hex) to above folder
- Run this command to start converting the files
.\srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary
This is what i did:
- Install ‘SRecord’
- Open power shell with administrator tight
- Guide to the ‘SRecord’ install folder ‘C:\Program Files\srecord\bin’
- Copy the firmware (CC1352P2_CC2652P_launchpad_router_20221102.hex) to above folder
- Run this command to start converting the files
.\srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary
It worked! Thanks!
If anyone is crazy enough, here is the firmware bin file so you can flash with Flash Programmer 2:
(I AM NOT RESPONSIBLE FOR THIS FILE, USE AT YOUR OWN RISK)
5. .\srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary
Worked like a charm thanks for the heads up :)
This is what i did:
- Install ‘SRecord’
- Open power shell with administrator tight
- Guide to the ‘SRecord’ install folder ‘C:\Program Files\srecord\bin’
- Copy the firmware (CC1352P2_CC2652P_launchpad_router_20221102.hex) to above folder
- Run this command to start converting the files
.\srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary
CCS already has all the necessary utilities for making a bin file. You can add this line in project settings Project>Properties>Build>Steps>Post-build steps
"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/tiarmofd" "${CG_TOOL_ROOT}/bin/tiarmhex" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"
Just to share my experience:
- SmartRF utility works fine, although it appears necessary to convert to bin format. I used 'hex2bin'
- The Sonoff stick drops out of boot mode very quickly - within 20 seconds. So you need to keep plugging it back in whilst holding down boot button for 5 seconds or so. This must be repeated for every attempt
I started by trying to use UniFlash but got confused looking for the right chip to choose for sonoff zigbee dongle plus...
so I did the .hex -> .bin using srecord and everething was OK!
I was able to avoid installing Python.
There's a workaround with ZigStarGW on Windows.
- Plug the dongle and hold the button 20 seconds
- Try to flash and get "timeout" message
- Unplug and plug the dongle immediately
- Try to flash again and it'll work
Texas Instrument is crappy.
I was able to avoid installing Python.
There's a workaround with ZigStarGW on Windows.
- Plug the dongle and hold the button 20 seconds
- Try to flash and get "timeout" message
- Unplug and plug the dongle immediately
- Try to flash again and it'll work
Texas Instrument is crappy.
wow, this solution really worked
thank you very much....
MUITO OBRIGADO.....
I was able to avoid installing Python.
There's a workaround with ZigStarGW on Windows.
- Plug the dongle and hold the button 20 seconds
- Try to flash and get "timeout" message
- Unplug and plug the dongle immediately
- Try to flash again and it'll work
Texas Instrument is crappy.
wow, this solution really worked thank you very much....
MUITO OBRIGADO.....
I can't believe it. This was the only solution that worked. I tried flashing my brand new CC2652P with Flash Programmer 2, the Python way (both using Windows and Linux), and this way was the only method that actually worked. You MUST unplug and replug immediately after seeing the Timeout
error message at the bottom of the application and you must have held the Boot
button down for 20 seconds
Big thanks @gravelfreeman and @gamajunior
It's a complete non sense but hey, if we don't want our home to get spied on stupid companies cloud we gotta rely on the china scrap for automating our home. What a time to be alive! I wish that Zigbee or any other tech to become a standard so we stop doing stuff like this.
@gravelfreeman Zigbee is standardized (see the spec here) but unfortunately a lot of devices don't conform very well or use undocumented custom messages over the protocol. That has little to do with programming firmware on specific coordinator hardware however.
If you want devices that conform more solidly to a spec and "just work" I think you probably want z-wave. It's a lot more tightly controlled (at least until very recently) and works on a much less congested lower frequency so there are less problems with interference. Z-wave devices are significantly more expensive however, and there are less of them available.
This is what i did:
1. Install ‘SRecord’ 2. Open power shell with administrator tight 3. Guide to the ‘SRecord’ install folder ‘C:\Program Files\srecord\bin’ 4. Copy the firmware (CC1352P2_CC2652P_launchpad_router_20221102.hex) to above folder 5. Run this command to start converting the files .\srec_cat.exe "CC1352P2_CC2652P_launchpad_router_20221102.hex" -intel -o CC1352P2_CC2652P_launchpad_router_20221102.bin -binary
Thanks! Worked for me for updating from version 20210708 to 20230507. Version read out is updated accordingly on the following page: Zigbee2MQTT - Settings - About: Coordinator revision
if you're having trouble converting from hexadecimal to bin.
Anyone coming here in 2024 for the latest version, then here is the powershell command for bin file conversion. And it worked perfectly.
.\srec_cat.exe "CC1352P2_CC2652P_launchpad_coordinator_20240710.hex" -intel -o CC1352P2_CC2652P_launchpad_coordinator_20240710.bin -binary
Anyone coming here in 2024 for the latest version, then here is the powershell command for bin file conversion. And it worked perfectly.
.\srec_cat.exe "CC1352P2_CC2652P_launchpad_coordinator_20240710.hex" -intel -o CC1352P2_CC2652P_launchpad_coordinator_20240710.bin -binary
can you give extra guide please
Read a few posts up: #397 (comment)
Follow the instructions in the next two or three posts (and adjust the command for the correct firmware name) and you'll be fine. I just did it myself.