cc2538-bsl: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
Hi, Im trying to do the python flash with the SSH, I’m doing it on the Home Assistant OS SSH,
Im getting this error …
/zigbee python3 cc2538-bsl.py -p /dev/ttyUSB0 -evw CC1352P2_CC2652P_launchpad_coordinator_20211217.hex
Opening port /dev/ttyUSB0, baud 500000
Reading data from CC1352P2_CC2652P_launchpad_coordinator_20211217.hex
Your firmware looks like an Intel Hex file
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)
Thanks
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
FYI, after updating several times and helping others with different setups I have broken down my tested steps to flash firmware mentioned from https://github.com/JelmerT/cc2538-bsl/pull/114 into this basic guide for flashing ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter.
This guide uses the cc2538-bsl tool from JelmerT’s latest “master” branch on GitHub and could easily be made to work on all operating systems. I tested on Windows OS but others have done this on Linux and Mac OS by using different Serial/COM-port addressing as the steps should otherwise be the same.
python -m pip install --upgrade pip
, (if pip is not available then first runpython -m ensurepip --upgrade
), then pre-install dependencies fro cc2538-bsl from PyPi via pip command:pip install wheel pyserial intelhex python-magic
pip install zigpy-znp
then perform NVRAM backup by following instructions in TOOLS.md (also find more details ZNP radio backup procedure at https://github.com/zigpy/zigpy/wiki/Coordinator-Backup-and-Migration) for Windows backup command should be something likepython -m zigpy_znp.tools.nvram_read COM5 -o nvram_backup.json
and optionally also backup Zigbee network viapython -m zigpy_znp.tools.network_backup COM5 -o network_backup.json
.setup.py
to install its dependencies (should include “setuptools”, “wheel”, “pyserial”, “intelhex”, and “python-magic” packages).CC1352P2_CC2652P_launchpad_*.zip
” image available from its “master” branch at this time. Alternatively, you could get the latest “beta” version from the develop branch). Regardless make sure to get the correct image file as should be the one for “launchpad” (and not for “other)”!python cc2538-bsl.py -p COM5 -e -v -w --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20211217.hex
Obviously need to replace number in COM5 with the port # actually shown used under ports in Device Manager on Windows.
Also, if using Linux or Mac OS instead of Microsoft Windows then the
COM#
serial device path after-p
will be different when set the port to use, (like for example/dev/ttyUSB0
or/dev/ttyUSB1
) and might need different Silabs CP210x device drivers (CP2102N USB-to-UART bridge / USB-to-Serial converter chip) for your operating system, on Linux might have to run Python withsudo
, and read that many on Linux successfully runsudo python cc2538-bsl.py -e -v -w --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20211217.hex
without setting serial device path with-p
for port to use.@Hedda I had the same issue as @Rowleys. After adding --bootloader-sonoff-usb to the command, flashing completed successfully. I’ve added the feedback to 114 per your request.
@Rowleys Check out PR https://github.com/JelmerT/cc2538-bsl/pull/114 (and ITead_Sonoff_Zigbee-delay branch) if have ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter:
You will as well need to add new option
--bootloader-sonoff-usb
when have ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter.Note! Also always need to first stop any application/service/integration connected to the adapter before use cc2538-bsl command.
Auto-BSL can automatically put the adapter into BTL mode via an initialization sequence if hardware and bootloader support it:
https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/README.md
Ex. Slaesh’s CC2652RB stick and Electrolama’s upcoming zzhp do/will support Auto-BSL, but Electrolama’s zzh does not, see:
https://electrolama.com/radio-docs/flash-cc-bsl/
ITead’s Sonoff CC2652P dongle also support Auto-BSL however it first needs patch from https://github.com/JelmerT/cc2538-bsl/pull/114 which has not yet been merged.
That is off-topic here since EFR32 is from Silicon Labs and not from Texas Instruments like CC253x/CC26x2/CC13x2, but please note that I have collected links and information in the ZBDongle-E (EFR32MG21 variant) discussion here -> https://community.home-assistant.io/t/itead-s-sonoff-zigbee-3-0-usb-dongle-plus-v2-model-zbdongle-e-based-on-silicon-labs-efr32mg21-20dbm-radio-mcu-now-sold-for-19-99/442695
Be sure now that you have bought a CC2652P-based “ZBDongle-P” adapter and not an EFR32MG21-based “ZBDongle-E” adapter.
FYI, ITead just released a Silicon Labs EFR32MG21 “ZBDongle-E” adapter, which unfortunately is also marked as “Sonoff Zigbee 3.0 USB Dongle Plus V2” and looks the same as the CC2652P based “Sonoff Zigbee 3.0 USB Dongle Plus”. This new “ZBDongle-E” adapter is really a different product as it is an improved version of their old ITead’s previous barebone Silabs EFR32MG21 adapter 13 and it is to be side-by-side as an alternative to ITead’s TI CC2652P based “Sonoff Zigbee 3.0 USB Dongle Plus” (which has now renamed to “ZBDongle-P”).
https://community.home-assistant.io/t/itead-s-sonoff-zigbee-3-0-usb-dongle-plus-model-zbdongle-e-based-on-silicon-labs-efr32mg21-20dbm-radio-mcu-now-sold-for-19-99/442695
vesus
https://community.home-assistant.io/t/iteads-sonoff-zigbee-3-0-usb-dongle-plus-based-on-texas-instruments-cc2652p-20dbm-radio-mcu-now-sold-for-14-99/340705
I did yet it working. I had to add --bootloader-sonoff-usb to the command line
when I added this it flashed perfect
sudo python3 cc2538-bsl.py -ewv -p /dev/ttyUSB0 --bootloader-sonoff-usb …/CC1352P2_CC2652P_launchpad_coordinator_20211217.hex