ITead's "Sonoff Zigbee 3.0 USB Dongle Plus" (model "ZBDongle-P") based on Texas Instruments CC2652P +20dBm radio SoC/MCU

@chinhhut Auto-BSL (automatic BSL mode) activation/usage is explained on Electrolama’s website and cc2538-bsl readme, but note ITead/Sonoff do not implement it in standard Texas Instruments way:

https://electrolama.com/radio-docs/bsl/

https://github.com/JelmerT/cc2538-bsl/blob/master/README.md#cc26xx-and-cc13xx

Please also see the code of read cc2538-bsl, the related pull request and previous discussions there:

https://github.com/JelmerT/cc2538-bsl/pull/114

https://github.com/JelmerT/cc2538-bsl/issues/113

https://github.com/JelmerT/cc2538-bsl/issues/63

You can also see open-source hardware and firmware as Auto-BSL (Pin 2) is a feature most Texas Instruments CC dongles support:

https://github.com/Koenkk/Z-Stack-firmware/blob/1c3f97ca9ed3fea3112ee9c37012ba1d7907a0ef/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/1c3f97ca9ed3fea3112ee9c37012ba1d7907a0ef/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/

Example of some open source hardware (which ITead’s Sonoff ZBDongle-E is not as far as I know):

https://github.com/electrolama/zig-a-zig-ah

https://github.com/mercenaruss/zigstar_gateways

If want more info you might be best of asking the same question in https://github.com/Koenkk/Z-Stack-firmware/discussions and/or Koenkk/zigbee2mqtt · Discussions · GitHub are those are larger community for TI CC hardware and firmware enthusiasts.

But if you specifically want a hardware schematic of Sonoff ZBDongle-P then you have to ask ITead:

https://itead.cc/contact/

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

https://github.com/itead

PS: Please understand that I am only a hobbyist/and have no official affiliations with ITead/Sonoff.

1 Like

Thank you for your detail information. I will try to research more according to your suggestion.

FYI, Koenkk’s Z-Stack_3.x.0 coordinator 20230507 firmware images now released in master as stable:

https://github.com/Koenkk/Z-Stack-firmware/blob/4e888d3310eaf24c19699b00a29e24d512e49e8c/coordinator/Z-Stack_3.x.0/CHANGELOG.md

Make sure flash correct firmware! Sonoff ZBDongle-P → “CC1352P2_CC2652P_launchpad_*.zip

https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin

6 Likes

Thanks for your ever quick and comprehensive feedback/heads up on the subject Zigbee. Appreciated.

Can the Home Assistant Skyconnect be flashed with the ZBdongle-E firmware to act as a zigbee router device since they use the same chipset?

The “ZBDongle-P” dongle discussed in this thread does not use the same chip as Home Assistant SkyConnect as the “ZBDongle-P” dongle is based on a CC2652P chip from Texas Instruments, so I guess that you meant to post that question in the thread about “ZBDongle-E” dongle which is instead based on an EFR32MG21 chip from Silicon Labs → ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus V2” (model "ZBDongle-E") based on Silicon Labs EFR32MG21 +20dBm radio SoC/MCU

Better might be to instead ask agners that same question here → Home Assistant SkyConnect - official radio USB dongle will be compatible with both Zigbee and OpenThread (including Matter/CHIP over Thread) …or perhaps try open a new feature request issue asking to suggest a dedicated Zigbee Router firmware image for the SkyConnect dongle in this Nabu Casa repository → https://github.com/NabuCasa/silabs-firmware/issues

Regardless I would not try flashing a firmware image meant for a other adapter/board/device myself as you risk bricking it because is not only the chip that matters but the GPIO (general purpose input and output) ports/pads/pins that have been mapped for the firmware software designed for that specific circuit board that is inside each product.

That is, as the chip has multiple GPIO ports/pads/pins that could be used for many different things it is up to the developer of each circuit board to choose what port/pad/pin will be physically traced to which function and then define that by mapping the same in the firmware for that device.

There is no standard for what function GPIO pins should be mapped to, (but most do use same pads).

If you successfully flash a firmware image that did not use the same mappings then you have technically “bricked” it, in this case meaning that you can no longer flash it again via USB using the ROM Bootloader (BSL), so you must then “unbrick” it by buying/getting a cJTAG ( c/JTAG) adapter like J-Link to flash it manually via the developer pins, see → https://electrolama.com/radio-docs/advanced/flash-jtag/

2 Likes

Okay I am at my wits end with this dongle. I was able to flash it with firmware just fine, but I am still seeing it listed when doing lsusb as a “Silicon Labs CP210x UART Bridge” so I must have one of the early ones shipped from what I’ve read?

There’s supposedly a tool to do this, but I can’t find it anywhere, and the link i did find takes me to the sonoff site where it says the account has been “deactivated.”

So I have no clue what to do here. This is the last thing not working on my Pi, just sucks because I have a ton of sensors I’ve been waiting to test out. Any help where to source this tool would be outstanding.

As this product is still being sold I suggest you contact the official Sonoff/Itead and ask them to republish the script and tool needed to rename the USB product description on the CP2102 EEPROM.

However you should note that it only nice to have feature of USB automatic discovery which not a need to have feature, so the adapter should still be full functional, you will only need to select the device serial port and radio type manually when installing the ZHA integration.

There is more information on the USB auto discovery feature in this other thread here → Community help wanted to whitelist all compatible Zigbee and Z-Wave dongles/adapters for automatic USB Discovery in Home Assistant

Just installed the Python Z-Stack-firmware flashing method for the Coordinator Release (20230507) for the Sonoff ZBDongle-Plus (V1) on my macOS Monterey with this great and easy to follow tutorial made by Dennis van Dalen.

How to update Sonoff Zigbee 3.0 (ZBDongle-P) USB firmware using a Mac

In this tutorial we’ll be flashing the ZBDongle-P with the latest coordinator firmware — Without having to open the case.

❯ python3 cc2538-bsl.py -ewv -p /dev/tty.usbserial-FA420 --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
sonoff
Opening port /dev/tty.usbserial-FA420, baud 500000
Reading data from ./CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Your firmware looks like an Intel Hex file
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: xx:xx:xx:xx:xx:xx:xx:xx
    Performing mass erase
Erasing all main bank flash sectors
    Erase done
Writing 360448 bytes starting at address 0x00000000
Write 104 bytes at 0x00057F988
    Write done
Verifying by comparing CRC32 calculations.
    Verified (match: 0xe83aa727)

Home Assistant using ZHA.

1x ZBDongle-P flashed as Coordinator:
firmware CC1352P2_CC2652P_launchpad_coordinator_20230507.hex

5x ZBDongle-P flashed as Routers
firmware CC1352P2_CC2652P_launchpad_router_20221102.hex

  • Home Assistant 2023.8.4
  • Supervisor 2023.08.1
  • Operating System 10.5
  • Frontend 20230802.1 - latest

Just for anyone on ZHA who was curious like me and wants to check the version of firmware on the dongle. Just download the JSON backup and you have it at the bottom.

        "metadata": {
            "zstack": {
                "TransportRev": 2,
                "ProductId": 1,
                "MajorRel": 2,
                "MinorRel": 7,
                "MaintRel": 1,
                "CodeRevision": 20230507,
                "BootloaderBuildType": 0,
                "BootloaderRevision": null
            }
        },
2 Likes

Just to update all, after updating the firmware to the latest version, I see far less timeout errors in logs for ZHA, just the occasional. I used to get a lot of 1byte errors, but none so far for a week.

1 Like

FYI, some users are having issues with the 20230507 firmware version with new problem symtoms that they did have with the 20221226 firmware version. Koenkk have therefor compiled new test firmware and is asking for updated feedback here → Z-Stack_3.x.0 coordinator 20230901/20230902 feedback · Koenkk/Z-Stack-firmware · Discussion #474 · GitHub

2 Likes

Thanks Hedda, I will check it out.

I still have the same battery devices going unavailable but they still do work, they wake up after being pressed. There is one motion sensor though that does not. All routers are up however and stable. I replaced a bunch of Osram bulbs with IKEA bulbs, they were shit routers and the IKEA bulbs improved quite a bit the responsiveness of the network.

Just looking at the logs though, from a ZHA perspective it seems quite clean, just 3 timeouts, I am assuming those were the devices that became unavailable. Basically before my log used to be full of ZHA messages.

Regardless of the setup I highly reading and try following all these tips → Guide for Zigbee interference avoidance and network range/coverage optimization

1 Like

Thanks Hedda, your writeup is indeed my gospel for Zigbee. I have done almost all the items there:-

  1. Moved my zigbee channel to 11 (Wifi channels 1,2,3 are free in my home, all my neighbours are on wifi 11)
  2. USB powered cable to extend the dongle to the middle of the house
  3. Have 2 Sonoff Dongle Plus acting as routers

I am pretty much happy with the setup so far, it is rock solid, I have 140 devices on the network so it is fairly large. 50 of them are routers, the rest end devices.

It is always the same 3 end devices that go offline, might be that they arent binding correctly, 1 is a sonoff contact sensor, 1 ikea switch and 1 aqara motion sensor. I have other same devices in the network but they are rock solid. Funny thing is that even though they are unavailable, they still work if triggered.

1 Like

Hi, I have been a smartthings user for 7 years switching to home assistant. New to the community. Can you please let me know if I should buy a sonoff E or P dongle. Also looking for a z-wave dongle as I have a few z-wave devices too. Thanks

At this community we assume you are able to use the search function. This thread is specifically for the p version. Advice on what to buy can be found on lots and lots of other threads.

TLDR
Both can be used for ZHA, E is never and there pairing issues reported, not so much for P but E is the same chip as Home Assistant is using natively in the yellow and the new skynet connect dongle

Z2MQTT only option is P for stability, E is experimental

But use the search for more detailed info, I have both dongles but havent tested the E (dreading the repairing so leaving it when the wife is out for a while :slight_smile: )yet but might move to it soon as I am predominantly ZHA user and would be good to have a native HA dongle.

2 Likes

Just a follow on from this comment, I finally rollback to the 221226 release. Even though the 20230507 release seemed snappier in the beginning, but after a few days, everything seemed very slow. I had a bunch of lights not changing state in HA, started to be annoying as I had to press battery buttons multiple times for it to respond as it didnt have the correct state in HA.

221226 has issues too but seemed more stable

@sapstar While better if you search or start a new thread for more opinions, I would advise that you buy one of each, or even multiple of each, as you can reflash either of those to a dedicated Zigbee Router device by using USB-changer(s) for powering them, and it is highly recommended to have a few “known good” Zigbee Router devices. Read and follow these tips → https://community.home-assistant.io/t/guide-for-zigbee-interference-avoidance-and-network-range-coverage-optimization/515752

As mentioned, if ever going to use Zigbee2MQTT/Z2M then using a ZNP radio like the CC2652 based ZBDongle-P is the only recommended way to go today, (because EZSP radios like the ZBDongle-E support is still missing a couple of key features Zigbee2MQTT/Z2M to be in feature parity with ZNP).

ZBDongle-E can be reflashed to support Thread (for Matter support) or even Multi-PAN RPC for running Zigbee and Thread at the same time, but personally I recommend only using one protocol per dongle, so the best will be to use two separate radio dongles for Zigbee and Thread regardless of radio type used.

If using the ZHA integration then migrating radio type from one type to another type is very easy to migrate and no repair is required if going between ezsp, znp, and deconz radios → https://www.home-assistant.io/integrations/zha#migrating-to-a-new-zigbee-coordinator-adapter-inside-zha

5 Likes