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?

tszdr commented 1 year ago

Following procedure worked for me on Sonoff ZIgbee 3.0 USB Dongle Plus (ZBDongle-P):

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

  2. Programming CC1352P2_CC2652P_launchpad_router_20221102.bin file using TI SmartRF Flash Programmer 2 (ver. 1.8.2) (target: CC2652P)

smcallis77 commented 1 year ago

Following procedure worked for me on Sonoff ZIgbee 3.0 USB Dongle Plus (ZBDongle-P):

  1. 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
  2. Programming CC1352P2_CC2652P_launchpad_router_20221102.bin file using TI SmartRF Flash Programmer 2 (ver. 1.8.2) (target: CC2652P)

Worked for me.

alikking commented 1 year ago

Following procedure worked for me on Sonoff ZIgbee 3.0 USB Dongle Plus (ZBDongle-P):

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

tszdr commented 1 year ago

Download srecord from sourceforge, unzip and execute srec_cat from bin folder as per the the command line example above.

devilization commented 1 year ago

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

1

1

alikking commented 1 year ago

A Big Thanks to You!!!

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

1

1

mendoncart commented 1 year ago

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

It worked! Thanks!

image

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)

sphinxlady commented 1 year ago

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

mztimur commented 1 year ago

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

1

1

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"

As shown in the picture below ccsbuildprop

Wickedy123 commented 1 year ago

Just to share my experience:

- 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

dsduarte commented 1 year ago

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!

gravelfreeman commented 9 months ago

I was able to avoid installing Python.

There's a workaround with ZigStarGW on Windows.

Texas Instrument is crappy.

gamajunior commented 9 months ago

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

RickTorresJr commented 8 months ago

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

gravelfreeman commented 8 months ago

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.

evelant commented 8 months ago

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

stegemanGit commented 6 months ago

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

1

1

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

isaacbp commented 4 months ago

if you're having trouble converting from hexadecimal to bin.