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

Adding python bindings for CHIPCommissionableNodeController AND "platform" implementation for Commissioner Discovery #7900

Merged
merged 1 commit into from
Jun 29, 2021

Conversation

sharadb-amazon
Copy link
Contributor

Problem

  1. Support for Commissioner discovery in the python chip-device-ctrl is pending implementation
  2. Support for Commissioner discovery for ChipMDNSValue = "platform" is pending implementation

Change overview

This PR makes the following changes:

  • Creates a Python script binding for the CHIPCommissionableNodeController
  • Adds Commissioner discovery to discover -all command
  • Implements commissioner discovery for ChipMDNSValue = "platform"

Testing

  • Testing done by first running an instance of the chip-tv-app that advertises itself both as a Commissionable Node as well as a Commissioner, and then running the discover -all command on the chip-device-ctrl.
  • Testing done with builds of chip-device-ctrl for both ChipMDNSValue = "minimal" as well as ChipMDNSValue = "platform"

Output for chip-device-ctrl built with ChipMDNSValue = "platform"

chip-device-ctrl > discover -all
Waiting for device responses...
[1624600023.999532][22089] CHIP:DL: Avahi browse: cache exhausted
[1624600024.102271][22089] CHIP:DL: Avahi browse: cache new
[1624600025.002060][22089] CHIP:DL: Avahi browse: all for now
[1624600025.105461][22090] CHIP:DL: Avahi resolve found
[1624600026.002339][22081] CHIP:DIS: Commissioner 0
[1624600026.002463][22081] CHIP:DIS: Host name: 025000000001
[1624600026.002678][22081] CHIP:DIS: Long discriminator: 0
[1624600026.002929][22081] CHIP:DIS: Vendor ID: 9050
[1624600026.003080][22081] CHIP:DIS: Product ID: 65279
[1624600026.003100][22081] CHIP:DIS: Additional Pairing 0
[1624600026.003136][22081] CHIP:DIS: Commissioning Mode 0
[1624600026.003168][22081] CHIP:DIS: Device Type 35
[1624600026.003199][22081] CHIP:DIS: Device Name Test TV
[1624600026.003267][22081] CHIP:DIS: Rotating Id
[1624600026.003350][22081] CHIP:DIS: Pairing Instruction
[1624600026.003386][22081] CHIP:DIS: Pairing Hint 0x0
[1624600026.003439][22081] CHIP:DIS: Address 0: 240.10.0.1
Waiting for device responses...
[1624600026.005665][22089] CHIP:DL: Avahi browse: cache new
[1624600026.005992][22089] CHIP:DL: Avahi browse: cache exhausted
[1624600027.006833][22090] CHIP:DL: Avahi browse: all for now
[1624600027.008135][22090] CHIP:DL: Avahi resolve found
[1624600028.008059][22081] CHIP:DIS: Commissionable Node 0
[1624600028.008118][22081] CHIP:DIS: Host name: 025000000001
[1624600028.008132][22081] CHIP:DIS: Long discriminator: 2976
[1624600028.008145][22081] CHIP:DIS: Vendor ID: 9050
[1624600028.008153][22081] CHIP:DIS: Product ID: 65279
[1624600028.008162][22081] CHIP:DIS: Additional Pairing 0
[1624600028.008172][22081] CHIP:DIS: Commissioning Mode 1
[1624600028.008181][22081] CHIP:DIS: Device Type 0
[1624600028.008196][22081] CHIP:DIS: Device Name
[1624600028.008238][22081] CHIP:DIS: Rotating Id 0000490C1FF0DB5910AD14994F162DB850F3
[1624600028.008251][22081] CHIP:DIS: Pairing Instruction
[1624600028.008289][22081] CHIP:DIS: Pairing Hint 0x21
[1624600028.008305][22081] CHIP:DIS: Address 0: 240.10.0.1
chip-device-ctrl >

Output for chip-device-ctrl built with ChipMDNSValue = "minimal"

chip-device-ctrl > discover -all
[1624600243.379451][26944] CHIP:DIS: mDNS broadcast success
[1624600243.380066][26944] CHIP:DIS: mDNS broadcast success
[1624600243.380390][26944] CHIP:DIS: mDNS broadcast success
[1624600243.380577][26944] CHIP:DIS: mDNS broadcast success
[1624600243.380780][26944] CHIP:DIS: mDNS broadcast success
[1624600243.380845][26944] CHIP:DIS: Attempt to mDNS broadcast failed: OS Error 2101 (0x00000835): Network is unreachable
Waiting for device responses...
[1624600245.383509][26944] CHIP:DIS: Commissioner 0
[1624600245.383575][26944] CHIP:DIS: Host name: 025000000001
[1624600245.383593][26944] CHIP:DIS: Long discriminator: 0
[1624600245.383603][26944] CHIP:DIS: Vendor ID: 9050
[1624600245.383615][26944] CHIP:DIS: Product ID: 65279
[1624600245.383663][26944] CHIP:DIS: Additional Pairing 0
[1624600245.383681][26944] CHIP:DIS: Commissioning Mode 0
[1624600245.383729][26944] CHIP:DIS: Device Type 35
[1624600245.383777][26944] CHIP:DIS: Device Name Test TV
[1624600245.383825][26944] CHIP:DIS: Rotating Id
[1624600245.383871][26944] CHIP:DIS: Pairing Instruction
[1624600245.383917][26944] CHIP:DIS: Pairing Hint 0x0
[1624600245.383942][26944] CHIP:DIS: Address 0: fe80::50:ff:fe00:1
[1624600245.383992][26944] CHIP:DIS: Address 1: 192.168.65.3
[1624600245.384044][26944] CHIP:DIS: Address 2: fe80::50:ff:fe00:1
[1624600245.384092][26944] CHIP:DIS: Address 3: 192.168.65.3
[1624600245.384858][26944] CHIP:DIS: mDNS broadcast success
[1624600245.385233][26944] CHIP:DIS: mDNS broadcast success
[1624600245.386017][26944] CHIP:DIS: mDNS broadcast success
[1624600245.386274][26944] CHIP:DIS: mDNS broadcast success
[1624600245.386535][26944] CHIP:DIS: mDNS broadcast success
[1624600245.386768][26944] CHIP:DIS: Attempt to mDNS broadcast failed: OS Error 2101 (0x00000835): Network is unreachable
Waiting for device responses...
[1624600247.358427][26944] CHIP:DIS: Commissionable Node 0
[1624600247.358766][26944] CHIP:DIS: Host name: 025000000001
[1624600247.358823][26944] CHIP:DIS: Long discriminator: 2976
[1624600247.358876][26944] CHIP:DIS: Vendor ID: 9050
[1624600247.358931][26944] CHIP:DIS: Product ID: 65279
[1624600247.358986][26944] CHIP:DIS: Additional Pairing 0
[1624600247.359035][26944] CHIP:DIS: Commissioning Mode 1
[1624600247.359071][26944] CHIP:DIS: Device Type 35
[1624600247.359116][26944] CHIP:DIS: Device Name Test TV
[1624600247.359165][26944] CHIP:DIS: Rotating Id 0000490C1FF0DB5910AD14994F162DB850F3
[1624600247.359211][26944] CHIP:DIS: Pairing Instruction
[1624600247.359259][26944] CHIP:DIS: Pairing Hint 0x21
[1624600247.359319][26944] CHIP:DIS: Address 0: fe80::50:ff:fe00:1
[1624600247.359377][26944] CHIP:DIS: Address 1: 192.168.65.3
[1624600247.359435][26944] CHIP:DIS: Address 2: fe80::50:ff:fe00:1
[1624600247.359493][26944] CHIP:DIS: Address 3: 192.168.65.3

@sharadb-amazon sharadb-amazon changed the title Adding python bindings for chip-device-ctrl AND "platform" implementation for Commissioner Discovery Adding python bindings AND "platform" implementation for Commissioner Discovery Jun 25, 2021
@sharadb-amazon sharadb-amazon changed the title Adding python bindings AND "platform" implementation for Commissioner Discovery Adding python bindings for CHIPCommissionableNodeController AND "platform" implementation for Commissioner Discovery Jun 25, 2021
@bzbarsky-apple bzbarsky-apple requested a review from cecille June 25, 2021 19:55
@github-actions
Copy link

Size increase report for "gn_qpg6100-example-build" from 0624ee4

File Section File VM
chip-qpg6100-lighting-example.out .text 64 64
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,286
.debug_loc,0,137
.text,64,64
.debug_line,0,54
.debug_ranges,0,24
.debug_str,0,3
.shstrtab,0,2
.strtab,0,2
[Unmapped],0,-64

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 0624ee4

File Section File VM
chip-lock.elf text 68 68
chip-lock.elf rodata 16 12
chip-lock.elf device_handles 12 12
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,286
.debug_loc,0,139
text,68,68
.symtab,0,64
.debug_line,0,58
.debug_ranges,0,24
rodata,12,16
device_handles,12,12
.debug_str,0,5
.strtab,0,-40


@woody-apple
Copy link
Contributor

@woody-apple woody-apple merged commit b2f8af0 into project-chip:master Jun 29, 2021
@sharadb-amazon sharadb-amazon deleted the py-disc-comm branch June 29, 2021 18:59
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants