project-chip / project-chip/certification-tool

Support NFC-Ethernet pairing mode for python_testing (SDK) tests

Open
#1,067 0 comments 0 reactions 1 assignee View on GitHub

@rquidute is already working on this.

Since Aug 18, 2026.

Dominant language
Shell
Stars
83
Forks
47
Avg merge
1d 15h
Merged PRs (30d)
17

Description

Summary

Add support for the nfc-ethernet DUT pairing mode to the Test Harness, so python_testing (SDK) tests can commission Matter-over-Ethernet devices via NFC.

Background

  • Upstream connectedhomeip PR project-chip/connectedhomeip#43613 adds an nfc-ethernet pairing subcommand to chip-tool. As of this writing it is still open (not merged) and has requested changes from a reviewer (OlivierGre) who disputes the approach of inferring "no network setup needed" purely from NFC transport type, rather than from the Network Commissioning cluster's feature map (see linked draft alternative #72240). Because of this, chip-tool itself does not yet support nfc-ethernet, and YAML/chip-tool-based TH tests can't use it yet.

  • The companion PR, project-chip/connectedhomeip#43657 ("Add nfc-ethernet in Python controller"), is already merged and is present in our connectedhomeip submodule. It adds "nfc-ethernet" as a valid --commissioning-method / --in-test-commissioning-method choice in matter_testing_infrastructure/matter/testing/runner.py, plus ChipDeviceCtrl.CommissionNfcEthernet() and dispatch in matter/testing/commissioning.py. This means our SDK python_testing tests can already accept nfc-ethernet as a commissioning method — the TH's own config/dispatch layer just doesn't expose or map it yet.

Scope (this issue)

Add TH support for nfc-ethernet for python_testing (SDK) tests only — YAML/chip-tool test support should wait until upstream #43613 merges and its design settles.

Proposed changes
  • backend/app/constants/shared_constants.py (and its cli mirror cli/th_cli/shared_constants.py): add NFC_ETHERNET = "nfc-ethernet" to DutPairingModeEnum, and add it to NFC_PAIRING_MODES.
  • backend/test_collections/matter/sdk_tests/support/python_testing/models/utils.py (generate_command_arguments): NFC-Ethernet needs neither --wifi-* nor --thread-dataset-hex args (unlike nfc-wifi/nfc-thread) — it should fall straight through to the existing NFC handling that suppresses --discriminator/--passcode and injects NFC_Reader_index.
  • backend/test_collections/matter/test_environment_config.py: confirm NetworkConfig validation doesn't require wifi/thread config when pairing_mode is nfc-ethernet (currently NetworkConfig.wifi/.thread appear to be required fields regardless of pairing mode — may need to become optional or conditionally validated).
  • backend/test_collections/matter/sdk_tests/support/python_testing/models/test_suite.py: no OTBR/border-router setup needed for nfc-ethernet (already excluded, just confirm).
  • cli/th_cli/config.py PairingMode enum / VALID_PAIRING_MODES: add NFC_ETHERNET for parity (currently unused for validation but should stay in sync with the backend enum).
  • Update tests mirroring the nfc-wifi/nfc-thread coverage in backend/test_collections/matter/sdk_tests/support/tests/python_tests/test_utils.py and backend/test_collections/matter/sdk_tests/support/tests/matter/test_test_environment_config.py.
  • Update docs: backend/test_collections/matter/sdk_tests/support/tests/docs/TestEnvironmentConfigMatter-scenarios.md.
Out of scope (tracked separately / blocked upstream)
  • matter_yaml_runner.py / chip_suite.py (YAML/chip-tool pairing) — blocked on chip-tool itself supporting nfc-ethernet via upstream PR #43613.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.