Git Product home page Git Product logo

Comments (15)

Hedda avatar Hedda commented on June 3, 2024 4

FYI, after updating several times and helping others with different setups I have broken down my tested steps to flash firmware mentioned from #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.

  1. Install Silabs CP210x device drivers (CP2102N USB-to-UART bridge / USB-to-Serial converter chip) needed for Windows OS and Mac OS, (this also required a reboot of my operating-system).
  2. Install Python (in my case I installed and tested with Python for Windows 3.10.1).
  3. Launch command-prompt (cmd.exe) as elevated Administrator. Upgrade pip with python -m pip install --upgrade pip, (if pip is not available then first run python -m ensurepip --upgrade), then pre-install dependencies fro cc2538-bsl from PyPi via pip command: pip install wheel pyserial intelhex python-magic
  4. Optional but recommended: Download and install zigpy-znp via pip/PyPI with 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 like python -m zigpy_znp.tools.nvram_read COM5 -o nvram_backup.json and optionally also backup Zigbee network via python -m zigpy_znp.tools.network_backup COM5 -o network_backup.json.
  5. Download cc2538-bsl on GiHub from its "master" branch, (and not via pip/PyPI), unpact the zip to a folder then launch command-promt (cmd.exe) as elevated Administrator and run its setup.py to install its dependencies (should include "setuptools", "wheel", "pyserial", "intelhex", and "python-magic" packages).
  6. Get latest firmware (I tested latest "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)"!
  7. Stop any applications or services that might be connected to the Zigbee adapter via serial port (ex. Home Assistant's ZHA integration, Zigbee2MQTT, ioBroker, Jeedom, etc.). In my case, I ran the update on another computer so nothing to stop there.
  8. Run command to flash from command-promt (cmd.exe) launched as elevated Administrator, example with firmware release available at this time: 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 with sudo, and read that many on Linux successfully run sudo 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.

from cc2538-bsl.

Hedda avatar Hedda commented on June 3, 2024 2

@Rowleys Check out PR #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.

its probably the bootloader, still need to figure out how to enable that option :)

but slae.sh website mentioned "

You dont have to put the CC2652RB manually into the bootloader mode
Its done by the tool automatically!
So no need to reopen the enclosure for flashing..

in their how to so that's probably the reason why people aren't doing it :)

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 #114 which has not yet been merged.

from cc2538-bsl.

juan11perez avatar juan11perez commented on June 3, 2024 2

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

from cc2538-bsl.

Rowleys avatar Rowleys commented on June 3, 2024 1

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

from cc2538-bsl.

Hedda avatar Hedda commented on June 3, 2024 1

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

from cc2538-bsl.

Hedda avatar Hedda commented on June 3, 2024 1

mine is EFR32MG21.

how do i bootloader and flash it?

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

from cc2538-bsl.

omerk avatar omerk commented on June 3, 2024

Your radio device is not in BSL mode (i.e: bootloader not running), follow the instructions for your particular radio device and try again.

Alternatively: If you have multiple USB devices plugged in, you might be using the wrong serial port. Make sure your radio device is indeed enumerating as /dev/ttyUSB0 or (temporarily) unplug other USB devices and try again.

from cc2538-bsl.

jeroenvdd avatar jeroenvdd commented on June 3, 2024

its probably the bootloader, still need to figure out how to enable that option :)

but slae.sh website mentioned "

You dont have to put the CC2652RB manually into the bootloader mode
Its done by the tool automatically!
So no need to reopen the enclosure for flashing..

in their how to so that's probably the reason why people aren't doing it :)

from cc2538-bsl.

Mosher23 avatar Mosher23 commented on June 3, 2024

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

hello i am having same issue
but when i add --bootloader-sonoff-usb i get option bootloader-sonoff-usb is not recognized

what am i doing wrong?

from cc2538-bsl.

Hedda avatar Hedda commented on June 3, 2024

@Rowleys Sorry are you saying that you specifically do have an ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter and that you now managed to sucessfully flash it using ITead_Sonoff_Zigbee-delay branch from PR #114 or? If so please post result in -> #114

@Mosher23 Do you also specifically have the ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter or which exact other adapter do you have? If you specifically have ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter then download correct branch of cc2538-bsl:

  1. Download the correct "ITead_Sonoff_Zigbee-delay" branch from #114? Get -> https://github.com/JelmerT/cc2538-bsl/tree/feature/ITead_Sonoff_Zigbee-delay (because note the patch is not yet in the default "master" branch of cc2538-bsl):

  2. Be sure to also download correct firmware image named "CC1352P2_CC2652P_launchpad_*.zip" (and not the other one) from:

Note! For more details on that patch for ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter see -> #113

PS: If you do have an ITead SONOFF Zigbee 3.0 USB Dongle Plus adapter then please also do post your own results to -> #114

from cc2538-bsl.

JelmerT avatar JelmerT commented on June 3, 2024

Thanks @Hedda for the detailed steps!

Closing this since it seems the original issue is fixed

from cc2538-bsl.

mteusb avatar mteusb commented on June 3, 2024

I'm still having this problem.

I've done everything and I can't solve it.

from cc2538-bsl.

mteusb avatar mteusb commented on June 3, 2024

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

mine is EFR32MG21.

how do i bootloader and flash it?

from cc2538-bsl.

tothgergely92 avatar tothgergely92 commented on June 3, 2024

I'm still having this problem.

I've done everything and I can't solve it.

As @Hedda wrote earlier: "Note! Also always need to first stop any application/service/integration connected to the adapter before use cc2538-bsl command." -> for me, that was the problem, after stopped zigbee2mqtt and other services related to it, the flashing was successful immediately without any error message.

from cc2538-bsl.

smpillai11 avatar smpillai11 commented on June 3, 2024

I had the same issue (looks like the device was not entering bootloader mode) and the following fixed the problem. I got the device from aliexpress
On windows PC

  1. download cc2538-bsl.py and CC1352P2_CC2652P_launchpad_coordinator_20230507.hex (ensure file is unzipped)
  2. go to command prompt and ensure python is installed by running command python. Then navigate to the folder with the above downloaded files
  3. run command pip install wheel pyserial intelhex python-magic
  4. Connect device to USB port and enter bootload mode by - press and hold RESET button, press and hold Key1 and then release RESET, then release Key1
  5. run command python cc2538-bsl.py -p COM6 -evw --bootloader-sonoff-usb .\CC1352P2_CC2652P_launchpad_coordinator_20230507.hex

In the above command replace COM port (use device manager in PC to find COM port where the device is connected) and hex file name if required

from cc2538-bsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.