mirror of
https://github.com/espressif/openthread.git
synced 2026-09-08 18:20:06 +00:00
[mac] remove beacons payload (#7472)
Thread Specification v1.2.1 removes support for Thread Beacons payload.
This commit is contained in:
@@ -77,7 +77,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
'timestamp': 1,
|
||||
'channel': 19,
|
||||
'network_key': '00112233445566778899aabbccddeeff',
|
||||
'security_policy': [3600, 'onrcb']
|
||||
'security_policy': [3600, 'onrc']
|
||||
},
|
||||
'mode': 'rdn',
|
||||
},
|
||||
@@ -87,7 +87,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
'timestamp': 1,
|
||||
'channel': 19,
|
||||
'network_key': '00112233445566778899aabbccddeeff',
|
||||
'security_policy': [3600, 'onrcb']
|
||||
'security_policy': [3600, 'onrc']
|
||||
},
|
||||
'mode': 'rdn',
|
||||
'allowlist': [LEADER]
|
||||
@@ -103,7 +103,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
'timestamp': 1,
|
||||
'channel': 19,
|
||||
'network_key': '00112233445566778899aabbccddeeff',
|
||||
'security_policy': [3600, 'onrcb']
|
||||
'security_policy': [3600, 'onrc']
|
||||
},
|
||||
'mode': 'rdn',
|
||||
},
|
||||
@@ -130,10 +130,10 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
self.simulator.go(5)
|
||||
|
||||
# Step 5
|
||||
# Disabling O-Bit security_policy = [3600, 0b01111000]
|
||||
# Disabling O-Bit security_policy = [3600, 0b01110000]
|
||||
self.nodes[COMMISSIONER_1].send_mgmt_active_set(
|
||||
active_timestamp=15,
|
||||
security_policy=[3600, 'nrcb'],
|
||||
security_policy=[3600, 'nrc'],
|
||||
)
|
||||
self.simulator.go(5)
|
||||
|
||||
@@ -143,10 +143,10 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
self.simulator.go(5)
|
||||
|
||||
# Step 9
|
||||
# Disabling N-Bit security_policy = [3600, 0b10111000]
|
||||
# Disabling N-Bit security_policy = [3600, 0b10110000]
|
||||
self.nodes[COMMISSIONER_1].send_mgmt_active_set(
|
||||
active_timestamp=20,
|
||||
security_policy=[3600, 'orcb'],
|
||||
security_policy=[3600, 'orc'],
|
||||
)
|
||||
self.simulator.go(5)
|
||||
|
||||
@@ -173,10 +173,10 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
self.simulator.go(20)
|
||||
|
||||
# Step 17
|
||||
# Disabling R-Bit security_policy = [3600, 0b11011000]
|
||||
# Disabling R-Bit security_policy = [3600, 0b11010000]
|
||||
self.nodes[COMMISSIONER_1].send_mgmt_active_set(
|
||||
active_timestamp=30,
|
||||
security_policy=[3600, 'oncb'],
|
||||
security_policy=[3600, 'onc'],
|
||||
)
|
||||
self.simulator.go(5)
|
||||
|
||||
@@ -209,7 +209,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
# 2.04 Changed
|
||||
# CoAP Payload
|
||||
# Security Policy TLV
|
||||
# Bits “O”,”N”,”R”,”C”,”B” should be set to 1
|
||||
# Bits “O”,”N”,”R”,”C” should be set to 1
|
||||
pkts.filter_wpan_src64(LEADER).\
|
||||
filter_ipv6_dst(COMMISSIONER_1_RLOC).\
|
||||
filter_coap_ack(MGMT_ACTIVE_GET_URI).\
|
||||
@@ -217,9 +217,8 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
p.thread_meshcop.tlv.sec_policy_o == 1 and
|
||||
p.thread_meshcop.tlv.sec_policy_n == 1 and
|
||||
p.thread_meshcop.tlv.sec_policy_r == 1 and
|
||||
p.thread_meshcop.tlv.sec_policy_c == 1 and
|
||||
p.thread_meshcop.tlv.sec_policy_b == 1) or
|
||||
(p.thread_meshcop.tlv.unknown == '0e10ff')).\
|
||||
p.thread_meshcop.tlv.sec_policy_c == 1) or
|
||||
(p.thread_meshcop.tlv.unknown == '0e10f7')).\
|
||||
must_next()
|
||||
|
||||
# Step 5: Commissioner_1 sends MGMT_ACTIVE_SET.req to Leader
|
||||
@@ -239,7 +238,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
} == set(p.thread_meshcop.tlv.type) and\
|
||||
p.thread_meshcop.tlv.active_tstamp == 15 and\
|
||||
(p.thread_meshcop.tlv.sec_policy_o == 0 or
|
||||
p.thread_meshcop.tlv.unknown == '0e107f')).\
|
||||
p.thread_meshcop.tlv.unknown == '0e1077')).\
|
||||
must_next()
|
||||
|
||||
# Step 6: Leader MUST send MGMT_ACTIVE_SET.rsp to the Commissioner_1
|
||||
@@ -292,7 +291,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
} == set(p.thread_meshcop.tlv.type) and\
|
||||
p.thread_meshcop.tlv.active_tstamp == 20 and\
|
||||
(p.thread_meshcop.tlv.sec_policy_n == 0 or
|
||||
p.thread_meshcop.tlv.unknown == '0e10bf')).\
|
||||
p.thread_meshcop.tlv.unknown == '0e10b7')).\
|
||||
must_next()
|
||||
|
||||
# Step 10: Leader MUST send MGMT_ACTIVE_SET.rsp to the Commissioner_1
|
||||
@@ -376,7 +375,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
} == set(p.thread_meshcop.tlv.type) and\
|
||||
p.thread_meshcop.tlv.active_tstamp == 30 and\
|
||||
(p.thread_meshcop.tlv.sec_policy_r == 0 or
|
||||
p.thread_meshcop.tlv.unknown == '0e10df')).\
|
||||
p.thread_meshcop.tlv.unknown == '0e10d7')).\
|
||||
must_next()
|
||||
|
||||
# Step 18: Leader MUST send MGMT_ACTIVE_SET.rsp to the Commissioner_1
|
||||
@@ -407,7 +406,7 @@ class Cert_5_8_04_SecurityPolicyTLV(thread_cert.TestCase):
|
||||
filter(lambda p:
|
||||
p.mle.tlv.active_tstamp == 30 and\
|
||||
(p.thread_meshcop.tlv.sec_policy_r == 0 or
|
||||
p.thread_meshcop.tlv.unknown == '0e10df')).\
|
||||
p.thread_meshcop.tlv.unknown == '0e10d7')).\
|
||||
must_next()
|
||||
|
||||
|
||||
|
||||
@@ -2085,15 +2085,11 @@ class NodeImpl:
|
||||
if result == 1:
|
||||
networks = []
|
||||
for line in self._expect_command_output()[2:]:
|
||||
_, J, networkname, extpanid, panid, extaddr, channel, dbm, lqi, _ = map(str.strip, line.split('|'))
|
||||
J = bool(int(J))
|
||||
_, panid, extaddr, channel, dbm, lqi, _ = map(str.strip, line.split('|'))
|
||||
panid = int(panid, 16)
|
||||
channel, dbm, lqi = map(int, (channel, dbm, lqi))
|
||||
|
||||
networks.append({
|
||||
'joinable': J,
|
||||
'networkname': networkname,
|
||||
'extpanid': extpanid,
|
||||
'panid': panid,
|
||||
'extaddr': extaddr,
|
||||
'channel': channel,
|
||||
|
||||
@@ -70,8 +70,6 @@ class Test_MacScan(thread_cert.TestCase):
|
||||
self.assertEqual(len(results), 1)
|
||||
network = results[0]
|
||||
self.assertEqual(network['extaddr'], self.nodes[ROUTER].get_addr64())
|
||||
self.assertEqual(network['extpanid'], self.nodes[ROUTER].get_extpanid())
|
||||
self.assertEqual(network['networkname'], self.nodes[ROUTER].get_network_name())
|
||||
self.assertEqual(network['channel'], CHANNEL)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user