NabuCasa / silabs-firmware-builder

Silicon Labs firmware builder
42 stars 54 forks source link

Custom XNCP protocol commands #57

Open puddly opened 2 months ago

puddly commented 2 months ago

To facilitate future firmware extensions and to allow applications communicating with the firmware to query these firmware extensions, I've implemented a simple protocol using EZSP's customFrame command.

MattWestb commented 1 month ago

One PM: manually setting one source router is making problems if the rout is being broken and the network cant healing therefor its normally automatic or no source routing being used.

puddly commented 1 month ago

Right now, sendUnicast in EmberZNet doesn't let you specify a source route when sending a packet, unlike Z-Stack and deCONZ. For Z-Stack with zigpy-znp, I use source routing as one of the retrying methods in case normal routing fails. I would like to use it the same with with bellows so that this logic can be moved into zigpy.

For zigpy's source routing, we assume symmetry and just use the last-taken route from a device as the source route when sending to the device. This can definitely be improved (speculative routing, randomization, better discovery, etc.).

puddly commented 1 month ago

New feature for firmware builders: overriding the board name. This uses a custom XNCP command so it will require support in bellows but it will allow you to override the firmware name that is displayed within Home Assistant:

c_defines:
  XNCP_BOARD_NAME: '"My Board v1.0"'
  XNCP_MANUF_NAME: '"Some Manufacturer"'

Currently, the board and device name are stored in USERDATA as manufacturing tokens and cannot be easily rewritten.