lhespress / zigpy-espzb

GNU General Public License v3.0
26 stars 4 forks source link

Would 230400 be a more future proof baud rate speed for Espressif Zigbee NCP Serial Protocol as a Zigbee Coordinator? #7

Open Hedda opened 8 months ago

Hedda commented 8 months ago

Default baud rate speed is now 115200.

But might 230400 not be more future proof for Espressif Zigbee NCP Serial Protocol as a Zigbee Coordinator for zigpy / ZHA?

And should the same recommendation for ESP32-H2 and ESP32-C6?

Should we maybe look at 230400 baudrate speed for zigpy-espzb with ESP32-H2 and ESP32-C6? Or different for those two?

This is a relevant question since Espressif does not offer any pre-built firmware images as a kind of best practice recommendation, and even though default is 115200 right now that might not be optimal any longer or?

https://github.com/espressif/esp-zigbee-sdk/tree/main/examples/esp_zigbee_ncp

https://github.com/espressif/esp-zigbee-sdk/tree/main/examples/esp_zigbee_host

(and https://github.com/espressif/esp-zigbee-sdk/tree/main/examples/esp_zigbee_gateway)

While 115200 bauds is probably is enough right now you might want to consider going with 230400 as could be more future proof?

FYI, many other Zigbee Coordinator radios have historically increased baudrate with each new hardware generation and newer firmware.

Most of the previous generation uses 115200 bauds as serial transmission speed but the newer Silicon Labs instead use 230400 bauds.

PS: Off-topic but for RCP firmware you probably want to go with 460800 bauds even if you use 115200 and/or 230400 baudrate for NCP.

lhespress commented 8 months ago

@Hedda You can change the baud rate as here by idf.py menuconfig before compile the firmware: https://github.com/espressif/esp-zigbee-sdk/blob/main/components/esp-zigbee-ncp/Kconfig#L27 The max baud rate can be set 891200. There isn't any difference both ESP32-H2 and ESP32-C6 for this.

Hedda commented 8 months ago

The max baud rate can be set 891200. There isn't any difference both ESP32-H2 and ESP32-C6 for this.

I was more thinking of changing the default both to optimize performance and future-proofing defaults when using as Zigbee NCP Coordinator or Zigbee RCP, as if the ESP32-H2 might be too slow at some point or vice verse if the ESP32-C6 is too fast, so that not a buffer is built up someware as that is generally bad.