Giter Site home page Giter Site logo

husbzb-firmware's People

Contributors

hedda avatar igalarzab avatar lordmike avatar mck182 avatar puddly avatar walthowd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

husbzb-firmware's Issues

Unable to run on Mac

I have not been able to get this to work on a Mac where I run HA and have the HubZ installed. The issue is finding the correct /dev/XXXX path I think but not sure?

Unable to launch shell

Hi,

I am trying to use this firmware updater but running into a problem on my setup. I am running the software in Docker on my Unraid server.

I have successfully installed the software and verified that it can communicate with the USB stick because when I check the container logs I see the following message:
{"ports": [{"stackVersion": "5.4.1-194", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]} Found zigbee port at /dev/ttyUSB1 running 5.4.1-194

However, when I try to launch the console/shell to perform the firmware update I get the following error written to my Unraid system log exactly eight times:
Nov 29 21:52:06 Tower nginx: 2020/11/29 21:52:06 [error] 8802#8802: *28409122 connect() to unix:/var/tmp/husbzb-firmware.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.1.213, server: , request: "GET /dockerterminal/husbzb-firmware/ws HTTP/1.1", upstream: "http://unix:/var/tmp/husbzb-firmware.sock:/ws", host: "tower"

Any ideas on what I should try to resolve this error?

Thanks!
Dave

Docker error on Raspberry Pi

fails to run container on Raspberry Pi3+. downgraded docker to 19.3 but same error - minus the warning message ahead of the error msg.

pi@raspberrypi:~ $ docker run --rm --device=/dev/ttyUSB1:/dev/ttyUSB1 -it walthowd/husbzb-firmware bash
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
standard_init_linux.go:228: exec user process caused: exec format error

Nortek husbzb-1 stick - raspberry pi3+ - only other running soft is pihole which doesnt access any usb devices.

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

pi@raspberrypi:~ $ docker --version
Docker version 20.10.8, build 3967b7d
I am not a proficient linux user - an assistance would be appreciated

Hang after reboot to bootloader with default HUSBZB-1 firmware

When using ncp.py flash script with an unupdated/original HUSBZB-1 firmware/bootloader, I get a hang at:

# ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.7.8.ebl
Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

and it hangs forever in that state until Ctrl-C'd. After much debugging and tweaking of the script, figured out the patch to make it work in my case:

    # Open new connection
    ser = serial.Serial(
        port=port,
        baudrate=115200,
        parity=serial.PARITY_NONE,
        stopbits=serial.STOPBITS_ONE
    )

My stick needed no flow control at all (either hardware or software), and the xonxoff=True flag in the bootloader connection was causing it to hang when waiting for 1 to be echoed back. Testing with minicom indicated disabling software flow control would make it work.

Not sure if that's an ideal fix or if setting rtscts=True might have also worked/been preferable, but my stick is now updated and I'm not planning to reflash.

Putting this here in case this helps other people or this could help improve the flasher script.

[REQUEST] Support Newer Aqara sensors

Various Aqara sensors have been updated to version E1.

There is a discussion on the Home Assistant Forums. Some other controllers such as the ConBeeII have updated firmware to enable this hardware. I'd be willing to chip in a little money to get this support added to the husbzb.

I have some devices and am willing to help test

EM358x NCP 6.7.8 firmware images for EM357 and EM358x / EM358 based adapters/dongles

@walthowd You probably already read that Silicon Labs EM358x NCP 6.7.8.0 firmware compiled by grobasoz is now available

https://github.com/grobasoz/zigbee-firmware/tree/master/EM357

https://github.com/grobasoz/zigbee-firmware/tree/master/EM358x

grobasoz tested on EZSP v8 with EM357 and EM358x on standard Zigbee Z3GatewayHost from Silicon Labs.

Also macfly92 successfully updated Telegesis ETRX357USB adapter/dongles to 6.7.8 firmware

#12

hangs after printing bootloader version, never updates

I'm trying to update my HUSBZB-1. Used sudo ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.7.8-115k.ebl and had it hang after the reading the bootloader verison.

Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

If I interrupt it, I get the following traceback

Traceback (most recent call last):
  File "/home/durrw/husbzb-firmware/./ncp.py", line 484, in <module>
    flash(args.port,args.file)
  File "/home/durrw/husbzb-firmware/./ncp.py", line 351, in flash
    ser.readline() # BL > 1
  File "/usr/lib/python3.9/site-packages/serial/serialposix.py", line 483, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
KeyboardInterrupt

[SUGGESTION] Consider utilizing "Universal Silicon Labs Flasher" from Nabu Casa / Home Assistant

If want to develop project further might look at "Universal Silicon Labs Flasher" (from Nabu Casa/ Home Assistant) for flashing firmware:

https://github.com/NabuCasa/universal-silabs-flasher

"Universal Silicon Labs Flasher" project is being developed by a few Home Assistant's developers who are employed by Nabu Casa.

https://www.nabucasa.com/about/

Note! Older chips with Ember Bootload (EBL) file format need a patch for EBL parsing -> NabuCasa/universal-silabs-flasher#11

Firmware upgrades and downgrades for the new ITead Zigbee 3.0 USB Dongle

Suggest add newer + older firmware for the new EFR32MG21 based Zigbee 3.0 USB Dongle Model 9888010100045 from ITead

https://www.itead.cc/zigbee-3-0-usb-dongle.html

https://github.com/xsp1989/zigbeeFirmware

https://github.com/xsp1989/zigbeeFirmware/tree/master/firmware/Zigbee3.0_Dongle

https://github.com/xsp1989/zigbeeFirmware/blob/master/README.md

zigbeeFirmware

1.ETX - Pin PB01 ERX Pin PB00 connect to your pc
2.Ground PA00
3.Temporary ground the reset pin Z_RST (nRST) to reset
4.Choice "1. upload gbl"
5.Using xmodem(128 byte) send this ota file to you device._

EmberZNet 6.10 / 6.10.x.x Zigbee Coordinator firmware images?

Silicon Labs EmberZNet 6.10.3.0 GA should really be mature and stable enough now as only contain bug-fixes since 6.10.0.0 GA.

Silabs EmberZNet Zigbee 6.10.0.0 was released on the 16th June of 2021 and newer EmberZNet 6.10 updates since then:

https://www.silabs.com/documents/public/release-notes/emberznet-release-notes-6.10.0.0.pdf

EmberZNet 6.10.2.0 was released on the 8th of September of 2021

https://www.silabs.com/documents/public/release-notes/emberznet-release-notes-6.10.2.0.pdf

EmberZNet 6.10.1.0 was released on the 21st June of 2021

https://www.silabs.com/documents/public/release-notes/emberznet-release-notes-6.10.1.0.pdf

EmberZNet 6.10.3.0 was released on the 13th October of 2021

https://www.silabs.com/documents/public/release-notes/emberznet-release-notes-6.10.3.0.pdf

FYI, Elelabs has now released EmberZNet v6.10 firmware for their EFR32 based adapters (based on EFR32MG12):

https://github.com/Elelabs/elelabs-zigbee-ezsp-utility/blob/master/data/EFR32MG13/ELE_MG13_zb_ncp_115200_610_211112.gbl

Elelabs/elelabs-zigbee-ezsp-utility@31f8e9c

Added

  • 6.10 Zigbee Firmware for ELU013/ELR023 (just keep up with the latest EmberZnet SDK)

Their firmware update tool has also been updated with a few new features:

Elelabs/elelabs-zigbee-ezsp-utility@721019c

Elelabs/elelabs-zigbee-ezsp-utility@e9b3fe1

Changed

  • ele_update parameters changed. Now the function only updates to latest version of available Zigbee or Thread firmware
  • probe and restart functions can now detect Thread adapters as well

/usr/bin/env: 'python': No suck file or directory

After following all of the steps down to running ./ncp.py scan I get this error message. I'm trying as root, installed all prerequisite dependencies from what I can tell. I also found an alternate ncp.py file on another site and gave that a try and got "permission denied" so I went back to the included one.

I'm new on Linux, but can work my way through most things.

Can't upgrade

Following directions, looks like the stick is sending a welcome banner of some sort and that is confusing the upgrade process.
https://imgur.com/a/N6asHAN

The stick is currently on 5.4.1-194 (see image)

Exception: <class 'IndexError'>

Wish I knew what was going on here.

Installed serial, xmodem and pyserial and when I scan, I get the following:

python ncp.py scan
Exception: <class 'IndexError'> COM4
Exception: <class 'IndexError'> COM5
{"ports": [{"port": "COM4", "deviceType": "unknown"}, {"port": "COM5", "deviceType": "unknown"}]}

Upgrade hangs at "CEL stick" step

I was unable to upgrade a HUSBZB-1 (5.4.1-192) using the docker image. Restarting the computer and unplugging and re-plugging the stick didn't fix the issue.

sudo docker run --rm --device=/dev/ttyUSB1:/dev/ttyUSB1 -it walthowd/husbzb-firmware bash

cd /tmp/silabs

./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
{"ports": [{"stackVersion": "5.4.1-194", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.6.5.ebl
Restarting NCP into Bootloader mode...
CEL stick
^CTraceback (most recent call last):
File "./ncp.py", line 459, in
flash(args.port,args.file)
File "./ncp.py", line 310, in flash
ser.readline() # read blank line
File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 565, in read
ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
KeyboardInterrupt

[REQUEST] em3587 Bitronvideo BV 2010/10

are you able to add support for em3587 Bitronvideo BV 2010/10. grobasoz/zigbee-firmware#15 links to the correct firmware and i was able to get it flashed by your code if i edited the pid vid and serial speed to match my stick

originally when i ran the scan i got "vid": "10C4", "pid": "8B34", "deviceType": "unknown"}]} stock speed is 56700 made the edit to ncp.py and i got the current version reported and was able to flash the correct firmware

Problem running the python script.

Hi,

The python script, doesn't seem to detect the device.

└──╼ $./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
Exception: <class 'serial.serialutil.SerialException'> /dev/ttyUSB1
Connecting to.. /dev/ttyUSB0 57600 True False
Exception: <class 'serial.serialutil.SerialException'> /dev/ttyUSB0
{"ports": [{"port": "/dev/ttyUSB1", "vid": "10C4", "pid": "8A2A", "deviceType": "unknown"}, {"port": "/dev/ttyUSB0", "vid": "10C4", "pid": "8A2A", "deviceType": "unknown"}]}

I'm pretty sure i have everything setup correctly. Anyone else got this error?

Updated EM357 NCP firmware "IKEA battery draining fix"

ZHA is having problems with IKEA controllers is draining there batteries and wasn't finding the problem for that but its looks being Sonoff Zigbee bridge that is triggering it most (EFR32 second gen).
Tasmoat devs have disabled attribute reporting for all IKEA controllers for trying going around the problems. Last week is also reported that Philips HUE dimmer switch is making the same => disabling attribute reporting in tasmota.
Also deCOZ is having problems with Samsung and IKEA controllers is draining batteries and have pinpointing that the pull control is not being setted up OK and making the devices staying in short pull mode for infinity so they is redoing the pull control for this devises.

Then having finding the silabs NCP bug in the 6.7.8.0 release i have getting one firmware update for Sonoff zigbee bridge (unsigned then the we dont thwe the cert for signing it) and my "IKEA Billy EZSP". Both firmware is tested by our cooker but not verified to working from the user base but should being OK.

Then its one ZHA user with EM357 stick that is also having the battery draining problems that we cant explaining :-((

So i have asking the cooker if hi can doing one new firmware for that chip also and hi have done it.
Its not tested on the specific hardware then hi dont have time for doing it for the moment.

So i asking can some of the experien EM3XX user trying it out if its working and if OK adding it in this repro and if not then we is deleting the files then its bad if they is circulating and crashing / making problems for users.

Link to the firmware: https://github.com/grobasoz/zigbee-firmware/tree/master/EM357

2 things: USB serial was disabled by Silabs in app bilder but is still in the code base so little tricky to get it working. Its one EZSP protocol version 8 and not backward compatible with lower protocols !!

Pleas informing us if its working or not !!

Mvh Mattias

Exec format error

Running the given command gives a format error from Docker:

$ docker run --rm --device=/dev/ttyUSB1:/dev/ttyUSB1 -it walthowd/husbzb-firmware
standard_init_linux.go:211: exec user process caused "exec format error"

I'm able to manually clone the repo, build it, and run it, so I'm not sure what exactly the problem is. This is on an RPi 4 running Ubuntu 20.04.

Scan Not reporting Version

The update ultimately worked (I think)
But when I ran the scan tool (./ncp.py scan)
It hung at USB0 (needed a cntl c)
And then it reported this:

{"ports": [{, "deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}.....[snip]

The update reported that it was successful, and the HUSBZB is working perfectly back on the HA Pi4, but even after the firmware update it refused to report its version.

To do the version update I used a second Rasperry Pi4. Running a "full version" of Raspberrian and Python3

[COMPATIBILITY] Can anyone confirm comatibility with ITead’s new “Sonoff Zigbee 3.0 USB Dongle Plus V2” model “ZBDongle-E” based on Silicon Labs EFR32MG21

Has anyone confirmed if this Zigbee coordinator firmware updater image from @walthowd is compatible with ITead’s new “Sonoff Zigbee 3.0 USB Dongle Plus V2” model “ZBDongle-E” based on Silicon Labs EFR32MG21

ITead just released a new "ZBDongle-E" adapter as an improved version of their old/previous barebone Silabs EFR32MG21 based Zigbee 3.0 USB adapter from ITead and this new variant is to be sold side-by-side as an alternative to ITead's TI CC2652P based "Sonoff Zigbee 3.0 USB Dongle Plus" (which is now renamed to "ZBDongle-P"), meaning they will continuously sell both variants.

https://itead.cc/product/zigbee-3-0-usb-dongle/

https://sonoff.tech/product-review/sonoff-zigbee-3-0-usb-dongle-plus-tutorials/

https://sonoff.tech/wp-content/uploads/2022/08/SONOFF-Zigbee-3.0-USB-dongle-plus-firmware-flashing-.pdf

image

This new “Sonoff Zigbee 3.0 USB Dongle Plus V2” adpater can be a little confusing to buyers as it looks the same as Sonoff Zigbee 3.0 USB Dongle Plus V2” and both this "ZBDongle-E" variant and the "ZBDongle-P" variant is market as being able to act either a Zigbee Coordinator (by default) or Zigbee Router device (if flashed with such firmware instead), and if flash OpenThread/Spinel Radio Co-Processor (RCP) firmware also Thread network protocol for the upcoming Matter/CHIP standard (Project Connected Home over IP). As Silicon Lab and Texas Instruments adapters offer different compatibility ITead will now sell both of these so users will now have more options as different DIY home automation software applications offer might not be fully compatible with one or the other (Home Assistant's ZHA integration is however fully compatible with both so based in just the specification they should in theory offer similar performance on paper).

Comparing "ZBDongle-P" vs. "ZBDongle-E" vs. barebone EFR32MG21 dongle

https://community-assets.home-assistant.io/original/4X/2/9/d/29dc429141353119ad34f33516ed61f5fc2b3af3.png verses
image
verses
image

Feature/Model ZBDongle-P ZBDongle-E 9888010100045
Radio SoC/MCU chip Texas Instruments CC2652P Silicon Labs EFR32MG21 Silicon Labs EFR32MG21
Zigbee Stack (Serial Interface Protocol API/CLI) Z-Stack v3 (ZNP 3) EmberZNet (EZSP v8) EmberZNet (EZSP v8)
Optional Zigbee Router firmware Yes (9dBm firmware available from Koenkk) Yes (20dBm firmware available from ITead) Yes (20dBm firmware available from ITead)
USB to UART/Serial Converter Chip CP2102 or CP2102N CH9102F CH340
USB EEPROM Product Description ID SONOFF Zigbee 3.0 USB Dongle Plus SONOFF Zigbee 3.0 USB Dongle Plus V2 None (no USB chip EEPROM)
Home Assistant USB Auto Disovery Yes Not yet Not possible
Flow Control None by default (Hardware flow control optional with alternative firmware and flipped dip-switch) Software flow control Software flow control
RF Transmit Output Power 9dBm (firmware hardcoded), Max: 20dBm 20dBm (default) 20dBm (default)
Antenna External (rotatable and tiltable) External (rotatable and tiltable) Onboard circuit board antenna
Enclosure/case Aluminum all-metal shell casing Aluminum all-metal shell casing None
Length 63mm 52mm ?
Packaging Retail-box with manual Retail-box with manual Anti-static bag only

Both their Silicon Labs and Texas Instruments adapters are compatible out-of-the-box with Home Assistant's ZHA integration which supports Silabs EZSP (EmberZNet Serial Protocol) as well as TI Z-Stack Serial Interface and even more manufacturers Zigbee adapters, so different benefits are that the same Silicon Labs EFR32MG21 based adapter is also used by Home Assistant SkyConnect USB Stick (as well as ITead's Sonoff ZBBridge and ZB-GW03 eWeLink Ethernet Zigbee Gateway which with Zigbee Coordinator NCP firmware they are compatible with OpenHAB's ZigBee Binding, Zigbee Plugin for Domoticz, and Zigbee Plugin for Jeedom, while the Texas Instruments CC2652P based adapter is also fully compatible with Zigbee2MQTT (a.k.a. Z2M) and IoBroker while their zigbee-herdsman library currently only has experimental support for Silicon Labs based adapters.

Zigbee 3.0 USB Dongle Plus - ZBDongle-E variant

https://itead.cc/product/zigbee-3-0-usb-dongle/

It uses the same EFR32MG21A020F768IM32 SoC used on the first ITead Zigbee 3.0 USB Dongle based on EFR32 Mighty Gecko Series 2, as well as on CoolKit Technologies "SM-011 V1.0" module used in the ITead Sonoff ZBBridge Zigbee Bridge and in Tuya ZS3L and Tuya ZSLC5 SoC modules. It includes a 80 MHz ARM Cortex-M33 core, 768 Flash Storage, 64 RAM, in a QFN32 package, which radio has + 20 dBm maximum power output and receive sensitivity of -104 (250 kbps O-QPSK DSSS) dBm.

image

image

ImportError: No module named serial

I have the Nortek HUSBZB-1 USB adapter connected to my machine but I am getting the error "ImportError: No module named serial". I can see it on /dev/ttyUSB1 but when I run the ncp.py scan script, i get this error. I am not using docker, running it directly with python on an ubuntu server. What am I missing here?

Inconsistency in readme.md

Readme.md states:
For advanced users - An alternative 115200 bps firmware image is available for HUSBZB-1, ncp-uart-sw-6.7.8-115k.ebl. This provides a faster pathway to the adapter but requires that new Home Assistant user manually input the serial path, radio type (EZSP) and bauddate when adding ZHA. Existing Home Assistant users will have to backup and edit the .storage/.core.config_entries file and update the listed baud rate

My .storage/.core.config_entries file does not contain any reference to HUSBZB-1 baud rate. Raspberry pi 3 home assistant os 6.2 ver core-2021.8.1. See below:
"entry_id": "d210882a593c42eeb9d3e5ddc87366cf",
"version": 1,
"domain": "zwave",
"title": "Z-Wave",
"data": {
"network_key": "",
"usb_path": "/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_C0F003F0-if00-port0"
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": null,
"disabled_by": null
},
{
"entry_id": "e8ba308ef3ab48a8ab627b59ec63f35c",
"version": 2,
"domain": "zha",
"title": "/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_C0F003F0-if01-port0",
"data": {
"device": {
"path": "/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_C0F003F0-if01-port0"
},
"radio_type": "ezsp"
},
"options": {
"custom_configuration": {
"zha_options": {
"enable_identify_on_join": true
}
}
},

Guessing that the correct syntax will be:"baud_rate": 115200, entered in both zwave "data" field and zha "data" fields. Haven't confirmed that yet.

Wouldnt have known syntax except that one of the integrations (mysensors) uses it with this format.

Notes: Regarding Scan(Nortek HUSBZB-1) : unkown version, loong hangs while running and fails

Hi, thanks for such an awesome thing ...!
I had a hard time running scan, here are some of my notes, hopefully helps, if not ok ...
In both windows and running debian buster in a VmWare VM I had the same problem, scan would run forever and eventually fail.
In both cases I found running python 2.7 does NOT work.
You must be running python 3.X
must use module pyserial not serial!, remove serial then add pyserial :
pip3 uninstall serial
pip3 install pyserial xmodem
i modified the script as follows:

def scan():
outjson = {'ports':[]}
for port in serial.tools.list_ports.comports():
if port.location is None or port.location=='2-2.2:1.0' : continue #===>optional what I found between windows and linux but could be different

This was most import to speed things up ::
# Init serial port
ser = serial.Serial(
timeout=2,
write_timeout=2,

then python3 ncp.py scan hopefully works :)
Regardless of running for Nortek HUSBZB-1, i believe the timeouts and python version 3 are essential.
One last thing: ncp-uart-sw-6.7.8-115k.ebl, this seems to only update BAUD rate but not flow control, still uses Software? Xon ?
Hope this helps!, thanks again for providing this~!
Regards,
-TD

Mistake in the manual?

Hello, tried to update my stick in manual mode. You say, that I need to run the command ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.6.3.ebl, but there is no such a file with firmware. In my Docker container I only have ncp-uart-sw.ebl

Exception: <type 'exceptions.TypeError'> /dev/ttyUSB1

I'm getting a TypeError when trying to scan GoControl HUSBZB-1. Scan fails, the flash seems to complete, but still unable to see anything on zigbee2MQTT.

OS: Raspbian GNU/Linux Buster (10) on Raspberry Pi 3b+

pi@homebridge:~/husbzb-firmware $ python2.7 ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
Exception: <type 'exceptions.TypeError'> /dev/ttyUSB1
Connecting to.. /dev/ttyUSB0 57600 True False
^CException: <type 'exceptions.KeyboardInterrupt'> /dev/ttyUSB0
Exception: <type 'exceptions.IndexError'> /dev/ttyAMA0
{"ports": [{"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}, {"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB0", "vid": "10C4"}, {"deviceType": "unknown", "port": "/dev/ttyAMA0"}]}
pi@homebridge:~/husbzb-firmware $ python2.7 ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.7.8.ebl
Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

Successfully restarted into bootloader mode! Starting upload of NCP image...
Finished!
Rebooting NCP...
pi@homebridge:~/husbzb-firmware $ python2.7 ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
Exception: <type 'exceptions.TypeError'> /dev/ttyUSB1
Connecting to.. /dev/ttyUSB0 57600 True False
^CException: <type 'exceptions.KeyboardInterrupt'> /dev/ttyUSB0
Exception: <type 'exceptions.IndexError'> /dev/ttyAMA0
{"ports": [{"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}, {"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB0", "vid": "10C4"}, {"deviceType": "unknown", "port": "/dev/ttyAMA0"}]}

Python 2's get-pip.py has moved

The Dockerfile in this repo no longer builds.

Step 7/13 : RUN python2 /tmp/get-pip.py
 ---> Running in ea2cacc91c26
Traceback (most recent call last):
  File "/tmp/get-pip.py", line 24226, in <module>                                                                                                       
    main()                                                                                                                                              
  File "/tmp/get-pip.py", line 199, in main                                                                                                             
    bootstrap(tmpdir=tmpdir)                                                                                                                            
  File "/tmp/get-pip.py", line 82, in bootstrap                                                                                                         
    from pip._internal.cli.main import main as pip_entry_point                                                                                          
  File "/tmp/tmpNrjNmz/pip.zip/pip/_internal/cli/main.py", line 60                                                                                      
    sys.stderr.write(f"ERROR: {exc}")          

The issue is the following line in the Dockerfile:

RUN curl https://bootstrap.pypa.io/get-pip.py --output /tmp/get-pip.py

This references a file which has moved (see related stack overflow issue).

Nortec combo stick not found.

I have a NortecHUSBZB-1 stick. It is recognised as ttyUSB0 and ttyUSB1 in my Linux machine but the ncp.py scan command fails to find it.

Exception: <class 'IndexError'> /dev/ttyS0
Connecting to.. /dev/ttyUSB1 57600 True False
Connecting to.. /dev/ttyUSB0 57600 True False
No ZigBee Ack. /dev/ttyUSB0
{"ports": [{"port": "/dev/ttyS0", "deviceType": "unknown"}, {"port": "/dev/ttyUSB1", "vid": "10C4", "pid": "8A2A", "deviceType": "zigbee", "stackVersion": "5.4.1-194"}, {"port": "/dev/ttyUSB0", "vid": "10C4", "pid": "8A2A", "deviceType": "unknown"}]}

115200 hardware flow control verses 57600 software flow control Silicon Labs EmberZNet NCP EZSP firmware

@walthowd FYI, submitted PR to update bellows README for zigpy with more info about flow control speeds in zigpy/bellows#391

Note that there are generally two image versions of the Silabs EmberZNet NCP firmware in use. One version operates at a baud rate of 115200 with RTS/CTS flow control (i.e. hardware flow control), the other operates at a lower baud rate of 57600 with XON/XOFF flow control (i.e. software flow control). If you are flashing firmware image to your own EM35x or EFR32 adapter then it is advisable to use a version with hardware flow control, Many available commercial dongles (e.g. Nortek HUSBZB-1) seem to ship pre-flashed with a firmware that uses the lower speed and software flow control.

Paraphrased from https://www.openhab.org/addons/bindings/zigbee/#ember-ezsp-ncp-coordinator

Does this also update Zwave firmware

More of a question than an issue. First thanks for the great work here, I just updated my HUSBZB stick w/o issue. Doing the reading on it and digging around I'm getting the feeling that this might only upgrade the ZigBee firmware on the stick, leaving the ZWave firmware untouched.

Am I totally misinterpreting what I'm reading?

Old Elelabs Zigbee radio modules

Pre advising of likely upcoming device support.
Elelabs Zigbee have 2 old radio modules with unknown firmware that is based on the EM357:
Elelabs Zigbee Raspberry Pi Shield EZBPIS and Elelabs Zigbee USB Adapter EZBUSBA.
I think your updater can manager the USB one but perhaps not the PI shield.
I have not finding any hardware info (i have not searching so well) so i dont knowing is the "Gary" standard firmware is working. Hopefully they have using Silabs reference design and its working out of the box.

I have one user with the famous IKEA battery draining with one of this but i cant recommending testing the new firmware then i dont have the knowledge to recovering it if its not working.
Is it possible reading the EM35Xs flash with SWD flasher and flashing it back if the upgrade is not working like with the EFR32 ones (dumping bin files and converting then to ELF files and flashing them back) ?

If hi is interested i have recommended hi asking in your git for advise.

Elelabs is also having one pair of EFR32MG1B modules that is also not have getting one updated firmware but primary not your problem and is making no sin abusing Gary with no user case firmware requests until some user is asking for it.
I putting them on on the list with not cocked firmware.

Its only one "information" that can being good to knowing and no need any work being done then its not being one user case of it.

Thanks for great work done !!

Programming just hangs.

Using the docker image on Ubuntu running on an Intel NUC.

This is the output I see.

`root@66782e20ef37:/tmp/silabs# ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
{"ports": [{"port": "/dev/ttyUSB1", "vid": "10C4", "pid": "8A2A", "deviceType": "zigbee", "stackVersion": "5.4.1-194"}]}
root@66782e20ef37:/tmp/silabs# ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.7.8.ebl
Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

`

At this point the system just hangs. I left it for 30 minutes but it never got nay further.

Upgrade attempt returns "2. run" and hangs

Thanks for putting this together.
Just a note, not really an issue as it worked on second attempt.

First time I tried to upgrade, I got 2. run after CEL stick and it just hung there.

After I stopped the script I re-plugged my stick and it worked fine.

Not certain if it should be recommended to cycle/reboot the stick prior to running this. This one had a few months of uptime on it.

root@ad504461efa8:/tmp/silabs# ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False 
{"ports": [{"stackVersion": "5.4.1-194", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
root@ad504461efa8:/tmp/silabs# ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.6.5.ebl 
Restarting NCP into Bootloader mode...
CEL stick
2. run

^CTraceback (most recent call last):
  File "./ncp.py", line 449, in <module>
    flash(args.port,args.file)
  File "./ncp.py", line 315, in flash
    ser.readline() # 2. run
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 483, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
KeyboardInterrupt
root@ad504461efa8:/tmp/silabs# ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False 
Exception: <class 'serial.serialutil.SerialException'> /dev/ttyUSB1 
{"ports": [{"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
root@ad504461efa8:/tmp/silabs# ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False 
{"ports": [{"stackVersion": "5.4.1-194", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
root@ad504461efa8:/tmp/silabs# ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.6.5.ebl 
Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

Successfully restarted into bootloader mode! Starting upload of NCP image... 
Finished!
Rebooting NCP...
root@ad504461efa8:/tmp/silabs# ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False 
{"ports": [{"stackVersion": "6.6.5-204", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
root@ad504461efa8:/tmp/silabs# 

Starts bootloader but doesn't recognize success?

I'm having the same issue as #50 (but I'm posting a new issue because the Cyrillic topic probably isn't helpful to most users, no offense intended).

I'm trying to flash ncp-uart-6.7.8-115k.ebl on nortek husbzb-1 with 5.4.1-194 (brand new device) using the docker image. After 'CEL stick' I get 'EM3581 Serial Bootloader v.5.4.1.0 b962' followed by a newline and then the script hangs (and I have to kill it). Good news is no damage done to the device, but other than than nothing seems to happen.

I initiatized my device in minicom and it reacts as expected (both from the README and how the script works), and a string of 'C's were received. However, for some reason we don't get to L364 ('Successfully restarted ...') in ncp.py. Looking for suggestions.

husbzb-firmware/ncp.py

Lines 343 to 364 in d6a512c

else:
ser.readline() # 1. upload gbl or ebl
ser.readline() # 2. run
ser.readline() # 3. ebl info
# Enter '1' to initialize X-MODEM mode
ser.write(b'1')
time.sleep(1)
# Read responses
ser.readline() # BL > 1
ser.readline() # begin upload
# Wait for char 'C'
success = False
start_time = time.time()
while time.time()-start_time < BOOTLOADER_INIT_TIMEOUT:
if ser.read() == b'C':
success = True
break
if not success:
print('Failed to restart into bootloader mode. Please see users guide.')
sys.exit(1)
print('Successfully restarted into bootloader mode! Starting upload of NCP image... ')

Can't connect to my device

Hello, trying to update my ZigBee adapter with your tool and something going wrong, when ncp.py trying to connect to my stick. When I run ./ncp.py scan it says "Connecting to.. /dev/ttyUSB1 57600 True False" and then nothing happens until I hit Ctrl-C and get the next:
^CException: <type 'exceptions.KeyboardInterrupt'> /dev/ttyUSB1 {"ports": [{"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
So, it looks like the tool sees my adapter, but freezes on connecting to it. Any thoughts?

[REQUEST] EmberZNet 6.7.10.0 (6.7.10.x) Zigbee Coordinator firmware images?

FYI; Silicon Labs has released Silabs Zigbee EmberZNet SDK 6.7.10.0 GA bug-fix release which includes support for EM358x/EM35x:

https://cn.silabs.com/documents/public/release-notes/emberznet-release-notes-6.7.10.0.pdf

This obviously superseded and repaces 6.7.9.0, 6.7.8.0, etc. and should be compatible with all the same chips.

Disclaimer: While don't have an EM3581 based adapter myself I like would to request prioritized a new 6.7.10.x firmware update for it. The reason for this request is a lot of people already got Nortek HUSBZB-1 stick who upgrade via walthowd's husbzb-firmware

[COMPATIBILITY] Cortet ZM3588S-USB or ZM357S-USB EM35x USB Sticks by CEL?

Just a curious question as I do not actually own any of these myself and do not plan on buying them, nor recommend them myself:

Anyone tested if these "Cortet" EM3588 / EM357 based radios from CEL can be flashed/updated via walthowd's husbzb-firmware?

Anyone tried to flash them with newer EmberZNet firmware to upgrade them? https://github.com/grobasoz/zigbee-firmware

grobasoz mentioned he tested his EM3581 firmware image on another EM3588 based adapter he had and it worked for him.

Note! This may require defining a baud rate of 115200 instead of 57600 which I believe is the baud rate on the default firmware(?).

"MeshConnect" EM35x based USB sticks/dongles/adapters in the "Cortet" series by CEL (California Eastern Laboratories):

CEL Cortet ZM3588S-USB (EM3588 / EM358x Zigbee chip by Silicon Labs)

CEL Cortet ZM357S-USB (EM357 / EM357x Zigbee chip by Silicon Lab)

Also, they have matching +20dBm models in LR (long-range) versions however they had some hint that may ship Thread firmware:

CEL Cortet ZM3588S-USB-LR (EM3588 / EM358x Zigbee chip by Silicon Lab)

CEL Cortet ZM357S-USB-LR (EM357 / EM357x Zigbee chip by Silicon Lab)

https://github.com/zigpy/zigpy/files/6409608/3388832429388690em357_usb_sticks_ds.pdf

image

They are not very expensive today and seem to be sold all around the world by quite a lot of major electronics distributors.

The official Ember documentation from CEL says they support Silicon Labs EmberZNet PRO ZigBee stack and serial interface:

http://www.cel.com/pdf/datasheets/EM357_USB_Sticks_DS.pdf

http://www.cel.com/product.do?command=viewOverview&group=6

https://github.com/zigpy/zigpy/files/6409608/3388832429388690em357_usb_sticks_ds.pdf

I'm not asking for buying advice as already have other adapters but only requesting info for reference and compatibility lists:

https://www.home-assistant.io/integrations/zha/

PS: I first found out about these reading the OpenHAB Supported Coordinators under their ZigBee Binding documentation:

https://www.openhab.org/addons/bindings/zigbee/

"57600bps
Software flow control
High RAM
"

syntax error in ./ncp.py

i am running docker run --device=/dev/ttyUSB1:/dev/ttyUSB1 -it walthowd/husbzb-firmware bash
root@e72525a1e48d:/tmp/silabs# ./ncp.py scan
File "./ncp.py", line 211
return ERROR_NCP_WRONG_EZSP_VERSION
looks like a result of recent change

Minicom upload fails with error 0x001B

Minicom upload fails with error 0x001B, which I think means that it timed out while waiting for me to upload a file. Thing is, I am selecting a file to upload, minicom just seems to be ignoring it.

Am I just using minicom wrong?

Thanks

Note: I am not hitting ctrl-c at any point in this screen capture. I could re-upload with a keylogger if that's useful.

Screencast.2022-12-07.02.22.18.webm

2022-12-07_02-43

$ minicom --version
minicom version 2.7.1 (compiled Jan  1 1980)

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.