kardia-as / zigpy-zboss

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

Firmware ZDO proxying #1

Closed puddly closed 7 months ago

puddly commented 1 year ago

Thank you for writing and open sourcing this library! ZBOSS has long been on the radar and your implementation is very clear.

I've skimmed through the source code and noticed that ZBOSS seems to intercept and proxy all ZDO requests, similar to Z-Stack before. Does ZBOSS also successfully send any request to endpoint 0 and intercept the response? Or does it not allow the requests to be sent directly to endpoint 0 in the first place?

Also, do you happen to have a link to the serial protocol documentation? I'm unable to find any of the commands within the ZBOSS source code, nor in Nordic's documentation.

DamKast commented 1 year ago

Does ZBOSS also successfully send any request to endpoint 0 and intercept the response? Or does it not allow the requests to be sent directly to endpoint 0 in the first place?

ZBOSS does actually send ZDO requests when using the APSDE data request command (I can see ZDO packets with the sniffer), but the response is intercepted and is not returned to zigpy. This is why we have to overwrite the Zdo class in order to redefine the request methods to use the specific ZBOSS commands.

Also, do you happen to have a link to the serial protocol documentation? I'm unable to find any of the commands within the ZBOSS source code, nor in Nordic's documentation.

I asked directly DSR and they sent me this documentation.

Hedda commented 1 year ago

do you happen to have a link to the serial protocol documentation?

Originally posted by @eexarevsky in https://github.com/zigpy/zigpy/issues/394#issuecomment-1549431996

See there https://cloud.dsr-corporation.com/index.php/s/BAn4LtRWbJjFiAm

Yes, ZBOSS supposes that application does not send ZDO commands as just APS data. Use ZDO API instead.

_There are full sources for the host side of ZBOSS NCP there https://developer.nordicsemi.com/Zigbee/ncp_sdk_for_host/ncp_host_v2.2.1.zip_

And, remind, Wireshark can parse ZBOSS NCP. But I am in doubt Nordic uses that feature.