-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SONOFF ZigBEE 3.0 USB Dongle Plus Router Firmware #316
Comments
Try holding the boot button down before inserting the dongle into the USB port, then releasing it after it's plugged in |
Maybe also try using llama-bsl and cc2538-bsl and give those projects feedback in how-to information is missing or lacking: https://github.com/electrolama/llama-bsl https://github.com/JelmerT/cc2538-bsl PS: If not using Zigbee2MQTT (which does automatic backups?) it is recommended to do backups before upgrading firmware: |
I keep the button pressed while plugging it into the USB port. The router firmware was flashed, but it is no longer possible to go back to the coordinator or to flash the router firmware again. I think that I shot the bootloader with the bottles of router firmware. |
I have these dongles and have flashed a few times (router firmware and my own router firmware) without problem. |
I wish we had firmware with hardware flow control active. |
I understand switching to hardware flow control mode on this ITead Sonoff Zigbee 3.0 USB Dongle Plus adapter is done via the dip-switch on the board, so not by using a different firmware (like more usual) or do you need new firmware built for it too? If so then just need to do so before enabling hardware flow control in the software application like Zigbee2MQTT or? https://www.zigbee2mqtt.io/information/configuration.html
Hardware flow control should in theory make for more stable serial communication since the flow control is off-loaded from the application and the system CPU to the MCU, but not sure if it will be more stable in the real world for Zigbee2MQTT. Regardless, note that Hardware Flow Control should only be of interest for a Zigbee Coordinator and not for a Zigbee Router. PS: Know I read that openHAB's Zigbee developer recommended hardware flow control for commercial use for added stability, however then we are talking about Zigbee Coordinators and Zigbee devices, not about dedicated stand-alone Zigbee routers. |
Maybe try flashing it on a different computer and/or another operating system? Note that first also need to stop Zigbee2MQTT. Worked fine flashing with cc2538-bsl.py running in Linux on bare metal. https://github.com/JelmerT/cc2538-bsl I tested it on Raspberry Pi OS (previously called Raspbian). https://www.raspberrypi.com/software/ Not tested flashing firmware with llama-bsl.py (fork of cc2538-bsl.py) but that should work as well: |
2. Enable hardware flow control and generate firmware (optional) section says "2.1 Import the ZNP project of CC1352P into CCS" Does everyone have access to the ZNP project of CC1352P used to build modded Koenkk Z-Stack 3.x.0 coordinator firmware? https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator @Koenkk Would you maybe be willing to compile and host optional firmware images with hardware flow control enabled? https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin BTW, I guess this is really off-topic for this specific discussion since you do not use hardware flow control for a router image.
@tteck Probably best if post a new issue to request hardware flow control https://github.com/Koenkk/Z-Stack-firmware/issues |
https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/COMPILE.md |
I tried the latest version (simplelink_cc13x2_26x2_sdk_5_20_00_52) with Koenkk's patches but was unable to complete inquiry when pairing.
|
I've tried the script again.
|
@tteck Probably best if post a new issue to request hardware flow control https://github.com/Koenkk/Z-Stack-firmware/issues FYI, posted a separate request for a firmware with hardware flow control actived -> #324 (if @tteck and others are interested). |
I was getting this exact error from within a docker container, but when I did it from the (linux) host it worked. Ultimately, I can't get any devices to show up while searching and the new firmware didn't change that. |
Note that it is not enough to simply press the BTL button, you actually need to hold the BTL button before plug-in the dongle and keep holding it when plug-in, only releasing the button aft a few seconds when it should have gotten powered up.
If use Docker then need to forward/map your device from host machine to Docker instance, preferably via docker-compose: https://www.zigbee2mqtt.io/guide/installation/02_docker.html#creating-the-initial-configuration https://www.zigbee2mqtt.io/guide/installation/02_docker.html#docker-compose Also see example: https://www.home-assistant.io/integrations/zha/#cant-connect-to-usb-device-and-using-docker |
Yeah I have it mapped. I can access it from HA->zha and zygpy-znp but that firmware update failed every time and after I updated firmware I still can't find any other devices. Thanks for the link I'll double check my syntax to pass it through. |
Then also make sure that you stop HA/ZHA app before upgrading as serial devices can only have one connection established. |
Even with zha deleted I was getting it. I ultimately gave up and went back to conbee2 and everything if stable. |
FYI, several Home Assistant community members have tested Sonoff provided uartLog.py script which seems to confirm "Auto BSL" is working(?), so maybe possible to enter bootloader without need to open enclosure to manually press BTL button: See uartlog.zig attached inside this docx which if unpacked contains uartLog.py https://sonoff.tech/wp-content/uploads/2021/09/Zigbee-3.0-USB-dongle-plus-firmware-flashing-1-1.docx cc2538-bsl.py also supports "Auto-BSL" https://github.com/JelmerT/cc2538-bsl See more information on what "Auto-BSL" does here: https://electrolama.com/radio-docs/bsl/#auto-bsl If can get that to work then can skip the BSL pushbutton press step to get the device into BSL mode in order for flashing it. |
It's still not working. Seems like flashing firmware locked bootloader completely, and device not working at all (super small power consumption). |
https://electrolama.com/radio-docs/advanced/flash-jtag/ "The cheapest option for an officially supported debugger is the CC-DEVPACK-DEBUG, available from most common electronics distributors" https://www.ti.com/tool/CC-DEVPACK-DEBUG Guess should be able to use most debuggers compatible with cJTAG (IEEE 1149.7 "Compact JTAG") via exposed TMS and TCK. |
I have by the way confirmed that running the attached uartLog.py script does indeed make ITead's Sonoff Zigbee 3.0 Plus adapter enter bootloader mode on Windows OS (Windows 11) and after that I could flash it directly with both Attached: uartLog.zip |
Is it possible to flash without c/jTag? With Raspberry only? |
Maybe check out this: https://gist.github.com/hwhw/fc43892785aa84913d03495c97b0f25a That is written for CC2538 but could be maybe be similar if it works without TDI and TDO. As what you needed is a cJTAG programming mode because CC2652 uses that by default. cJTAG mode only uses RESET, TCK and TMS pins, as CC2652 doesn't have TDI and TDO. You of course also need POWER (VCC) and GROUND. |
After router firmware update device is dead. |
Even if can no longer get into the bootloader you should still be able to unbrick the hardware if flash using cJTAG via TCK and TMS. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
The problem is the it doesn't go into bootloader mode.... I hold boot button when plugging it in. |
With this patch you should no longer need to press any buttons at all as it will enter BSL via software -> JelmerT/cc2538-bsl#114 (downlad "ITead_Sonoff_Zigbee-delay" branch -> https://github.com/JelmerT/cc2538-bsl/tree/feature/ITead_Sonoff_Zigbee-delay ) More information and discussion about automatically start of BSL mode on Itead Sonoff USB stick here -> JelmerT/cc2538-bsl#113 |
Hi xxsirosxx would you mind sharing a download link for the SmartRF Flash Programmer tool? From the TI website it is impossible to download it and I can't find it anywhere to download. |
Hi I would rather recommend ZigStar. https://github.com/xyzroe/ZigStarGW-MT |
FYI, ZigStar GW Multi tool doesn't yet support flashing USB adapters using Silabs CP2102N like ITead Sonoff USB Plus Dongle, see:
The official links should work now again as parts of their website were just temporarily down for maintenance: |
These are my steps in an raspberry-pi:
|
@davrodfer But will that work if first have accidentally flashed it with the wrong firmware image and messed up the bootloader?
So if you "bricked it" then you will need to "unbrick it" by flashing firmware via a c/JTAG debug probe instead of flashing it via USB. That is, if you do not have a working bootloader then think it will need to flash via the 2-pin cJTAG (a.k.a C-JTAG or c/JTAG) and not just common JTAG SWD as TI CC2652 debug do not use SWD and SWDCLK, etc. but instead only TMS and TCK (cJTAG is not SWD/SWDCLK). See details at → Flash Firmware using c/JTAG - Electrolama https://electrolama.com/radio-docs/advanced/flash-jtag/ Looking at pictures on ITead’s product page for the Sonoff CC2552P board you see that no SWD and SWDCLK pads are exposed, but it does expose TMS and TCK pads so those is what you need to use. So will probably need cJTAG debug probe (e.i. external debugger adapter) with TMS and TCK, and thus you will need to use a cJTAG compatible debugger probe adapter like Texas Instruments XDS110 or a clone of TI’s XDS110. Again, the official Texas Instruments TMDSEMU110-U XDS110 JTAG Debug Probe is a bit expensive and currently looks to be out-of-stock, but cheap clones of XDS110 JTAG debug probe should work, see example: |
Sorry for off topic and stupid question, but if I will flash dongle with router firmware, did it start working like zigbee network extender? No need to be connected directly to "computer"? Just simple 5VDC power supply like phone charger will be enough? |
@andreytse Yes, it works as an extender. You need 5V only. |
As the TI Launchpad devkits has onboard XDS110, I guess those can be used for flashing also. Way cheaper than an official standalone XDS110 and as a bonus you can use it as coordinator/router too :). |
Yes the TI LAUNCHXL-CC26xR1 and the TI LAUNCHXL-CC1352P does have integrated XDS110 debugger, however a less expensive stand-alone option today for an officially supported debugger adapter is the Texas Instruments CC-DEVPACK-DEBUG for ~$15(US): https://www.ti.com/tool/CC-DEVPACK-DEBUG However, the official TMDSEMU110-U XDS110 JTAG Debug Probe is still a better option for developers as offer more options: https://www.ti.com/tool/TMDSEMU110-U The original Texas Instruments XDS110 JTAG debug probe is a bit expensive but cheap clones of it should also work. Examples: https://aliexpress.com/item/4000751867419.html https://aliexpress.com/item/32976279419.html Also, note that original Segger J-Link V9 (legacy) debug probes does not support cJTAG, so need at least Segger J-Link V10 series: https://wiki.segger.com/J-Link_Model_Overview Electrolama posted a handy pinout reference for CC-DEVPACK-DEBUG: https://electrolama.com/radio-docs/advanced/flash-jtag/ Two GUI tools to use with CC-DEVPACK-DEBUG are SmartRF Flash Programmer v2 (Windows OS only) or UniFlash (cross-platform). |
In the path you need to remove the spaces. I noticed that you have spaces in path: "...ee Stick/CC1352P2..." E.g.: C:\CC1352P2_CC2652P_launchpad_coordinator_20211217.hex |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Hello,
Even reflashed it doesnt work at all... is it possible that Crash - bricked it? thanks! |
I have the exact same problem; ordered a 2-pack of these dongles to replace my broken old zigbee stick based on the older (unstable) chips.. but I can't get them to start in bootloader/flashing-prepared mode either, no matter how long I keep the button pressed after inserting the device into an USB slot. I'm going to try and see if the JelmerT/cc2538-bsl#114 thing works, otherwise I just spent 32 euro's on 2 underweight paperweights.. |
I got it to work after I installed the CP210x Universal driver @ https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers. Then when I ran this command in Windows Powershell (after installing Python and running
It then showed the device plugged into the COM3 port:
After that I could run the command to flash the device into coordinator mode by running |
The CP210x Universal driver solved the problem for me. If your on Windows check if the driver are correly installed for the com port. Thank you @hvanmegen for you solution. |
Have any Windows users tried this docker path? |
It works ! Also after installation Universal Drivers Sonof Dongle appeared in Flash Programmer 2 |
Very glad to see that me posting my solution here helped at least 2 other people.. We are The Community, my friends.. stay awesome! |
I still have "ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)" :(. |
Manually enable bootloader mode via boot button or use correct parameters for Sonoff with https://github.com/JelmerT/cc2538-bsl For ITead SONOFF Zigbee 3.0 USB Dongle Plus: For the CC2652P based "SONOFF Zigbee 3.0 USB Dongle Plus" (model "ZBDongle-P") adapter from ITead you need to invoke toggle to activate bootloader with --bootloader-sonoff-usb if you do not want to open its enclosure to manually start the bootloader with the boot button on the PCB. Also post to discussions instead of this issue when asking for help as how to flash is off-topic here in this closed issue -> https://github.com/Koenkk/zigbee2mqtt/discussions |
Hello everyone.
I tried to flip the router firmware on the SONOFF ZigBEE 3.0 USB dongle Plus which I didn't succeed.
Whenever I plug in the dongle, I press the Boot button on the dongle.
The process is always canceled with the error.
Maybe one of you can help me.
The text was updated successfully, but these errors were encountered: