[trel] add cli to get TREL UDP port (#10702)

The test software for certification currently uses the mDNS packets of
trel service responses to find out the trel port, and then use the port
number to determine which packets in a capture should be decoded as TREL
packets. However this may not be reliable since it depends on when the
capture starts. Added a cli to get trel port, so this can be used by
a THCI function.
This commit is contained in:
Yang Sun
2024-09-13 09:54:33 -07:00
committed by GitHub
parent dccc5193af
commit 97a3f7648f
8 changed files with 52 additions and 1 deletions
+5
View File
@@ -1451,6 +1451,11 @@ class NodeImpl:
self.send_command(cmd)
self._expect_done()
def get_trel_port(self):
cmd = 'trel port'
self.send_command(cmd)
return int(self._expect_command_output()[0])
def set_epskc(self, keystring: str, timeout=120000, port=0):
cmd = 'ba ephemeralkey set ' + keystring + ' ' + str(timeout) + ' ' + str(port)
self.send_command(cmd)