[border-agent] update "ConnectionMode" in state bitmap when stopped (#11462)

This commit updates how the "ConnectionMode" field is set in the
Border Agent State Bitmap, which is advertised as the value of the
`sb` TXT key. In particular, when the Border Agent service is stopped
and therefore not accepting any connections, the value of this field
is now set to `kConnectionModeDisabled` to indicate this.

This commit also updates and enhances `test_border_agent` to validate
the State Bitmap entry in the TXT data, covering cases where the
device role changes or ePSKc support is enabled/disabled.
This commit is contained in:
Abtin Keshavarzian
2025-04-30 07:45:21 -07:00
committed by GitHub
parent d56222a8db
commit ae940e6df8
4 changed files with 76 additions and 3 deletions
+5
View File
@@ -1913,6 +1913,11 @@ class NodeImpl:
self.send_command(cmd)
self._expect_done()
def get_ba_state(self):
states = [r'Disabled', r'Inactive', r'Active']
self.send_command('ba state')
return self._expect_result(states)
def get_ephemeral_key_state(self):
cmd = 'ba ephemeralkey'
states = [r'Disabled', r'Stopped', r'Started', r'Connected', r'Accepted']