mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 07:37:46 +00:00
[thread-cert] use the same mesh local prefix as Thread harness (#4089)
This commit is contained in:
@@ -80,6 +80,8 @@ class Node:
|
||||
|
||||
self._initialized = True
|
||||
|
||||
self.set_extpanid(config.EXTENDED_PANID)
|
||||
|
||||
def __init_sim(self, nodeid, mode):
|
||||
""" Initialize a simulation node. """
|
||||
|
||||
@@ -549,6 +551,10 @@ class Node:
|
||||
self.send_command('eui64')
|
||||
return self._expect_result('[0-9a-fA-F]{16}')
|
||||
|
||||
def set_extpanid(self, extpanid):
|
||||
self.send_command('extpanid %s' % extpanid)
|
||||
self._expect('Done')
|
||||
|
||||
def get_joiner_id(self):
|
||||
self.send_command('joiner id')
|
||||
return self._expect_result('[0-9a-fA-F]{16}')
|
||||
@@ -1009,6 +1015,11 @@ class Node:
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
# Set the meshlocal prefix in config.py
|
||||
self.send_command('dataset meshlocalprefix %s' %
|
||||
config.MESH_LOCAL_PREFIX.split('/')[0])
|
||||
self._expect('Done')
|
||||
|
||||
self.send_command('dataset commit active')
|
||||
self._expect('Done')
|
||||
|
||||
@@ -1038,6 +1049,11 @@ class Node:
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
# Set the meshlocal prefix in config.py
|
||||
self.send_command('dataset meshlocalprefix %s' %
|
||||
config.MESH_LOCAL_PREFIX.split('/')[0])
|
||||
self._expect('Done')
|
||||
|
||||
self.send_command('dataset commit pending')
|
||||
self._expect('Done')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user