(SONOFF) Zigbee 3.0 USB Dongle Plus

Aus TippvomTibb
Version vom 10. März 2024, 09:31 Uhr von Chris T. Ludwig (Diskussion | Beiträge) (→‎Allgemeines)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

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]

[1]

Hardware

SONOFF DongleP PCB.png


SONOFF DONGLEP PCB 2.jpg SONOFF DONGLEP PCB 1.jpg

Feuer frei

 1 worker:~ # python SONOFF_bootloader_activate_uartLog.py 
 2 This is a debug log
 3 This is an info log
 4 This is critical
 5 An error occurred
 6 
 7 /dev/ttyS0 - ttyS0
 8 /dev/ttyUSB1 - Sonoff Zigbee 3.0 USB Dongle Plus
 9 /dev/ttyUSB0 - USB2.0-Serial
10 Select the serial port (just enter the number of the serial port):/dev/ttyUSB1
11 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

 1 worker:~ # python SONOFF_bootloader_activate_uartLog.py 
 2 This is a debug log
 3 This is an info log
 4 This is critical
 5 An error occurred
 6 
 7 /dev/ttyS0 - ttyS0
 8 /dev/ttyUSB1 - Sonoff Zigbee 3.0 USB Dongle Plus
 9 /dev/ttyUSB0 - USB2.0-Serial
10 Select the serial port (just enter the number of the serial port):/dev/ttyUSB1
11 >>>>>>>>>>>>>>>> /dev/ttyUSB1 is opened.....
12 <queue.Queue object at 0x7f1399be9eb8>
13 <queue.Queue object at 0x7f1399be9358>
14 Write  processing...
15 Write  processing...
16 Read processing...
17 Log Print processing...
18 >>>>>>>>>>>>>>>> end

Auf das Kommando '55 55' erfolgte keine Antwort. Also mal noch was probieren.

1 worker:~ # python3.11 cc2538-bsl.py -b 115200 -p /dev/ttyUSB1
2 Opening port /dev/ttyUSB1, baud 115200
3 Connecting to target...
4 CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
5 Primary IEEE Address: 00:12:4B:00:2A:2F:0D:F2
6 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.


1 worker:~ # python3.11 cc2538-bsl.py -b 115200 -p /dev/ttyUSB1 --bootloader-sonoff-usb -r dump.bin
2 sonoff
3 Opening port /dev/ttyUSB1, baud 115200
4 Connecting to target...
5 CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
6 Primary IEEE Address: 00:12:4B:00:2A:2F:0D:F2
7 Reading 524288 bytes starting at address 0x0
8 ERROR: Timeout waiting for ACK/NACK after 'Mem Read (0x2A)'


Software

ZigStar

[ZigStar MultiTool]


Flasher Kommandozeile

[PythonFlasher]