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

Extend build flags for ip commissioning on linux[TE3] #7214

Merged

Conversation

cecille
Copy link
Contributor

@cecille cecille commented May 28, 2021

Lets the linux builds be built with IP commissioning support. Adds
the on-network flag to the QR code on the app main.

Test: lighting-app on linux - comes up in commissioning mode,
chip-device-ctrl connect -qr "[qr code]" can find and
commission the device.

Problem

Not all the device paths support on-network commissioning

Change overview

Adds gn build flag to set defines for IP commissioning

Testing

Tested using lighting-app built for linux with chip_ip_commissioning flag set. Connected to lighting app using chip-device-ctrl, was able to discover and commission automatically using connect -qr "[qr code]"

Lets the linux builds be built with IP commissioning support. Adds
the on-network flag to the QR code on the app main.

Test: lighting-app on linux - comes up in commissioning mode,
      chip-device-ctrl connect -qr "[qr code]" can find and
      commission the device.
@cecille cecille added the TE3 label May 28, 2021
@@ -36,6 +38,10 @@ source_set("app-main") {
if (chip_enable_pw_rpc) {
defines += [ "PW_RPC_ENABLED" ]
}
if (chip_ip_commissioning) {
# BLE and on-network. Code defaults to BLE if this is not set.
defines += [ "CONFIG_RENDEZVOUS_MODE=6" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not mandatory for commissioners to use this bitmask. In fact, since this bitmask is absent from numerical pairing code, it is merely a hint.

Overall, the commissioner examples should just "look everywhere they can" for devices to be commissioned. The onboarding payload does enable filtering down with additional knowledge to reduce possibility of discriminator collision.

Is there an issue tracking this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From discussion offline - the codes are not optional in the QR code. This flag doesn't control anything on-device. Right now, the commissioner example code (chip-device-ctrl) has a direct IP and a direct BLE connection, but also supports connecting from the QR code, which pulls the setup pin, discriminator and rendezvous flags. The QR code pairing example will only check the flags in the QR code, as these are mandatory. An implementation of a manual pairing in the example controller would include all, but has not been written yet.

@yunhanw-google yunhanw-google changed the title Extend build flags for ip commissioning on linux. Extend build flags for ip commissioning on linux[TE3] Jun 1, 2021
@yunhanw-google
Copy link
Contributor

@bzbarsky-apple @franck-apple this is also needed for IP commissioning in TE3.

@woody-apple woody-apple merged commit ff277b4 into project-chip:master Jun 2, 2021
@cecille cecille deleted the ip_commissioning_flags_linux branch July 23, 2021 19:34
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Lets the linux builds be built with IP commissioning support. Adds
the on-network flag to the QR code on the app main.

Test: lighting-app on linux - comes up in commissioning mode,
      chip-device-ctrl connect -qr "[qr code]" can find and
      commission the device.
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.

7 participants