(SONOFF) Zigbee 3.0 USB Dongle Plus
Allgemeines
Zur Anbindung von SONOFF-Sensoren/Aktoren ueber Zigbee ist dieser Stick wohl eine gute Wahl.
Interna und die Abgrenzung zur Dongle-E Variante finden sich hier
Um ihn in FHEM zu integrieren ist wohl ein Flashen mit einer neuen/anderen Firmware notwendig. Jetzt habe ich schon zweimal vage bleiben muessen. Man koennte natuerlich einfach davon ausgehen, dass auf dem Stick keine, die flasche (oder richtige;-) Firmware bereits drauf ist. In einem allgemeineren Artikel werde ich auch mal die Firmware genauer unter die Lupe nehmen.
Ich habe Dongle-P Hinweise nur im Modul 10_MQTT2_DEVICE.pm gefunden. Die Devices benoetigen zudem Tasmota als Firmware.
Auf der Suche nach der Firmware für das Dongle-P (CC2652P+CP2102N(ID 10c4:ea60 Silicon Labs CP210x UART Bridge)) bin u.a. auf ein Originaldokument gestoszen. Weiterhin gibt es diese Seite (? URL verloren), die den Prozess recht ausfuehrlich beschreibt, aber manchmal die Antwort nach dem Warum schuldig bleibt. Die "Originaldokumete" geben mir einfach ein besseres Gefuehl.
Fuer OpenHub und HomeAssistent klappt scheinbar die "ungeflashte" Anbindung.
The Zigbee 3.0 USB Dongle Plus comes pre-flashed with coordinator firmware, but if you would like to update, change to router firmware and add to the dongle or generate the firmware that supports hardware flow control, please read the following document.
ZBDongle-P (CC2652P) & ZBDongle-E (EFR32MG21) Firmware Flashing
Enable Hardware Flow Control and Generate Corresponding Firmware
SONOFF Zigbee 3.0 USB dongle plus firmware flashing
[https://sonoff.tech/wp-content/uploads/2022/05/Configuring-ZBDongle-P-Transmit-Power-Tutorial.pdf Configuring ZBDongle-P Transmit Power Tutorial]
Hardware
Feuer frei
worker:~ # python SONOFF_bootloader_activate_uartLog.py
This is a debug log
This is an info log
This is critical
An error occurred
/dev/ttyS0 - ttyS0
/dev/ttyUSB1 - Sonoff Zigbee 3.0 USB Dongle Plus
/dev/ttyUSB0 - USB2.0-Serial
Select the serial port (just enter the number of the serial port):/dev/ttyUSB1
open COM/dev/ttyUSB1 is fail!!!!
Das tool erwartet also ein Windows_Maschine. Grrrrr!
Patch
# SERIAL_PORT_CFG = {'name': "COM" + name, SERIAL_PORT_CFG = {'name': name,
Rumtesten
worker:~ # python SONOFF_bootloader_activate_uartLog.py
This is a debug log
This is an info log
This is critical
An error occurred
/dev/ttyS0 - ttyS0
/dev/ttyUSB1 - Sonoff Zigbee 3.0 USB Dongle Plus
/dev/ttyUSB0 - USB2.0-Serial
Select the serial port (just enter the number of the serial port):/dev/ttyUSB1
>>>>>>>>>>>>>>>> /dev/ttyUSB1 is opened.....
<queue.Queue object at 0x7f1399be9eb8>
<queue.Queue object at 0x7f1399be9358>
Write processing...
Write processing...
Read processing...
Log Print processing...
>>>>>>>>>>>>>>>> end
Auf das Kommando '55 55' erfolgte keine Antwort. Also mal noch was probieren.
worker:~ # python3.11 cc2538-bsl.py -b 115200 -p /dev/ttyUSB1
Opening port /dev/ttyUSB1, baud 115200
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:12:4B:00:2A:2F:0D:F2
worker:~ #
For ITead SONOFF Zigbee 3.0 USB Dongle Plus: For the CC2652P based "SONOFF Zigbee 3.0 USB Dongle Plus" (model "ZBDongle-P") adapter from ITead you need to invoke toggle to activate bootloader with --bootloader-sonoff-usb if you do not want to open its enclosure to manually start the bootloader with the boot button on the PCB.
worker:~ # python3.11 cc2538-bsl.py -b 115200 -p /dev/ttyUSB1 --bootloader-sonoff-usb -r dump.bin
sonoff
Opening port /dev/ttyUSB1, baud 115200
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:12:4B:00:2A:2F:0D:F2
Reading 524288 bytes starting at address 0x0
ERROR: Timeout waiting for ACK/NACK after 'Mem Read (0x2A)'
Software
ZigStar