Koenkk / Z-Stack-firmware

Compilation instructions and hex files for Z-Stack firmwares
MIT License
2.33k stars 643 forks source link

Error when flashing the new firmware #397

Closed minimmi closed 1 year ago

minimmi commented 1 year ago

Hello,

I am currently trying to flash the latest router firmware:

https://github.com/Koenkk/Z-Stack-firmware/blob/develop/router/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_router_20221102.zip

but I always get the following error message:

image

What am I doing wrong? Can anyone help me?

danieledwardgeorgehitchcock commented 1 year ago

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..?

tube0013 commented 1 year ago

did you unzip the file?

danieledwardgeorgehitchcock commented 1 year ago

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

minimmi commented 1 year ago

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.

kfraleigh commented 1 year ago

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.

Shamshala commented 1 year ago

Same here

boris1000 commented 1 year ago

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.

boris1000 commented 1 year ago

used now the stable one which works without an issue , using Texas Instruments flasher

boris1000 commented 1 year ago

Just to add - this the same error when trying the router firmware

jchurchward commented 1 year ago

Same here, unable to flash as per what others are saying above.

alexruffell commented 1 year ago

Follow these instructions

https://github.com/Koenkk/Z-Stack-firmware/issues/383#issuecomment-1301903658

Koenkk commented 1 year ago

Reported this to TI: https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1168418/simplelink-cc13x2-26x2-sdk-flashing-simlelink-6_30_00_84-hex-through-uniflash-fails

Koenkk commented 1 year ago

Seems that the issue is specific to Uniflash 8.1.0, Uniflash 8.0.0 works fine for me.

minimmi commented 1 year ago

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:

image

kfraleigh commented 1 year ago

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.

minimmi commented 1 year ago

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:

image

but after i reconnected the stick, zigbee2mqtt still shows me the old firmware:

image

mikecay commented 1 year ago

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.

Koenkk commented 1 year ago

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.

https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1168418/simplelink-cc13x2-26x2-sdk-flashing-simlelink-6_30_00_84-hex-through-uniflash-fails

minimmi commented 1 year ago

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.

https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1168418/simplelink-cc13x2-26x2-sdk-flashing-simlelink-6_30_00_84-hex-through-uniflash-fails

As you can see in my last comment, I did the flashing with cc2538-bsl. In zigbee2mqtt I still see the old firmware.

Shamshala commented 1 year ago

@minimmi Try it again, I succesfully flashed coordinator via cc2538-bsl and it works.

BastiaanNaber commented 1 year ago

Downgrading to Uniflash 8.0.0 worked for me. Thanks!

cpuks commented 1 year ago

Also please try ZigStar Multitool (https://zig-star.com/radio-docs/zigstar-multi-tool/) developed for zigstar works with any CC2652p adapter.

boris1000 commented 1 year ago

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.

evelant commented 1 year ago

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

epower53 commented 1 year ago

I was also successful with the python script, run from a Win11 machine to update my Sonoff Zigbee Dongle Plus:

py cc2538-bsl.py -e -w -v -p com3 --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20221102.hex

image

minimmi commented 1 year ago

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:

image

jchurchward commented 1 year ago

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.

boris1000 commented 1 year ago

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:

image

And you are using the dev version? I never checked afterwards...

minimmi commented 1 year ago

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: image

And you are using the dev version? I never checked afterwards...

Yes, I use this version:

https://github.com/Koenkk/Z-Stack-firmware/blob/develop/router/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_router_20221102.zip

I am interested in the possibility of adjusting the transmitting power, but I still do not have this option.

jerrm commented 1 year ago

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.

minimmi commented 1 year ago

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.

image

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:

image

znanev commented 1 year ago

@minimmi If you update to the latest development code of z2m, the option for changing the transmit power will be there:

image

However I don't recomment you to update to the latest dev yet, as there is a bug preventing pairing of new devices:

https://github.com/Koenkk/zigbee2mqtt/issues/14925#issuecomment-1311619501

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 _transmitpower indeed works as intended.

minimmi commented 1 year ago

@minimmi If you update to the latest development code of z2m, the option for changing the transmit power will be there:

image

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 _transmitpower 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 ?

znanev commented 1 year ago

@minimmi

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)"

nkrepo commented 1 year ago

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.

image

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:

image

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.

image

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 ?

znanev commented 1 year ago

@nkrepo Shouldn't you be using CC1352P2CC2652Plaunchpad_router_20220125.zip with ZBDongle-P (instead of CC1352P2CC2652Pother_router_20221102.zip) ?

I'm also using a ZBDongle-P and flashed it with the _launchpadrouter 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

dreimer1986 commented 1 year ago

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...

minimmi commented 1 year ago

Short update from my side:

Should this stay open until it works with all methods or can it be closed, what do you say?

toxic0berliner commented 1 year ago

had also the same issue with TI flash programmer 2 ver. 1.8.2 and was sucessful with cc2538-bsl.py ;)

Dylantje commented 1 year ago

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

znanev commented 1 year ago

@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.

Dylantje commented 1 year ago

@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

jerrm commented 1 year ago

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.

https://github.com/xyzroe/ZigStarGW-MT

nkrepo commented 1 year ago

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.

Venom84 commented 1 year ago

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?

minimmi commented 1 year ago

@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.

Nik71git commented 1 year ago

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

joe-sydney commented 1 year ago

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.

delinend commented 1 year ago

I also tryed to convert to BIN, with Hex2bin, and now it works with TI Flash :-)

Koenkk commented 1 year ago

I'll close this thread since it is an issue of the TI tooling and not this firmware.