mirror of
https://github.com/espressif/openthread.git
synced 2026-08-11 05:07:47 +00:00
[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:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user