-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add Itead Sonoff CC2652P usb stick bootloader invoke toggle #114
Conversation
Works great now! I can confirm this is working with 'sonoff' parameter on MS Windows 10 OS (more details in #113 ). Thank you! https://github.com/JelmerT/cc2538-bsl/tree/feature/ITead_Sonoff_Zigbee-delay UPDATE! I have updated my step-by-step testing instructions for flashing here to make it easier for others to test this: Broken down steps taken to flash firmware already mentioned in #113 into a step-by-step guide for flashing Sonoff Plus dongle:
Obviously need to replace number in "COM5" with the port # actually shown used under ports in Device Manager on Windows on your computer as the OS will just assign the next available Serial/COM-port. Also, if using Linux or Mac OS instead of Microsoft Windows then the Copy comment from issue #113
Better if cc2538-bsl could detect Sonoff "description" from CP2102N USB-to-UART chip then automatically use correct sequence? Note! Home Assistant now features USB-discovery for this dongle based on combo of VID, PID and its unique product description: PS: Recommend upgrading to latest firmware from the develop branch as it got a lot of bug-fixes from upstream not in master: https://github.com/Koenkk/Z-Stack-firmware/tree/develop/coordinator/Z-Stack_3.x.0/bin |
I have the device and tested "--bootloader-sonoff-usb" on macOS and Arch Linux, it worked perfectly on both. Thanks! |
Hi, it worked also perfectly fine for me with
|
@Oliv4945 for reference; can you specifically state on which exact operating system(s) distro and its version it worked on for you? |
Hi, worked also for me on Raspbian Buster (Debian 10)! Therefore it was very easy to flash the sonoff zigbee stick. Thank you very much for this great project! |
@Hedda Linux Debian 11 |
Worked great! I even tested on the Zigstar USB stick and it worked too to my surprise. https://zig-star.com/projects/zigbee-stick-v4/ |
Worked and installed for first time zigbee user. Linux Mint 19.3 Cinnamon python 3.6.9 |
Flashing worked on Linux Mint 20.2
|
It worked for me too. Here's my full report.
First, I had to install the dependencies.
Then I tried running the command.
Which resulted in:
I then realised Zigbee2MQTT may still be connected to the stick. So I disabled Zigbee2MQTT and ran the command again. This time it worked.
Some thoughts:
|
Covered the new feature in the upgrade/hands on this one too - https://youtu.be/4S_c_m6z-RY Awesome work making this easier! |
Another success story, using a virtualenv on an up-to-date Linux Manjaro installation with python 3.9.9
output
Great work! THANKS! |
FYI worked like a charm on Ubuntu 20.04 after running |
Another confirmation: |
Worked flawlessly (bar my user not having access to the dialout group) with a Sonoff 3 USB. |
Worked! Please merge 😄 |
Worked well for me as well:
|
@cooperaj @klein0r @ZetaPhoenix for reference please specify exact OS/distro version and Python version it worked on for you? |
@Hedda Windows 10 and it worked as above. |
Ubuntu 20.04. I had to install a couple of python things (which I did in a venv) but it was all pretty straight forward. |
Is it allowed to use this script as part of another open source project? I'm thinking about adding a UI to flash the Sonoff dongle into the Zigbee2MQTT plugin for the Webthings Gateway. |
Maybe you could use this one (or get in touch with him for further development, because current latest changes from this repo, do not include this functionality: see xyzroe/ZigStarGW-MT#2) https://github.com/xyzroe/ZigStarGW-MT |
…20103 Changed from 5dBm to 9dBm by default (only send, not receive). Link quality in networkmap improved 20-100% (only two samples). Flashed directly in rpi3, no need to unplug and press button: $ python3 cc2538-bsl.py -e -w -v --bootloader-sonoff-usb -p /dev/ttyUSB1 CC1352P2_CC2652P_launchpad_coordinator_20220103.hex PR: JelmerT/cc2538-bsl#114 Firmware: https://github.com/Koenkk/Z-Stack-firmware/blob/a4fbab342c131e8ec387e02ac9662d5344c48224/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20220103.zip
Good day I had the following fault: After adding --bootloader-sonoff-usb to the command I was able to complete flashing as per below.
|
@juan11perez for reference please specify which exact OS/distro inc. the OS/distro version + Python version it worked on for you? |
@Hedda |
Just had success following these steps on Arch Linux with Python 3.10.1! |
I also had success with this branch in ubuntu 21.04 python3 ./cc2538-bsl/cc2538-bsl.py -e -v -w --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20220103.hex |
I had to set the device.
|
Worked like a charm. I knew to stop z2m first and running the commands others have shared worked perfectly from within my LXC container. |
sorry for the late reply: python virtualenv are not related to "system virtualization". it is a python construct to isolate installed libraries for individual projects. so no USB pass through is needed as the execution context is still on the host. |
Looks like this is working. Thanks everyone for testing! |
@flatsiedatsie It's not only allowed, it's encouraged! |
@JelmerT Then pretty please check out the license discussion here -> #59 |
Thank YOU JelmerT! Can we now please request that you push a new release for PyPI using the old or new name? https://github.com/JelmerT/cc2538-bsl/releases Also suggest that you use releases with release version in addition to tags: https://github.blog/2013-07-02-release-your-software/ Plus make use of the PyPI publish GitHub Action https://github.com/marketplace/actions/pypi-publish Not sure if project cc2538 there is still the primary as only @sieben is listed as maintainer there? |
Currently pretty busy, but I'll try to bump the version and do the name conversion in the next week somewhere. I'm not the maintainer of the pypi but I'll check if we can also auto publish new versions there. |
Update README.md documenting new `--bootloader-sonoff-usb` option from JelmerT#114 Note that was mentioned in JelmerT#114 that this option might be renamed in the future.
Odd, I got an email that someone made a comment here referencing my post, but I don't see it in the posts here. Basically, the person asked if I would share my Proxmox LXC config that made this happen. Basically, I created a udev rule in the Proxmox host to statically name the dongle. I then included the static name as a passed through device in the LXC config. I had to add this manually vs. using the GUI. From there, I could do what I want (assuming I shut down any user of the device first, such as z2m). |
Thanks for your explanation. It was me asking this info. Not very experienced in using GitHub and accidentally deleted the reply / question. One final question; which OS did you use in the LXC? |
Debian Bullseye |
feature branch is merged to master JelmerT/cc2538-bsl#114, might as well point to a current version
Auto-BSL usage is in the readme but note that ITead/Sonoff have not implemented it in the standard Texas Instruments way: https://github.com/JelmerT/cc2538-bsl/blob/master/README.md#cc26xx-and-cc13xx Please otherwise see the code of read previous discussions You can also see open-source hardware and firmware asAuto-BSL (Pin 2) is a feature most Texas Instruments CC dongles support: https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/README.md You can also see open-source hardware and firmware as this is a feature that most Texas Instruments CC dongles support: https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/README.md https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0 https://www.zigbee2mqtt.io/guide/adapters/ If want more info you might be best of asking the same question in https://github.com/Koenkk/Z-Stack-firmware/discussions and/or https://github.com/Koenkk/zigbee2mqtt/discussions are those are larger community for TI CC hardware and firmware enthusiasts. But if you want hardware schematic then you have to ask ITead/Sonoff : PS: Please understand that I (and @JelmerT) am only an hobbyist/and have no official affiliation with ITead/Sonoff. |
@dinhchinh82 FYI, see Electrolama's flow chart and see zig-a-zig-ah (zzh) adapter which is open source hardware: https://electrolama.com/radio-docs/bsl/ https://github.com/electrolama/zig-a-zig-ah Another open source hardware is ZigStar: |
Thank you so much for the detailed steps. I had issues flashing using the methods described elsewhere but following you steps worked. 2 caveats: I had to restore my Zigbee network after the flashing completed using the below command: |
Your a hero posting your method, it saved me from a lot of frustration in trying to get it flashed. Your method worked for me! I'm on Windows 11 |
I realise this may be a late reply, but following all the instructions and using the latest version of the Launchpad Coordinator software CC1352P2_CC2652P_launchpad_coordinator_20230507.hex, it all goes well until it doesn't!! This is what I get: Connecting to target... And it;s that error message at the bottom that concerns me! Any comments are gratefully accepted..... Many thanks - Mike |
This PR adds support for the Itead Sonoff CC2652P usb dongle (https://itead.cc/product/sonoff-zigbee-3-0-usb-dongle-plus/) with the new option
--bootloader-sonoff-usb
.With this new option you don't have to manually start the bootloader with the 2 buttons on the PCB anymore.
This dongle does not have a 1 to 1 connection between RTS DTR and RST IO15, but uses 2 NPN transistors to connect them together with the following truth table:
I'm not aware of any other HW that uses this connection, so I'm naming the option after the specific hardware. In the future this should probably get a more general name like
--bootloader-imply-gate
or something. (the truth table is an imply and nimply port)If you have this specific HW, please test and report here.