Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBTR Add-on won't automatically flash firmware for SONOFF Dongle-E #3668

Open
derbirch opened this issue Jun 27, 2024 · 10 comments
Open

OBTR Add-on won't automatically flash firmware for SONOFF Dongle-E #3668

derbirch opened this issue Jun 27, 2024 · 10 comments

Comments

@derbirch
Copy link

Describe the issue you are experiencing

New version of OBTR Add-on won't recognize SONOFF Dongle-E and flash firmware for it. Both HAOS and supervised install would counter this issue with two dongle-e I have.

No firmware found for the selected device, assuming firmware is installed.

-----------------------------------------------------------
 Add-on: OpenThread Border Router
 OpenThread Border Router add-on
-----------------------------------------------------------
 Add-on version: 2.8.0
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 11 (bullseye)  (aarch64 / qemuarm-64)
 Home Assistant Core: 2024.6.4
 Home Assistant Supervisor: 2024.06.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service banner successfully started
s6-rc: info: service universal-silabs-flasher: starting
[22:52:10] INFO: Checking /dev/ttyUSB1 identifying Sonoff Zigbee 3.0 USB Dongle Plus from ITead.
[22:52:10] WARNING: No firmware found for the selected device, assuming firmware is installed.
s6-rc: info: service universal-silabs-flasher successfully started
s6-rc: info: service otbr-agent: starting
[22:52:11] INFO: Setup OTBR firewall...
[22:52:11] INFO: Starting otbr-agent...
s6-rc: info: service otbr-agent successfully started
s6-rc: info: service otbr-agent-rest-discovery: starting
s6-rc: info: service otbr-agent-configure: starting
s6-rc: info: service otbr-web: starting
s6-rc: info: service otbr-web successfully started
[22:52:12] INFO: Starting otbr-web...
otbr-web[266]: [INFO]-WEB-----: Running 0.3.0-41474ce-dirty
otbr-web[266]: [INFO]-WEB-----: Border router web started on wpan0
Done

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

OpenThread Border Router

What is the version of the add-on?

2.8.0

Steps to reproduce the issue

  1. Configure OTBR add-on, select device, 460800 Baudrate, toggle off Hardware flow control
  2. Start the add-on

System Health information

System Information

version core-2024.6.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.33-haos
arch x86_64
timezone Asia/Shanghai
config_dir /config
Home Assistant Cloud
logged_in false
can_reach_cert_server pending
can_reach_cloud_auth pending
can_reach_cloud pending
Home Assistant Supervisor
host_os Home Assistant OS 12.4
update_channel beta
supervisor_version supervisor-2024.06.2
agent_version 1.6.0
docker_version 26.1.4
disk_total 30.8 GB
disk_used 6.4 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization vmware
board ova
supervisor_api ok
version_api ok
installed_addons Matter Server (6.1.2), Silicon Labs Flasher (0.2.3), Terminal & SSH (9.14.0), Mosquitto broker (6.4.1), eWeLink Smart Home (1.4.3), File editor (5.8.0), Zigbee2MQTT (1.38.0-1), OpenThread Border Router (2.8.0)
Dashboards
dashboards 3
resources 0
views 1
mode storage
Recorder
oldest_recorder_run June 19, 2024 at 2:56 AM
current_recorder_run June 27, 2024 at 2:48 PM
estimated_db_size 15.50 MiB
database_engine sqlite
database_version 3.44.2

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

No response

Additional information

No response

@agners
Copy link
Member

agners commented Jun 27, 2024

Hm, afaik this model should be supported by #3628. @darkxst thoughts?

@darkxst
Copy link
Contributor

darkxst commented Jun 27, 2024

[22:52:10] INFO: Checking /dev/ttyUSB1 identifying Sonoff Zigbee 3.0 USB Dongle Plus from ITead.

Product string doesnt match. I would think from that string, this maybe a ZBDongle-P (cc2652).
@derbirch are you sure this is a ZBDongle-E?

I have however heard newer ZBDongle-E are now shipping with CP2102N (instead of CH9102), I suppose its possible they changed the strings at the same time. It would however seem strange to have the same product string on 2 products with completely different chipsets!

For reference SONOFF Zigbee 3.0 USB Dongle Plus V2 is the product string I filtered on in the auto firmware updater.

@derbirch
Copy link
Author

[22:52:10] INFO: Checking /dev/ttyUSB1 identifying Sonoff Zigbee 3.0 USB Dongle Plus from ITead.

Product string doesnt match. I would think from that string, this maybe a ZBDongle-P (cc2652). @derbirch are you sure this is a ZBDongle-E?

I have however heard newer ZBDongle-E are now shipping with CP2102N (instead of CH9102), I suppose its possible they changed the strings at the same time. It would however seem strange to have the same product string on 2 products with completely different chipsets!

For reference SONOFF Zigbee 3.0 USB Dongle Plus V2 is the product string I filtered on in the auto firmware updater.

Yes, I am sure. I managed to flash firmware using the command line tool for the two dongles with Dongle-E firmware from your repository. https://github.com/darkxst/silabs-firmware-builder/tree/main/firmware_builds/zbdonglee

@darkxst
Copy link
Contributor

darkxst commented Jun 27, 2024

@derbirch Can you post the full output from the HA hardware page for the USB serial port?

@derbirch
Copy link
Author

@derbirch Can you post the full output from the HA hardware page for the USB serial port?

ttyUSB1
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d007474252fded11bb770765024206e6-if00-port0

Subsystem:
tty
Device path:
/dev/ttyUSB1
ID:
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d007474252fded11bb770765024206e6-if00-port0
Attributes:
DEVLINKS: >-
  /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d007474252fded11bb770765024206e6-if00-port0
  /dev/serial/by-path/platform-fc800000.usb-usb-0:1.2:1.0-port0
DEVNAME: /dev/ttyUSB1
DEVPATH: /devices/platform/fc800000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB1/tty/ttyUSB1
ID_BUS: usb
ID_MODEL: Sonoff_Zigbee_3.0_USB_Dongle_Plus
ID_MODEL_ENC: Sonoff\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus
ID_MODEL_FROM_DATABASE: CP210x UART Bridge
ID_MODEL_ID: ea60
ID_PATH: platform-fc800000.usb-usb-0:1.2:1.0
ID_PATH_TAG: platform-fc800000_usb-usb-0_1_2_1_0
ID_REVISION: '0100'
ID_SERIAL: ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d007474252fded11bb770765024206e6
ID_SERIAL_SHORT: d007474252fded11bb770765024206e6
ID_TYPE: generic
ID_USB_DRIVER: cp210x
ID_USB_INTERFACES: ':ff0000:'
ID_USB_INTERFACE_NUM: '00'
ID_USB_MODEL: Sonoff_Zigbee_3.0_USB_Dongle_Plus
ID_USB_MODEL_ENC: Sonoff\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus
ID_USB_MODEL_ID: ea60
ID_USB_REVISION: '0100'
ID_USB_SERIAL: ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d007474252fded11bb770765024206e6
ID_USB_SERIAL_SHORT: d007474252fded11bb770765024206e6
ID_USB_TYPE: generic
ID_USB_VENDOR: ITead
ID_USB_VENDOR_ENC: ITead
ID_USB_VENDOR_ID: 10c4
ID_VENDOR: ITead
ID_VENDOR_ENC: ITead
ID_VENDOR_FROM_DATABASE: Silicon Labs
ID_VENDOR_ID: 10c4
MAJOR: '188'
MINOR: '1'
SUBSYSTEM: tty
TAGS: ':systemd:'
USEC_INITIALIZED: '568161419657'

@darkxst
Copy link
Contributor

darkxst commented Jun 27, 2024

It looks like Sonoff have used the ZBDongle-P cp2102 config in production of newer ZBDongle-E with cp2102.

Not sure what to do here, if we allow this string to match, it will also pick up the -P dongle, of course that won't flash, but will increase startup time while the dongle is probed and ultimately fails.

Right now I am not aware of any readily available Thread firmware for ZBDongle-P, but they may likely change in the future as word spreads about SMLIGHT supporting Thread on CC2652...

@agners: what are your thoughts on this? should match the new strings with the caveat it will also match ZBDongle-P?

@agners
Copy link
Member

agners commented Jun 27, 2024

@agners: what are your thoughts on this? should match the new strings with the caveat it will also match ZBDongle-P?

Hm, definitly not ideal UX I guess 😢 Ideally we'd have silabs flasher detect the TI chips too and dos something sensible 😅

Since this is limited to ITead, I don't mind all that much. If you prefer to go the easy route now and just try to flash either variant, that is fine by me...

@darkxst
Copy link
Contributor

darkxst commented Jun 27, 2024

Ideally we'd have silabs flasher detect the TI chips too

I almost forgot! It actually does work for detecting thread firmware. I've tested this before. Not sure if there is enough info to bail if its a TI chip, will check.

Otherwise yeh probably ust go the easy route for now, until there are actual TI Thread firmware in existence!

@darkxst
Copy link
Contributor

darkxst commented Jun 30, 2024

Ideally we'd have silabs flasher detect the TI chips too and dos something sensible

This is the spinel response in universal-silabs-flasher for TI Thread. So in this case can make silabs flasher be sensible 😉

2024-06-30 13:21:55.922 xps1520 universal_silabs_flasher.common DEBUG Sending data b'~\x83\x02\x02\xe65~'
2024-06-30 13:21:55.926 xps1520 universal_silabs_flasher.common DEBUG Received data b'~\x83\x06\x02OPENTHREAD/1.3.0.1; CC13XX_CC26XX; Jun 11 2024 04:59:11\x00\xd6\x9e~'
2024-06-30 13:21:55.928 xps1520 universal_silabs_flasher.spinel DEBUG Decoded HDLC frame: HDLCLiteFrame(data=b'\x83\x06\x02OPENTHREAD/1.3.0.1; CC13XX_CC26XX; Jun 11 2024 04:59:11\x00')
2024-06-30 13:21:55.928 xps1520 universal_silabs_flasher.spinel DEBUG Parsed frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_IS: 6>, data=b'\x02OPENTHREAD/1.3.0.1; CC13XX_CC26XX; Jun 11 2024 04:59:11\x00')

@Poshy163
Copy link

Poshy163 commented Jul 8, 2024

Just received mine from aliexpress today, strangely enough its not even auto flashing still, despite apparently hitting the requirements (other than the _ which may be the cause?);

strangely enough its not updating past the pre-flashed firmware of 2.3.1.0, logs from the add-on

image

USB:

/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230605160251-if00
/dev/serial/by-path/pci-0000:01:1b.0-usb-0:1:1.0
/dev/serial/by-path/pci-0000:01:1b.0-usbv2-0:1:1.0
DEVNAME: /dev/ttyACM0
DEVPATH: /devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-1/2-1:1.0/tty/ttyACM0
ID_BUS: usb
ID_MODEL: SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2
ID_MODEL_ENC: SONOFF\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus\x20V2
ID_MODEL_ID: 55d4
ID_PATH: pci-0000:01:1b.0-usb-0:1:1.0
ID_PATH_TAG: pci-0000_01_1b_0-usb-0_1_1_0
ID_PATH_WITH_USB_REVISION: pci-0000:01:1b.0-usbv2-0:1:1.0
ID_REVISION: '0442'
ID_SERIAL: ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230605160251
ID_SERIAL_SHORT: '20230605160251'
ID_TYPE: generic
ID_USB_DRIVER: cdc_acm
ID_USB_INTERFACES: ':020201:0a0000:'
ID_USB_INTERFACE_NUM: '00'
ID_USB_MODEL: SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2
ID_USB_MODEL_ENC: SONOFF\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus\x20V2
ID_USB_MODEL_ID: 55d4
ID_USB_REVISION: '0442'
ID_USB_SERIAL: ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230605160251
ID_USB_SERIAL_SHORT: '20230605160251'
ID_USB_TYPE: generic
ID_USB_VENDOR: ITEAD
ID_USB_VENDOR_ENC: ITEAD
ID_USB_VENDOR_ID: 1a86
ID_VENDOR: ITEAD
ID_VENDOR_ENC: ITEAD
ID_VENDOR_ID: 1a86
MAJOR: '166'
MINOR: '0'
SUBSYSTEM: tty
TAGS: ':systemd:'
USEC_INITIALIZED: '2248083'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants