node-zwave-js
node-zwave-js copied to clipboard
Ability to perform OTW firmware update Z-Wave 700 series USB sticks like the Silabs UZB-7, Aeotec Z-Stick 7, and Zooz USB 700 Series Z-Wave Plus S2 Stick
Please consider adding support to flashing OTW firmware ZW Serial API Controller GBL updates on Z-Wave 700 series USB sticks.
The same OTW upgrade process and flash method for ZW SerialAPI Controller Firmware over UART serial interface should also be applicable to all adapters based on ZGM130/ZGM130S or ZGM230/ZGM230S radio modules and EFR32ZG14 or FR32ZG23 SoCs.
- Silicon Labs UZB-7 (Silabs SKU: SLUSB001A/SLUSB7000A) (based on EFR32ZG14)
- Aeotec Z-Stick 7 - Z-Wave 700 series USB adapter/dongle/stick (based on EFR32ZG14)
- Aeotec Z-Pi 7 - Z-Wave 700 series gateway development board (based on EFR32ZG14)
- Zooz USB 700 Series Z-Wave Plus S2 Stick ZST10 700 (based on ZGM130S)
- Z-Wave.Me RaZberry 7 (zme_razberry7 by Smart Systems Ltd. Z-Wave.Me) (based on ZGM130S)
- Z-Wave.Me RaZberry 7 Pro (zme_razberry7 by Smart Systems Ltd. Z-Wave.Me) (based on ZGM130S)
https://www.silabs.com/documents/public/data-sheets/DSH14483.pdf
https://www.silabs.com/documents/public/data-sheets/efr32zg14-datasheet.pdf
https://www.silabs.com/documents/public/data-sheets/zgm130s-datasheet.pdf
OTW programming of Silabs UZB7 Controller Stick and other EFR32ZG14 or ZGM130S based Z-Wave 700 series controllers:
https://community.silabs.com/s/article/z-wave-700-otw-of-controller
https://community.silabs.com/s/article/z-wave-700-programming-uzb7-controller-stick
https://www.silabs.com/community/wireless/z-wave/knowledge-base.entry.html/2019/01/04/z-wave_700_programm-4Hx0
https://www.silabs.com/community/wireless/z-wave/forum.topic.html/will_serialapi_imagesupporttheserialbootloader-Wwib
Aeotec posted these OTW upgrade guides for Aeotec Z-Stick 7:
https://help.aeotec.com/support/solutions/articles/6000252997-update-z-stick-7-through-raspian-os
https://help.aeotec.com/support/solutions/articles/6000252296-update-z-stick-7-sdk-7-15
Zooz posted this OTW upgrade guide for Zooz ZST10 700 Z-Wave Stick:
https://www.support.getzooz.com/kb/article/931-how-to-perform-an-ota-firmware-update-on-your-zst10-700-z-wave-stick/
UZB-7 BRD1001A dongle is the official Z-Wave 700 reference design from Silabs SLWSTK6050A Z-Wave 700 Wireless Starter Kit:
https://www.silabs.com/development-tools/wireless/z-wave/z-wave-700-starter-kit
https://www.silabs.com/development-tools/wireless/z-wave/z-wave-long-range-700-starter-kit
Surprisingly the SLUSB001A / SLUSB7000A UZB-7 looks like the most affordable Z-Wave 700 USB adapters readily available today:
https://www.google.com/search?q=SLUSB001A
PS: This is related to the questions about firmware posted in the discussion section -> https://github.com/zwave-js/node-zwave-js/discussions/2544
PPS: This is a follow-up feature request to https://github.com/zwave-js/node-zwave-js/issues/1357 which was about adding support for SLUSB001A (SLUSB7000A) UZB-7 USB stick.
As long as the standard Silabs Gecko bootloader is used it should be also able to upgrade firmware via XMODEM binary transfer:
https://silabs-prod.adobecqms.net/content/usergenerated/asi/cloud/content/siliconlabs/en/community/wireless/z-wave/knowledge-base/jcr:content/content/primary/blog/z-wave_700_programm-4Hx0.social.0.10.html
As such a workaround could be to port or modify Elelabs EZSP Firmware Update Utility and/or walthowd firmware updater image:
https://github.com/Elelabs/elelabs-zigbee-ezsp-utility
https://github.com/walthowd/husbzb-firmware
While Elelabs EZSP Firmware Update Utility is made for Silabs Zigbee adapters it works with EFR32 that have a similar bootloader(?).
PS: Like other Z-Wave 700 sticks it is based on EFR32ZG14 Zen Gecko Z-Wave and require CP210x USB to UART Bridge VCP Drivers.
https://www.silabs.com/documents/public/schematic-files/PHD14501.zip
I'm not saying this isn't worthwhile, but one issue is that the firmware is bundled with Simplicity Studio. If OTW was supported, from where would you get the file? By the point you install that to get the file you're already one click from upgrading in Simplicity Studio.
Being able to download the software and then just point to a bin file (or whatever the extension is) to update is much easier than installing additional software and having to run it. This is especially true if you are running zwavejs in a headless environment on a non-Ubuntu host.
It doesn't work that way though. You have to run Simplicity Studio to tell it to install the additional tools for zwave to have it install the next 2-3 GB including the zwave controller. At least I think that is the point at which it is installing the file. The whole thing is a series of enormous downloads. If someone can verify that it installs the file on the Mac version (which can install but not run the zwave controller), or that it is installed in the first download, then it is of much greater utility.
FTR, I just emailed Zooz and Aeotec to see if they intend to distribute firmware files directly for their sticks either now or in the future.
As indicated above, SiLabs documents suggest that OTW updates for the UZB-7, and likely the other 700 sticks, is via the XMODEM protocol. Baud rate is 115200 bps. https://www.silabs.com/community/wireless/z-wave/knowledge-base.entry.html/2019/01/04/z-wave_700_programm-4Hx0
Rather than try to use one of the Python implementations linked, there is at least one XMODEM module for Node.js. https://github.com/exsilium/xmodem.js/
FTR, I just emailed Zooz and Aeotec to see if they intend to distribute firmware files directly for their sticks either now or in the future.
I guess the question here is also about if the Z-Wave JS project/community should even bother to ask for permission before hosting and/or distributing commercial companies self-contained copyrighted OTW firmware images in their unmodified binary blob format (e.i. .gbl, .ebl, .hex, .s37, .bin, .img, etc.).
Distributing unmodified copyrighted firmware binary blobs is usually fine as long as you simply do not ask for permission. You would be using these OTW firmware image files for their intended purpose and that should not hurt the company in any way.
It is probably better not to ask and just do, wait and hope that they will not send your cease and desist letter. I am guessing that the chances are much higher than you are more likely to get a no as the answer if you ask in advance than them stopping you later if you do not ask at all in the first place.
Not sure if fully legal or not but from what I can tell hardware manufacturers normally do not actively chase or sue open-source projects for simply hosting and/or distributing their companies self-contained binary blobs such as firmware image files or driver binaries as long as they are not modified in any way or used for anything other then their intended purposes.
For reference, see examples https://github.com/Koenkk/Z-Stack-firmware/ and https://github.com/Koenkk/zigbee-OTA
Maybe not quite covered by "Fair use" or "Fair dealing"
https://en.wikipedia.org/wiki/Fair_use
https://en.wikipedia.org/wiki/Fair_dealing
Rather than try to use one of the Python implementations linked, there is at least one XMODEM module for Node.js. https://github.com/exsilium/xmodem.js/
FYI, one of the benefits of the firmware updater Docker image by walthowd is that it contains scripts to probe/scan to detect which exact adapter it is and if the adapter supports it can automatically restart it into bootloader-mode so it can upgrade "automagically"
https://github.com/walthowd/husbzb-firmware
But yes, for Z-Wave JS purpose it would probably be better to just borrow inspiration from that concept for a new implementaion.
We've already decided we are not interested in hosting firmware images. It's a copyright violation and we want to work with manufacturers. SiLabs has been supportive, as has Aeotec and Zooz. They ship us pre-release devices to test and samples when there are problems. SiLabs answers our questions. It's not worth it.
We've already asked and have some agreement with Aeotec, Zooz, and Inovelli as a start to push their firmware updates through the UI we just haven't built out the functionality yet.
I've confirmed that Zooz doesn't intend to issue firmware updates for their sticks.
Aeotec has no present plans to do so as the source code from SiLabs isn't available yet for them to build their own. They've asked SiLabs if they'd be allowed to distribute the bundled file if we supported this.
I've confirmed that Zooz doesn't intend to issue firmware updates for their sticks.
Well that sucks - I hope if enough of us ask they will change their mind.
I've confirmed that Zooz doesn't intend to issue firmware updates for their sticks.
Well that sucks - I hope if enough of us ask they will change their mind.
It's all the same firmware so if anyone of them post it that would work. Aeotec is still working with SiLabs to see if they can post the firmware.
Aeotec now has a 'how-to' upgrade firmware guide with download links for the Aeotec Z-Stick 7 GBL firmware files for OTW:
https://help.aeotec.com/support/solutions/articles/6000252296-update-z-stick-7-sdk-7-15
For serial commands see:
https://siliconlabs.force.com/s/article/z-wave-700-programming-uzb7-controller-stick?s1oid=00DA0000000L2
The SerialAPI command 0x27 FUNC_ID_AUTO_PROGRAMMING will drop the 700 series into the bootloader.
Send the binary string below.
01h, 03h, 00h, 27h, DBh will drop into the bootloader as described in the 500 series INS11681 section 5.2
https://cn.silabs.com/documents/public/user-guides/INS11681-Instruction-500-Series-Z-Wave-Chip-Programming-Mode.pdf
Aeotec now has a 'how-to' upgrade firmware guide with download links for the Aeotec Z-Stick 7 GBL firmware files for OTW:
https://help.aeotec.com/support/solutions/articles/6000252296-update-z-stick-7-sdk-7-15
Anyone want to brick their Zooz?
Aeotec now has a 'how-to' upgrade firmware guide with download links for the Aeotec Z-Stick 7 GBL firmware files for OTW: https://help.aeotec.com/support/solutions/articles/6000252296-update-z-stick-7-sdk-7-15
Anyone want to brick their Zooz?
I do not have a Zooz USB 700 Series Stick, but know that flashing that EFR32ZG14 firmware for US Frequency should not brick it.
PS: Check out additional flashing instructions for OTW Firmware Upgrade via Simplicity Studio v5 Z-Wave Tool in https://github.com/zwave-js/node-zwave-js/discussions/2544 and https://github.com/zwave-js/node-zwave-js/discussions/2549
Confirmed manual process to upgrade working in Linux. Credit to cpw:
- installed minicom
- figured out where device was (/dev/ttyUSB0 for me)
- unplugged/plugged in device
- in a shell: stty 115200 cs8 -cstopb -F /dev/ttyUSB0
- then in same shell: printf '\x01\x03\x00\x27\xDB' >/dev/ttyUSB0
- configure minicom: minicom -s important: turn hw flow control OFF here, set baud etc
- run minicom: minicom -D /dev/ttyUSB0
- press enter a bunch of times, you'll see menu as demoed. (may need to replug stick to get this to happen)
- select 1 in menu to flash. in minicom, use ctrl shift S, select xmodem, and specify path to file. Upload should proceed (it'll take a minute)
- press 2 once upload is complete in minicom to "run" the new firmware.
Aeotec put together detailed instructions. Oddly for some reason zwavejs2mqtt has to be running for this to work. We need to look into that more as we may be missing an initialization step or something.
https://help.aeotec.com/support/solutions/articles/6000252820-update-z-pi-7-with-raspbian-os-through-an-rpi
For another perspective, here's my guide: https://gist.github.com/kpine/f7206cfc5625b4c2c54a8f6ceb6aa2ca
I went through the process today and wanted something to refer to in the future.
I did not have zwavejs2mqtt running, it didn't seem like a good idea to me.
FYI, just picked up a Zooz ZST10 700. It came installed with SDK version 7.15.01. Either the stick I received does not support controller OTW firmware updates, or something is different than the others. I attempted to install multiple newer versions of FW and all fail.
From the OTW guide:
If you may get error 0x50 or 0x18 during ZGM130S or EFR32ZG14 controller firmware update, please make sure the bootloader and encryption keys have already been flashed into the device via SWD interface before you perform the OTW/OTA update. UZB-7 does not expose the SWD interface, it is required to open the plastic box and connect its SWD interface to programmer in this situation. Besides, ensure the gbl file being load contains an increased firmware version comparing the one that the device is currently running.
PC-Controller, minicom, and zw_programmer all fail. The bootloader is installed, and the fw version is newer. I'm wondering if they are using different encryption keys than are used for the Silicon Labs GBL files, or the keys are not installed?
root@dev:/app/bin# ./zw_programmer -s /dev/ttyUSB0 -p ZW_SerialAPI_Controller_7.16.3_297_EFR32ZG14_REGION_US.gbl
Using serial device /dev/ttyUSB0
Connected to Serial device: OK
Serial version: 9, Chip type: 7, Chip version: 0, SDK: 7.15.01, SDK Build no: 178 SDK git hash: 30313233343536373839414243444546
Chip library: 7, ZW protocol: 7.15, NVM: bridge7.15
nvm_id: bridge7.15
Auto Programming enabled
Gecko Bootloader v1.12.01
1. upload gbl
2. run
3. ebl info
BL >1
begin uploadnumbytes: 159488, oldnumbytes: 159452
Enter C(67) ACK(1) NAK (2)
Received: d
unknown char received d
Enter C(67) ACK(1) NAK (2)
Received: a
unknown char received a
Enter C(67) ACK(1) NAK (2)
Received: 0
unknown char received 0
Enter C(67) ACK(1) NAK (2)
Received: 43 C
Received C
2106708837 Sending Firmware file to Gecko module
|send_data 0 159488 1 |
Sent 0 bytes, remaining:159488 bytes
>sent offset :0
new offset :128
sending 133 bytes: 0x01 0x01 0xfe
Enter C(67) ACK(1) NAK (2)
Received: 18
2106708869 Received CANError in transmission
Closing Serial connection
FYI, just picked up a Zooz ZST10 700. It came installed with SDK version 7.15.01. Either the stick I received does not support controller OTW firmware updates, or something is different than the others. I attempted to install multiple newer versions of FW and all fail.
@kpine If you have a Windows OS machine then maybe try the instructions I posted in https://github.com/zwave-js/node-zwave-js/discussions/2544 for Silicon Labs UZB-7 USB Stick:
Originally posted by @Hedda in https://github.com/zwave-js/node-zwave-js/discussions/2544#discussioncomment-1323267
Note! Users should first update firmware to a later GA (General Availability) version of firmware before using UZB-7 as a commercial product.
Tip! You can perform local firmware upgrade using OTW (Over The Wire) on UZB7 USB stick using Z-Wave 700 Serial API firmware GBL XModem file via the "OTW Firmware Upgrade" option in Silabs "Z-Wave PC Controller" tool that gets installed with Simplicity Studio.
Quick Start-Up Guide to flash UZB-7 USB stick with latest firmware
Here is a quick start-up guide on how to perform OTW Firmware Upgrade on UZB-7 using "Z-Wave PC Controller" tool in Simplicity Studio.
Prerequisites:
To actually get/download the latest firmware file for Z-Wave 700 USB stick you need to register for a free Silicon Labs Community account at https://community.silabs.com/SL_CommunitiesSelfReg and install Simplicity Studio v5 for your operating system, start it and login to install + update the Z-Wave technology type SDK package inside Simplicity Studio. See https://www.silabs.com/developers/simplicity-studio
- Connect/plug-in the Z-Wave 700 Controller USB stick to your computer.
- Z-Wave 700 Controller USB sticks will normally use a Silabs CP2102N USB-to-serial converter chip for the MCU SoC so if needed by your operating system then install the Virtual COM Port (VCP) drivers and CP210x VCP Drivers from Silicon Labs. The latest drivers are available at https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers (for Windows 10 download and install the "CP210x Universal Windows Driver" package).
- If using Windows 10 then be sure to disable Energy Saving Mode on the virtual com port so the dongle does not go into sleep: https://silabs-prod.adobecqms.net/community/wireless/z-wave/knowledge-base.entry.html/2020/06/04/uzb7_not_accessibleonwindows10-0Dw1
- Start and run the "Z-Wave PC Controller" from Simplicity Studio from under the Tools menu.
- Click on the “Setting-wheel” in the Right-Top corner of the Z-Wave PC Controller tool and select “Silicon Labs CP210x USB to UART Bridge”. Click OK.
- Click on "NVM Backup/Restore" select a folder and file path to backup files to in order to keep your a backup network stored. Make sure to name it with something like "ZWave_USB_Stick_Backup_date_and_time". Click on Backup.
- Click the "OTW Firmware Upgrade" box and select the correct GBL file, (taking note that if you do not select a firmware with a version that is newer than your existing version you will get an error an upgrade will fail as downgrade or reflashing same version is not possible here). Firmware upgrade should be started and completed automatically.
FYI, if use default directories for Simplicity Studio + the Z-Wave technology type package GBL firmware binary files should after install be in:
C:\SiliconLabs\SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\v3.2\protocol\z-wave\Apps\bin\gbl
Silabs UZB-7 USB Stick uses an EFR32ZG14 SoC so you need to select the latest ZW SerialAPI Controller firmware for it and your RF region.
So for example, currently, currently the latest firmware file (Version 7.16.2.0 / Version 7.16 Build 267) for the UZB7 USB sticks for Europe (RF region) is:
"ZW_SerialAPI_Controller_7.16.2_267_EFR32ZG14_REGION_EU.gbl"
Respectively, currently, the latest firmware file (Version 7.16.2.0 / Version 7.16 Build 267) for the UZB7 USB sticks for the United States / North America (RF region) is:
"ZW_SerialAPI_Controller_7.16.2_267_EFR32ZG14_REGION_US.gbl"
PS: Move information is available in INS13114 Z-Wave PC based Controller v5 User Guide from Silicon Labs:
https://www.silabs.com/documents/public/user-guides/INS13114-Z-Wave-PC-Based-Controller-v5-User-Guide.pdf
I don't see anything in your reply that isn't something I've already tried. Is there some new information there?
I'll just ask Zooz.
And yes, the region matches the firmware files I tried, US. For good measure, I applied the region setting even though it was already listed as US.
In total I tried 3 files:
-
ZW_SerialAPI_Controller_7.15.4_256_EFR32ZG14_REGION_US.gbl
-
ZW_SerialAPI_Controller_7.16.2_267_EFR32ZG14_REGION_US.gbl
-
ZW_SerialAPI_Controller_7.16.3_297_EFR32ZG14_REGION_US.gbl
My UZB7 is currently running 7.16.2, I had no problem upgrading it with that and 7.15.4.
I'll just ask Zooz.
Hope you get a better answer than I did - I asked when the stick was still pre-release and they stated then they won't support upgrades to it.
They won’t support upgrades to it but that’s not what I asked them. Supporting upgrades is different than affirmatively blocking upgrades. In any event, we’ll see what our contact has to say.
Plugged my Zooz ZST10 into my Win10 laptop and gave Simplicity Studio OTW a shot. Same error as @kpine - this was at ZW_SerialAPI_Controller_7.16.3_297_EFR32ZG23_REGION_US.gbl
Nothing of substance to add here, really. I have had my stick for maybe 6 weeks preinstalled with 7.15.
Can you all try a different version? I'm curious if it's just an issue with 7.16.3.
I tried several, with the same failure.
- ZW_SerialAPI_Controller_7.15.4_256_EFR32ZG14_REGION_US.gbl
- ZW_SerialAPI_Controller_7.16.2_267_EFR32ZG14_REGION_US.gbl
- ZW_SerialAPI_Controller_7.16.3_297_EFR32ZG14_REGION_US.gbl
Here is a picture of my PCB.
Wow, thanks for opening it. It looks like it's using a different Z-Wave SOC than the UZB7? ZGM130S vs. EFR32ZG14. Maybe the file we want is ZW_SerialAPI_Controller_7.16.3_297_ZGM130S_REGION_US.gbl
?
Looks like it. Wonder why they swapped the chip.