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

[python] ChipDeviceController BLE API do not support discovery by short discriminator #26907

Closed
tcarmelveilleux opened this issue May 27, 2023 · 0 comments · Fixed by #33933
Closed

Comments

@tcarmelveilleux
Copy link
Contributor

When only a manual pairing code is available, only the short discriminator (upper 4 bits of 12-bit discriminator) are available for discovery.

None of the Python API for commissioning over BLE support a version where the short discriminator is given.

Suggest:

  • Adapting the ConnectBLE to have some way of expression short discriminator (e.g. by setting high bit of discriminator)
  • Adapting CommissionThread/CommissionWifi to have shortDiscriminator keyword argument defaulting to None that causes disregarding the long discriminator argument, and uses short discriminator instead.
tcarmelveilleux added a commit to tcarmelveilleux/connectedhomeip that referenced this issue Jun 14, 2024
- Plumbing was missing to pass down the short discriminator
- Passing `--manual-code 1234-567-8901` which only has short
  discriminator, would always fail to find device over BLE

Fixes project-chip#26907

This PR:

- Adds plumbing to detect short discriminator in Python controller
- Improves code-based setup in CHIPDeviceController to honor the
  SetupDiscriminator value, including whether short/long.

Testing done:
- Ran `python3 src/python_testing/TC_SC_3_6.py --commissioning-method ble-wifi --wifi-ssid MySsid --wifi-passphrase Secret123 --manual-code 2168-374-4904 --storage-path kvs1`
  - Before fix, discriminator always mismatched.
  - After fix, commissioning succeeds.
- Unit tests and other integration tests still pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant