-
Notifications
You must be signed in to change notification settings - Fork 89
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
[REQUEST] Support for Silicon Labs EFR32 (Mighty Gecko family) based Zigbee radio adapters using newer EZSP serial protocol? #243
Comments
Maybe someone can test EFR32MG12 based E180-ZG120B module from Ebyte works with bellows? Ebyte makes an inexpensive development board called "E180-ZG120B-TB" for testing E180-ZG120B
This Zigbee 3.0 capable module has some very powerful MCU and radio specifications for its price: This development is sold by cdebyte for less than $9 US-dollar on Aliexpress or about twice on eBay: You can also buy them on bulk from Alibaba for less:
Looks like you can remove some jumpers to disable the USB converter if want to use serial directly. E180-ZG120B by Chengdu Ebyte (CDEYTE) has 20 dBM powerful Zigbee 3.0 radio for 2.4GHz capable based on an EFR32MG1 Series 1 MCU SoC / chip, specifically EFR32MG1B (IC = EFR32MG1B232F256GM48), from Silicon Labs EFR32 ("Mighty Gecko") family. EFR32MG1B232F256GM48 includes a 40 MHz ARM Cortex-M4 microcontroller with 256 Flash, 32 RAM and a rich peripheral set in a QFN48 package. With 19.5 dBm maximum output power and receive sensitivity of -101 dBm (250 kbps O-QPSK DSSS). Key Specs: 19.5 Output Power Max (dBm) / 120.5 Total Link Budget (dB). I understand this also is classified as an Ember based radios using the EZSP (EmberZNet Serial Protocol) serial protocol (UART bus) interface so could therefore be made compatible with the bellows library for zigpy if the E180-ZG120B module is flashed with the right firmware? I guess that my follow-up question will be which exact firmware to use on the E180-ZG120B module? Ebyte is now making two EFR32MG1B based modules called E180-ZG120A and E180-ZG120B E180-ZG120B (and old E180-ZG120A) module is sold by cdebyte on eBay and Aliexpress at low prices. Example: |
Silicon Labs also has an official devkit called "EFR32 Mighty Gecko Wireless Starter Kit", but it cost almost $500 US-dollars ($499 to be precise), however, that kit contains three (3) complete dev boards.
|
Z-Smart Systems now has driver code supporting latest Silicon Labs Ember dongles at @zsmartsystems |
Does ebyte provide any firmware? |
You could try contacting Ebyte / cdebyte (Chengdu Ebyte), however, I believe that the Ebyte module most likely only comes with standalone bootloader firmware preloaded for boot. Such standalone bootloader firmware usually is just enough to allow you to flash and upgrade the main application firmware via USB (without having to use a GPIO port / JTAG connector / debug adapter and Simplicity Studio or J-Link Downloader). I would think you have to build/compile Zigbee stack (Zigbee EmberZNet) project with coordinator device type config in their SDK or tools ("Simplicity Studio" and "Simplicity Commander") and then flash application bootloader firmware with Zigbee stack yourself, ...but where to get that Zigbee stack and application bootloader firmware I don't know, maybe from a Silicon Labs SDK? As I understand they call protocol such as their Zigbee stack (Zigbee EmberZNet) for "apps". Think these might be a couple of easier how-to guide for building EmberZNet for EFR32 and EM35x: I don't own one myself yet but would be nice if could just install and start their latest SDK or tools ("Simplicity Studio" and "Simplicity Commander") and it would detect the hardware once it is plugged in to then start a new project. Guessing that you first might need to register a serial number to your account for full SDK access, or at least register a dev kit part-number to your account, like for the official "EFR32 Mighty Gecko Wireless Starter Kit" (that kit part number is "SLWSTK6000B") as the dev board in that dev kit is kind similar to the Ebyte dev board as they both use the same type of chip from Silicon Labs . Simplicity Studio Simplicity Commander Silicon Labs has its community knowledge-base here: https://www.silabs.com/community/wireless/zigbee-and-thread/knowledge-base Silicon Labs also have different user forums here: Silicon Labs IoT also has a community on Slack: Silicon Labs IoT also has a community on Gitter: @cdjackson from @zsmartsystems also mention two main NCP images in their README.md
Perhaps he would be willing to hint where to get the correct Zigbee coordinator firmware for EFR32? @cdjackson also keep adding new EZSP support from UG100 to com.zsmartsystems.zigbee |
@sprut666666 as mentioned in #242 is also working on similar EFR32MG1 based adapter for @sprut |
So it boils down to getting Silicon Labs SDK which you only get with their dev-kit. But once you get SDK you can also get new image for the same chip as on HUSBZB-1 stick. |
There're three dev boards in the mighty Gecko Silicon labs devkit. Just need to find two more volunteers willing to shell out $166 + taxes for a dev board and access to SDK which would allow to upgrade HUSBZB-1 to the latest emberznet. |
Yes same SDK, but I don't think that you can use the latest EmberZNet Zigbee Stack on older hardware. That is, you can't upgrade EM35x based dongle with a Zigbee 3.0 stack, only latest Zigbee PRO stack. To run the latest EmberZNet Zigbee Stack with Zigbee 3.0 support you need EFR32 hardware. Anyway, some posts on their forum hint that you don't need a dev kit serial number for the SDK:
You might only need to enter the kit part number for the official "EFR32 Mighty Gecko Wireless Starter Kit", and that kit part number is "SLWSTK6000B" (as it is kind of a similar development board with the same type of chip) and then just click a checkbox to accept the license agreement. Then once someone has created hex/bin files with EmberZNet firmware then anyone can flash them themselves (I understand that is already done to get Telegesis ETRX3 adapters to work with bellows). |
not sure if we're reading the same posts, but those do tell you have to have access to dev-kit serial number |
Note that the original post there was posted more than two years ago so might have changed. sslin (Employee) teplied Feb 21 2019, 2:40 AM in that thread with this: Simplicity Studio is free to download and use even if you don't buy any kits. JTAG driver will be installed automatically when you install the Simplicity Studio. Some sdks/stack are free to download within the Simplicity Studio like Bluetooth, Flex, MCU, etc ... With the serial number you got from the Mesh starter kit, you will be granted the access right to Zigbee and Thread for life long. |
The HUSBZB does not contain a bootloader so cannot be updated. |
Well, that might be true (for those stacks), but last time I've looked Emberznet stack was not accessible without a kit.
You send it a bootloader frame and it enters into bootload mode and you can upload .ebl image using xmodem. |
from HUSBZB in bootloader
|
Really? Have you tried this? For the HUSBs that I've looked they have not shown a bootloader being installed. |
Sure - I’m very familiar with the protocols and have supported many companies with implementing Silabs systems. I don’t personally have one of these devices as I’m in Europe so there’s little point here, but I’ve had someone else test this and it didn’t work - maybe there was a problem with that device or maybe not all support the boot loader (or maybe the previous person to test this didn’t test it well).
|
I think it is might be up to the vendor to include boot loader into image, but both of Nortek GoControl HUSBZB-1 sticks in my possession respond to |
Does it respond to getStandaloneBootloaderVersionPlatMicroPhy?
|
it does. |
Thanks. I might need to try and get hold of one to create a new firmware and try this.
|
Just to make it a bit easier #249 |
There are otherwise plenty of instructions out there on how to flash Telegesis ETRX357 USB dongles, as you can't use them with bellows until you have first flashed them with other EmberZNet firmware, see: https://github.com/zigpy/bellows/blob/dev/README.md
https://community.home-assistant.io/t/eu-usb-sticks-for-the-new-zigbee-component/16718/10 Quote bellow originally posted by Frank Aug '17 in linked thread: I can confirm that the ETRX357USB-LRS+8M can be flashed with an appropriate EZSP firmware without the use of any programming hardware. So, without any guarantees (you might -but probably won’t- brick your device), here’s how: Download the firmware. I used some random blob someone put on github that at least seemed to have the right name. What could possibly go wrong, right? 😄 https://github.com/yqyunjie/Zigbee-Project/blob/master/firmware/EmberZNet/EM35x-EZSP/build/em35x-ezsp-images/EM357/em357-ncp-uart-xon-xoff-use-with-serial-uart-bl-500.ebl?raw=true 282 (Install USB-to-serial drivers for the device. Linux will load the driver automatically when you plug in; not sure about other OSes.) Install a serial port communication app that supports X-MODEM. (debian/ubuntu: sudo apt-get install minicom) Run it and configure it (sudo minicom -s) to use the fake serial port (/dev/ttyUSB0) at 19200 baud 8N1. Disable both hardware (RTS/CTS) and software (XON/XOFF) flow control. Type ‘AT’ , you should get OK in response. Now type ‘AT+BLOAD’ . The device will reboot into the bootloader. Change the baud rate in the serial port communication app setting to 115200 baud. (exit minicom using CTRL-A Q, run ‘sudo minicom -s’ again) Pressing enter in the terminal should now show you a three-option boot loader menu. Choose option 1. ‘C’ characters will start showing. Don’t wait for this to finish, but start an X-MODEM upload of the firmware you downloaded earlier (use CTRL-A S in minicom). You have 60 seconds to start the upload. After the upload finished, you should return to the menu. Now select option 2, to reboot into the new firmware. You’re done. Enjoy! |
Think these might finally a couple of easier how-to guide for building EmberZNet for EFR32 and EM35x: It does however do sound as if you need to register EFR32MG development kit with a serial number to get a logon, but once you have you are allowed to reuse it within the same organization or company. Could be worth it for you to try to contact Silicon Labs Salesforce and explain that you would like a logon for an open-source organization/project without owning a dev kit, as an "organization" is a loose term, zigpy is technically an organization. After all, projects like zigpy does help Silicon Labs sell chips. Guess that the answer might differ depending on how Silabs feelings are towards helping open-source projects which are not-for-profit. @Adminiuga Another suggestion could be for you & @dmulcahey to ask if maybe Home Assistant core team would be willing to sponsor you ZHA devs with an official EFR32MG development kit. Again it sounds as if you would only need one login for "team zigpy" and then several people on "team zigpy" would be allowed to use that same login with Simplicity Studio and other Silicon Labs software. |
Guess they might sometimes recommend disabling bootloader to prevent any firmware upgrades. Here are otherwise some Silicon Labs recommendations for building firmware images for production: kpszupin (Employee) originally posted 12/29/2017 but it has probably updated since then: Some recommendations when building firmware images for production:
It is possible to combine these patches into a single hex file for manufacturing with a Simplicity Commander command, which can be put into a batch file or post-build script. For example: commander.exe convert gecko-bootloader.s37 app_image.s37 --patch 0x0fe04000:0x00 --patch 0x0fe041FC:0xF0 --patch 0x0fe041F8:0xFD —tokengroup znet —tokenfile mfg_tokens.txt -o manufacturing_image.hex -d EFR32MG1P233F256GM48 |
Another tip is this "Zigbee Boot Camp Course" wiki for Silicon Labs @MarkDing has put on GitHub : He has also put together this PDF with Silicon Labs ZigBee Onboarding Roadmap for beginners: Also see |
Slightly off-topic question; but once have EFR32 based adapter with latest EmberZNet Zigbee stack: Would it be possible for zigpy to form a Zigbee 3.0 network using latest EmberZNet ZigBee Stack?
Currently, as I understand, zigpy & bellows form a Zigbee HA (Zigbee Home Automation) network? |
FYI @SillyDay don't own a E180-ZG120B but has tried to build a firmware for it as per discussion here: SillyDay GitHub repo for EFR32 firmware: |
Thanks !!!! :-)) |
You should set the MFG_BOARD_NAME znet token to |
How do i do that in HA ? |
zha_custom.execute ???? |
nah, that won't work unless you add code for it. Use the silabs commander to set the manufacturer token |
The API for EZSP is as you knowing : |
Hrm, unless you lock out the debug interface, I thought it was possible to unbrick the device, essentially by erasing it. So the "recover bricked device" did not work? |
Blackmagic probe(BMP) working great but with J-Link and simplicity studio i was erase internal flash, reading with flash map and writing bootloaders and then it was going crazy. Was reading the flash with BMP and the bootloader was written offset and not at the beginning of the flash but working. Booting in bootloader and flashing app = RIP (to much offset for the app and its written in the peripheral aria / lock bits). |
I'm missing the token "TOKEN_MFG_MANUF_ID" that i was setting it but not getting it in the log (0x117C) ;-))) Is this better ??
Patched orginal user data file from the E27 WW bulb in "string form".
The data after 0x0200 is the orginal from Ikea and is outside the "token airia" that the EZSP is reading and is used for "custumizing" the "standard" firmware then using the same OTA file for different device types (the new and old remote is doig that and most bulbs). |
I was yesterday making one deep diving and finding 2 interesting documents first:
With time outs of NCP commands to the device and leaving joining until complete time out of the pairing after ca 2 minutes.
And in the end the paring is OK. The interesting things its the ZDO commands that not being sent / received in the first case. The thing is how do you doing the updating of the token for the devices in the NCP. 2 more important things is the “3.7.2 Trust Center and Source Routing” and “3.7.3 Trust Center Address Cache” but its not so likely the core problem then paring is working then the NCP don’t have any token stored for the device. I have reading the most of the “AN1233” 2 times and sleeping between without the ZGP things and understand the most but i think you is understanding it better. Regards MW |
I wonder if |
Is the trustcenter token updating problem present in all protokoll versions (4 to 8) or is it only in the higher (>=v6) its failing ? Looks like I doing one ZB3 rejoining / reparing test with tasmota and seeing if its working (have only testing pairing but not real repairing). |
I have testing rejoining and force delete / live of device in tasmota and it was not nice :-(( One more detailed description of device commissioning: Base Device Behavior Specification
That is not working in bellows and it must being one policy in EZSP or setting that is doing that is not working in bellows. |
@MattWestb We're not using Our goal is to make Home Automation easy to use for all users, so we're not using advanced security features that would make provisioning difficult. We use only one Link Key (well known key) and only one network key for the entire network. |
@grobasoz do you have links to your products mentioned in #243 (comment) ? Even if it is a work in progress? I'd rather direct new users toward these in case they are considering HUSBZB-1 |
Thanks for the commit to master branch !! |
It would now be very nice to have a GUI display indication representation like a tag or similar to show in Home Assistant ZHA UI what specific Zigbee protocol profiles and exact Zigbee profile version that each specific device is using. Perhaps a feature to show another column which state protocol profiles and profile version that each specific device is using? Example: Or is there perhaps some better location or way to get Zigbee protocol profiles and exact Zigbee profile versions into HA ZHA? PS: Probably not supported by any firmware just yet but Zigbee 3.1 (ZB3.1) devices should also become available very soon now: https://www.asmag.com/showpost/28387.aspx?name=news (Zigbee 3.1 will not change any hardware but only focus on interoperability and compatibility between different manufacturers). |
@Adminiuga - I should have samples available this week so can take some pictures, do some testing and put some information on my github repo. I should be able to get a price estimate as well... Full production should be completed within another 4-6 weeks' time though. |
@Hedda The R23 is coming very soon an i think the EZSP 6.8.X.X is the last R22 release. I like more advanced setting and functions that is possible with the EZSP like: The large thing is what is possible implantation in the other zigpy radio platforms without breaking things. |
@grobasoz Any picture of your sample hardware? What storefront will you use to sell your hardware? Shipping only from Australia? |
@Hedda - you've been busy :) I've been testing 6.8.0.1 (the minor release "2" is a typo) but am not that impressed with the Multi-Pan option. No "official" pictures yet as production is still underway - I can post some of the prototypes if you're interested... Some re-design was necessary to make assembly into the enclosures easier... As I'm predominantly a development engineer with production capability, I tend to stay clear of sales and mainly supply retailers with products. They then on-sell globally where necessary. For EU, USA customers, it doesn't make sense to ship to and from Australia, it may be best to ship products direct from the factory in China to a "local distributor" when they are ready. |
Sounds great! Yes I think products will probably sell much better globally if local distributors can stock and ship from EU + USA |
FYI, Tasmota project has added a signed version of EmberZNet 6.8.0.1 NCP application firmware for EFR32 in Sonoff ZBBridge: https://github.com/arendst/Tasmota/tree/development/tools/fw_SonoffZigbeeBridge_ezsp It is supported in latest Tasmota development Tasmota-zbbridge version, but not yet proven stable with Zigbee2Tasmota (Z2T). |
Can the bellows library be made to support newer EZSP serial protocol such as EZSP v6, v7, and v8 when used with ZNet 6.x on Silicon Labs EFR32 (Mighty Gecko family) based Zigbee radio adapters?
See ex. #242 as that hardware is based on this same family and series of chips from Silicon Labs.
Zigbee EmberZNet version 6.7.0.0 has breaking change (with EZSP Protocol Version 8 and Secure EZSP Protocol Version 2) as both EZSP and Secure EZSP have adopted a new frame format with the following changes: (1) the fields of "Frame Control" and "Frame ID" are now two bytes; (2) no longer use "Legacy Frame ID"; (3) consume two bits of "Frame Control" to indicate the frame format version which is version 1 now.
Perhaps newer modules will dethrone Nortek HUSBZB-1 for ZHA as the must-have Zigbee adapter?
The text was updated successfully, but these errors were encountered: