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

Router firmware with latest ezsp #15

Open
mamrai1 opened this issue Aug 30, 2023 · 30 comments
Open

Router firmware with latest ezsp #15

mamrai1 opened this issue Aug 30, 2023 · 30 comments
Labels
enhancement New feature or request

Comments

@mamrai1
Copy link

mamrai1 commented Aug 30, 2023

Can you please provide us with a router firmware based on 7.3.1.?
I'm using also a 2nd zbdongle-e with 6.10.3 firmware but old devices like xiaomi and bosch motion sensors based on zigbee 1.2 won't connect through it

@mamrai1
Copy link
Author

mamrai1 commented Aug 31, 2023

Update: After multiple tries i have managed to pair them through the router (near the router)

@mamrai1
Copy link
Author

mamrai1 commented Sep 15, 2023

i dare to declare that using ezp 7.3.1 as coordinator and a 2nd zbdongle-e as router (house with 2 floors-coordinator on upper floor and router on ground floor) my network is extremely stable! At least is way more stable than before using cc2652p as coordinator or router!

@supaeasy
Copy link

what router FW do you use?

@mamrai1
Copy link
Author

mamrai1 commented Sep 15, 2023

6.10.3 on 2nd zbdongle-e.. With cc2652p and latest firmware from koenkk after a double of days the router was not routing messages.. Something was crashing it

@darkxst
Copy link
Owner

darkxst commented Oct 11, 2023

Building router firmware would take significant changes to the builder scripts. I am not sure there is much benefit over using the 6.10.3 router firmware from iTead, however if there are specific bugs that can be fixed I might look into it at a later date.

@darkxst
Copy link
Owner

darkxst commented Oct 13, 2023

iTead's 6.10.3 router firmware will also work on all the same adapters as xsp1989's builds

@mamrai1
Copy link
Author

mamrai1 commented Oct 14, 2023

The trooth is that after 3 months the router with 6.10.3 is very stable..(way more stable than cc2652p). I only have one xiaomi door sensor that refuses to connect through it...Other than that zero problems!

@darkxst darkxst added the enhancement New feature or request label Dec 30, 2023
@Hedda
Copy link

Hedda commented Feb 14, 2024

I only have one xiaomi door sensor that refuses to connect through it.

FYI, check out these tips -> https://community.hubitat.com/t/xiaomi-aqara-devices-pairing-keeping-them-connected/623

Summery, many Aqara and Xiaomi have buggy firmware that makes them stick to the Zigbee Router they first connected to when initially paired/joined and therefore have to be factory reset and re-paired/re-joined manually to connect to other Zigbee Router.

Note that some Aqara and Xiaomi Zigbee devices are not fully compatible with all brands of Zigbee router devices. Xiaomi/Aqara devices are for example known not to work with Zigbee router devices from Centralite, General Electrics, Iris, Ledvance/OSRAM, LIGHTIFY/Sylvania, Orvibo, PEQ, Securifi, and SmartThings/Samsung. Better results can usually be achieved by using mains-powered Zigbee Router devices from IKEA and Nue/3A Home or dedicated DIY routing devices based on Texas Instruments CC253x/CC26x2 and XBee Series 2/3 Zigbee radios.

Also be patient as the pairing of some Zigbee devices may require multiple attempts and you may sometimes need to try again and again. Again, some devices, like example those from Xiaomi/Aqara, are known to not be 100% compliant with the standard Zigbee specifications and may therefore require many paring attempts over 10-20 minutes or longer.

@chris-1243
Copy link

chris-1243 commented Mar 13, 2024

It might not be the right place to ask. Anyone knows if a router firmware is available for the skyconnect?

I already use a Dongle-E as a router without any issues. I need a second router but the size of the Dongle-E doesn't suit my needs.

(Or any usb small dongle which accepts firmware router😉)

@darkxst
Copy link
Owner

darkxst commented Mar 13, 2024

router firmware is available for the skyconnect?

Router firmware would be a problem for skyconnect as it doesnt have a boot button. Once installed you wouldnt be able to flash ever again.

(Or any usb small dongle which accepts firmware router😉)

You could try SMLIGHT SLZB-07, I believe that has a router firmware available on the SMLIGHT web flasher.

@chris-1243
Copy link

Router firmware would be a problem for skyconnect as it doesnt have a boot button. Once installed you wouldnt be able to flash ever again.

Oups, I was not aware of this detail as I do not have one... It fully makes sense not to find any router firmware. Thanks

I will dig a bit internet with my google friend and see what I may find

@Hedda
Copy link

Hedda commented Mar 15, 2024

Router firmware would be a problem for skyconnect as it doesnt have a boot button. Once installed you wouldnt be able to flash ever again.

FYI, if you brick a such adapter where the board has not bootloader button then usually have to buy a debugger (debug probe) programmer to manually flash a new fimrware image via SWD or JTAG, and that needs to be compatible with new EFR32 chips, like example:

https://www.silabs.com/development-tools/wireless/simplicity-link-debugger (other other newish Segger J-Link debug probes).

Alternativly, if there is not a BTL button on the board then could try to figure out what pads/pins need to use manually short circuit as a workaround in order to manually enter into bootloader mode? Similar what can to do on old the HUSBZB-1 adapter -> https://github.com/walthowd/husbzb-firmware?tab=readme-ov-file#husbzb-1-firmware-recovery

https://github.com/walthowd/husbzb-firmware/blob/master/README.md#husbzb-1-firmware-recovery

HUSBZB-1 Firmware Recovery

In the event of a bad flash or unexpected event, the bootloader for the EM3581 on the HUSBZB-1 can be accessed by resetting the stick and shorting TP17 to GND with a serial connection (115200, 8/N/1, no hw or sw flow control).

On device startup, unshort TP17 and send a carriage return over the serial connection. You should be returned to the bootloader menu where a image can be uploaded via XMODEM.

image

An example of the process using minicom:

  • Connect the HUSBZB-1 to the USB port

  • Configure minicom with the right settings:

    $ minicom -s
       -> Select "Serial port setup"
       -> Type A and set the path of the device, ex: /dev/ttyUSB1
       -> Type E and set 115200 8N1 as the value
       -> Type F and G and choose: No
       -> Hit enter, save the settings, and exit minicom
    
  • Now you can open minicom again and keep it open

    $ minicom
    
  • Disconnect your HUSBZB-1 and open the case to be able to access the board (like in the previous image)

  • Short TP17 to GND with something like a paperclip (touch both connectors with the paperclip)

  • Connect the HUSBZB-1 to the USB port again, making sure the short is still on

  • Wait few seconds and unshort TP17 (release the paperclip)

  • Go back to minicom and hit enter few times. You should see a menu with the following elements. If you don't see it, the shorting probably didn't work well. Try to do it again:

    EM3581 Serial Bootloader v5.4.1.0 b962
    1. upload ebl
    2. run
    3. ebl info
    BL > 
    
  • Choose 1. and the stick will start waiting for you to send the firmware (you will see multiple Cs written in the screen)

  • Now type Ctrl+A Z to open the menu and select S (for sending the file). Choose xmodem and then navigate to the file, select it using spacebar and hit enter. In case it prompts you for the file name instead, write down the full path of the ebl file (ex: /tmp/silabs/ncp-uart-sw-6.6.5.ebl and hit enter.

  • Once the file has been completely sent (it can take a while), the process is done

  • Press enter to get back to the menu and now you can select 2 which will boot the new firmware and then just exit minicom using Ctrl+A Z X

@Hedda
Copy link

Hedda commented Mar 15, 2024

hmm, maybe I am wrong about this for the SkyConnect as believe that Nabu Casa has for example implemented a manufacturer specific command in their official OpenThread RCP firmware which has "back door" command for reset into bootloader that makes it possible to always access bootloader mode as long as use Nabu Casa's universal-silabs-flasher for flashing:

NabuCasa/silabs-firmware#6

NabuCasa/universal-silabs-flasher#13

@tl-sl
Copy link

tl-sl commented Mar 15, 2024

FYI, if you brick a such adapter where the board has not bootloader button then usually have to buy a debugger

Yes you can flash over SWD, JTAG or cJTAG depending what pins are exposed on the pcb. However this is probably beyond the average user that just wants router firmware!

Nabu Casa has for example implemented a manufacturer specific command in their official OpenThread RCP firmware

The reset to bootloader support for openthread is upstream now since about 2.3.x, so no longer specific NabuCasa builds. However this has nothing to do with bootloader reset from router firmware.

@Hedda
Copy link

Hedda commented Mar 18, 2024

Any chance someone here is interested in putting together a generic always-on Zigbee Router (ZR) device application for/with Silicon Labs Gecko SDK (GSDK) that could be reused in silabs-firmware-builder for building matching Zigbee Router firmware images to allow users to convert their Zigbee Coorindaotor USB dongles into dedicated Zigbee signal repeater / Zigbee range extender?

https://github.com/SiliconLabs/gecko_sdk

For reference, see Zigbee application samples/examples:

https://github.com/SiliconLabs/zigbee_applications

"The sample application provided is for ZigBee Router as a range extender. The router joins the coordinator and enables permit join. It then only handles the stack callbacks."

https://www.silabs.com/documents/login/user-guides/RS9113-ZigBee-Application-UserGuide.pdf

But since not all dongles have buttons I guess it would need be configured to automatically always try to join a Zigbee network for 60-seconds when power-on if it is not already joined to a Zigbee network + might also need way to reset devices with no button?

For example check out their "Zigbee Human Detection" example (functions as a always-on Zigbee Router device with join button):

https://github.com/SiliconLabs/zigbee_applications/tree/master/zigbee_human_detection

(and referencing basic policies -> https://github.com/SiliconLabs/zigbee_applications/tree/master/zigbee_network_traces )

Also check out these directly or indirectly related discussions about Zigbee Router device firmware for EFR32 based devices:

grobasoz/zigbee-firmware#24

grobasoz/zigbee-firmware#33

zigpy/zigpy#736

PS: Perhaps ask @xsp1989 if he would be willing to share the source and/or config for the Zigbee Router application he made?

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

@darkxst
Copy link
Owner

darkxst commented Mar 18, 2024

Since not all dongles have buttons

This is a problem, there is no way out of router firmware once flashed, as need hardware bootloader reset to re-flash normal firmware.

@Hedda
Copy link

Hedda commented Mar 18, 2024

This is a problem, there is no way out of router firmware once flashed, as need hardware bootloader reset to re-flash normal firmware.

So maybe not build Zigbee Router firmware images for dongles without buttons but instead only build for those with buttons?

@Hedda
Copy link

Hedda commented Mar 18, 2024

Any chance someone here is interested in putting together a generic always-on Zigbee Router device application for/with Silicon Labs Gecko SDK (GSDK) that could be reused in silabs-firmware-builder for building matching Zigbee Router firmware images to allow users to convert their Zigbee Coorindaotor USB dongles into dedicated Zigbee signal repeater / Zigbee range extender?

https://github.com/SiliconLabs/gecko_sdk

For reference, see Zigbee application examples:

https://github.com/SiliconLabs/zigbee_applications

Since not all dongles have buttons I guess it would need be configured to automatically always try to join a Zigbee network for 60-seconds when power-on if it is not already joined to a Zigbee network + might also need way to reset devices with no button?

For example check out their "Zigbee Human Detection" example (functions as a always-on Zigbee Router device with join button):

https://github.com/SiliconLabs/zigbee_applications/tree/master/zigbee_human_detection

By the way, if someone does make a such generic always-on Zigbee Router device application then it would be awesome if also make the the transmit power setting configurable over Zigbee in the same way that Koenkk's Z-Stack Router firmware is, see:

Koenkk/Z-Stack-firmware#341

That is, set the default transmit power to 9dBm but expose an optional attribute to change TX power up to 20 dBm via Zigbee:

https://github.com/Koenkk/Z-Stack-firmware/blob/master/router/Z-Stack_3.x.0/CHANGELOG.md

https://github.com/Koenkk/Z-Stack-firmware/blob/master/router/Z-Stack_3.x.0/firmware.patch

image

@xsp1989
Copy link

xsp1989 commented Mar 19, 2024

Since not all dongles have buttons

This is a problem, there is no way out of router firmware once flashed, as need hardware bootloader reset to re-flash normal firmware.

It is said that in the 6.x SDK, there is an API reset_resetWithReason(BOOTLOADER_RESET_REASON_BOOTLOAD) that can jump from APP to bootloaer, but this may require some special adaptation (using CLI or defining serial port commands by yourself). I have not conducted relevant tests on the GSDK of 7.X, but I believe it is available. Please note that this API seems to reference the relevant code in the bootloader through a struct. If there are different versions of the bootloader, incompatibility may occur. The simplest case is to use our ZB-GW04, because it provides a hardware button that can force the bootloader to stay at any time.

@Hedda
Copy link

Hedda commented Mar 19, 2024

The simplest case is to use our ZB-GW04, because it provides a hardware button that can force the bootloader to stay at any time.

@xsp1989 any chance you provide application source for building Zigbee Router device firmware that can be reused on USB dongle devices like ZB-GW04 and similar so that others like this project can build and compile the same Zigbee Router firmware with the latest SDK? -> https://github.com/xsp1989/zigbeeFirmware/tree/master/firmware/Zigbee3.0_Dongle-NoSigned/RouterForDongle

@xsp1989
Copy link

xsp1989 commented Mar 19, 2024

@Hedda I have not done any development other than NCP/RCP on the latest SDK. If you use the 6.x version of the SDK to develop routing firmware, it is actually quite simple. You only need to select the device type and generate the source code to compile it. The routing firmware can be It is standard (Range Extender deviceid:0x0008), or it can be a lamp or socket.
Now the 6.10.12 version of the SDK can be downloaded directly in SS without additional registration.

@Hedda
Copy link

Hedda commented Mar 19, 2024

If you use the 6.x version of the SDK to develop routing firmware, it is actually quite simple. You only need to select the device type and generate the source code to compile it. The routing firmware can be It is standard (Range Extender deviceid:0x0008), or it can be a lamp or socket.

So you did not have to add and the press button to join the network + LED status or those extra serial tunneling features either?

https://github.com/xsp1989/zigbeeFirmware/blob/master/firmware/Zigbee3.0_Dongle-NoSigned/RouterForDongle/README.md#join-the-network

https://github.com/xsp1989/zigbeeFirmware/blob/master/firmware/Zigbee3.0_Dongle-NoSigned/RouterForDongle/README.md#led-status

https://github.com/xsp1989/zigbeeFirmware/blob/master/firmware/Zigbee3.0_Dongle-NoSigned/RouterForDongle/README.md#extra-features

https://github.com/xsp1989/zigbeeFirmware/blob/master/firmware/Zigbee3.0_Dongle-NoSigned/RouterForDongle/README.md#cluster-identifiers

Join the network

  1. Press BOOT for 5 seconds until the LED flashes.
  2. Gateway allows access to the network.
  3. If the LED is always on, then join the network successfully.

LED status

LED status Network Status
LED off NO Netwrok
LED blink steering network
LED on Joined to the network

Extra features

  • If you send data through the serial port, the router will forward the data to the gateway.
  • If data is sent to the router through the coordinator, the serial port will receive the data.

Cluster Identifiers

Identifier Name
0x0704 Tunneling (Smart Energy)

@xsp1989
Copy link

xsp1989 commented Mar 19, 2024

What I mean is that if you make a routing firmware that is exactly the same as the firmware I provided, it may require additional development, but if you only need a routing function, it is actually very simple. You don't even need buttons and LEDs, you only need to set the CLI command line To the UART, you can connect the computer and control it to join the network through CLI commands.

Because my firmware is not specifically used for routing. We have other business needs and just developed this firmware.

@Hedda
Copy link

Hedda commented Apr 4, 2024

You could try SMLIGHT SLZB-07, I believe that has a router firmware available on the SMLIGHT web flasher.

Noticed according to the SMLIGHT SLZB-07 used manual it too does not have a boot button so requires that you manually short circuit two pads on the board as a workaround to put it into bootloader mode the next time want to flash the firmware again:

https://smlight.tech/manual-slzb-07/

IMPORTANT NOTE FOR THE CURRENT VERSION OF ROUTER FIRMWARE

If you flashed your coordinator to the router and want to flash it back to the coordinator, you have to push the device to flashing mode manually (is not required for other flashing options, only Router -> Coordinator)

Router → Coordinator: Need to push the coordinator physically to flashing mode.
– Unplug your coordinator
– Open enclosure
– Connect pad FLSH with the metal part of the antenna (you can use tweezers or scissors
– Plug the coordinator to your PC (keep FLSH connected to the antenna)
– Run flashing.

image

@tomtzeng
Copy link

tomtzeng commented May 7, 2024

Is it possible to provide new router firmware based on 7.3.1. for the Sonoff Dongle-E?

@supaeasy
Copy link

supaeasy commented May 7, 2024

Better 7.4.2 since it is ember compatible.

@Hedda
Copy link

Hedda commented May 7, 2024

Better 7.4.2 since it is ember compatible.

That is not relevant here. Zigbee Router device compatible is not the same as Zigbee Coordinator compatibility.

Zigbee Router devices are backwards and forward compatible, so they just need to be built for that chip and board.

That is, Zigbee Router is joined/paired like any Zigbee device so it can have any Zigbee stack and firmware version.

@darkxst
Copy link
Owner

darkxst commented May 8, 2024

Noticed according to the SMLIGHT SLZB-07

New hardware revision will have --bootloader-reset slzb07 in universal-silabs-flasher

hmm, maybe I am wrong about this for the SkyConnect as believe that Nabu Casa has for example implemented a manufacturer specific command in their official OpenThread RCP firmware which has "back door" command for reset into bootloader that makes it possible to always access bootloader mode as long as use Nabu Casa's universal-silabs-flasher

The bootloader reset in Thread firmware is now upstream, so any new enough thread firmware will support this. I am not aware of any client side implementations though apart from universal-silabs-flasher and web flasher.

@darkxst
Copy link
Owner

darkxst commented May 8, 2024

I will look at adding router builds after migrating to the new and improved builder puddly has been working on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants