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

Add IPv4 and IPv6 addresses to General Diagnostics cluster #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkasperczyk-no
Copy link
Owner

@kkasperczyk-no kkasperczyk-no commented Feb 8, 2022

Problem

Currently the General Diagnostics cluster implementation doesn't contain IPv4 and IPv6 addresses lists, so it's not
compatible with the spec.

Change overview

  • To cluster .xml:
    • Added missing IPv4Addresses and IPv6Addresses lists
    • Changed fabricConnected argument name to isOperational
      to be compatible with the spec.
    • Changed length field for ACTIVE_HARDWARRE_FAULTS,
      ACTIVE_RADIO_FAULTS and ACTIVE_NETWORK_FAULTS as defined
      in the spec.
  • Regenerated files with zap_regen_all.py
  • Added buffers to keep ip addresses to the NetworkInterface
  • Added inserting IPv6 addresses in GetNetworkInterfaces for the Zephyr platform

Testing

Tested manually with Python CHIP controller that IPv6 addresses list is returned on NetworkInterfaces attribute read:

zclread GeneralDiagnostics NetworkInterfaces 1 0 0

Returned data:

Data =
{
0x0 = "IEEE802154_nrf5",
0x1 = true,
0x2 = false,
0x3 = false,
0x4 = [
0xf4, 0xce, 0x36, 0x7b, 0x58, 0xf6, 0x25, 0xdd,
]
0x5 = [

					],
					0x6 = [
						[
							0xfd, 0xfd, 0x7c, 0xa4, 0x79, 0xb3, 0x1e, 0x72, 0xca, 0x9e, 0x65, 0x16, 0xb, 0x43, 0x45, 0x88, 
						][
							0xfe, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x76, 0xbc, 0x54, 0x4b, 0xf, 0x93, 0xb5, 
						][
							0xfd, 0x11, 0x0, 0x22, 0x0, 0x0, 0x0, 0x0, 0x2c, 0x38, 0x7e, 0xab, 0xd0, 0x62, 0x21, 0x80, 
						]

					],
					0x7 = 4, 
				},

Currently the General Diagnostics cluster implementation
doesn't contain IPv4 and IPv6 addresses lists, so it's not
compatible with the spec.

* To cluster .xml:
   * Added missing IPv4Addresses and IPv6Addresses lists
   * Changed fabricConnected argument name to isOperational
   to be compatible with the spec.
   * Changed length field for ACTIVE_HARDWARRE_FAULTS,
   ACTIVE_RADIO_FAULTS and ACTIVE_NETWORK_FAULTS as defined
   in the spec.
* Regenerated files with zap_regen_all.py
* Added buffers to keep ip addresses to the NetworkInterface
* Added inserting IPv6 addresses in GetNetworkInterfaces
for the Zephyr platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants