Lines Matching +full:thread +full:- +full:border +full:- +full:router
29 >> Thread Host Controller Interface
124 retry_times -= 1
127 times -= 1
213 retry_times -= 1
267 retry_times -= 1
288 if (value[0] == '"' and value[-1] == '"') or (value[0] == '[' and value[-1] == ']'):
289 return value[1:-1]
299 segments[i] = '0' * (4 - len(element)) + element
302 segments = segments[:empty] + ['0000'] * (8 - len(segments) + 1) + segments[empty + 1:]
307 """set thread device mode:
310 mode: thread device mode. 11=rdn, 9=rn
311 r: rx-on-when-idle
313 d: full thread device
323 cmd = self.wpan_cmd_prefix + 'setprop Thread:DeviceMode %d' % mode
329 """set router upgrade threshold
332 iThreshold: the number of active routers on the Thread network
333 partition below which a REED may decide to become a Router.
341 … cmd = self.wpan_cmd_prefix + 'setprop Thread:RouterUpgradeThreshold %s' % str(iThreshold)
347 """set router downgrade threshold
350 iThreshold: the number of active routers on the Thread network
351 partition above which an active router may decide to
360 … cmd = self.wpan_cmd_prefix + 'setprop Thread:RouterDowngradeThreshold %s' % str(iThreshold)
366 """set ROUTER_SELECTION_JITTER parameter for REED to upgrade to Router
369 iRouterJitter: a random period prior to request Router ID for REED
377 … cmd = self.wpan_cmd_prefix + 'setprop Thread:RouterSelectionJitter %s' % str(iRouterJitter)
433 nodeType = 'router'
436 nodeType = 'router'
438 elif self.deviceRole == Thread_Device_Role.Router:
439 nodeType = 'router'
445 nodeType = 'router'
447 nodeType = 'router'
453 …if self.deviceRole in [Thread_Device_Role.Leader, Thread_Device_Role.Router, Thread_Device_Role.RE…
457 startCmd = self.wpan_cmd_prefix + '%s "%s" -c %s -T %s ' % (
464 startCmd = self.wpan_cmd_prefix + '%s "%s" -p %s -c %s -T %s ' % (
511 …if self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:State')[0]) == 'ass…
519 # router id
521 """mapping Rloc16 to router id
527 actual router id allocated by leader
530 routerList = self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Thread:RouterTable')
539 router = []
540 router = self.__stripValue(line).split(',')
542 for item in router:
564 """convert IPv6 prefix string to IPv6 dotted-quad format
566 2001000000000000 -> 2001:0000:0000:0000::
572 IPv6 address dotted-quad format
686 return self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Commissioner:SessionId')[0]
693 …joinerState = self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:State')[…
696 elif joinerState == 'associating:credentials-needed':
821 """set Thread Network name
827 True: successful to set the Thread Networkname
828 False: fail to set the Thread Networkname
834 cmd = self.wpan_cmd_prefix + 'setprop -s Network:Name "%s"' % networkName
842 """set channel of Thread device operates on.
846 (0 - 10: Reserved)
847 (11 - 26: 2.4GHz channels)
848 (27 - 65535: Reserved)
867 return self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:Channel')[0]
870 """set the extended address of Thread device
916 self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:HardwareAddress')[0])
919 self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:MACAddress')[0])
922 self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:ExtendedAddress')[0])
929 …return self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v IPv6:LinkLocalAddre…
934 …return self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v IPv6:MeshLocalAddre…
939 rloc16 = self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Thread:RLOC16')[0]
943 """get router locator unicast IPv6 address"""
945 …prefix = self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v IPv6:MeshLocalPre…
947 … rloc16 = self.__lstrip0x(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Thread:RLOC16')[0])
964 …mleid = self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v IPv6:MeshLocalAddr…
968 addrs = self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v IPv6:AllAddresses')
996 """set Thread network key
999 key: Thread network key used in secure the MLE/802.15.4 packet
1002 True: successful to set the Thread network key
1003 False: fail to set the Thread network key
1154 """get current device role in Thread Network"""
1156 …return self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Network:NodeType')[…
1159 """make device ready to join the Thread Network with a given role
1165 True: ready to set Thread Network parameter for joining desired Network
1185 elif eRoleId == Thread_Device_Role.Router:
1186 print('join as router')
1208 # always remain an ED, never request to be a router
1221 # set Thread device mode with a given role
1232 """get current partition id of Thread Network Partition from LeaderData
1235 The Thread network Partition Id
1242 return self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Network:PartitionId')[0]
1245 """get Thread device's parent extended address and rloc16 short address
1253 'getprop -v Thread:Parent')).split(' ')
1271 """power up the Thread device"""
1285 …if self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:State')[0]) != 'ass…
1292 """reset and rejoin to Thread Network without any timeout
1295 True: successful to reset and rejoin the Thread Network
1296 False: fail to reset and rejoin the Thread Network
1303 if self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:State')[0] != 'associated':
1322 cmd = 'ping %s -c 1 -s %s -I %s' % (destination, str(length), self.wpan_interface)
1344 cmd = 'ping %s -c 1 -s %s -I %s' % (destination, str(length), self.wpan_interface)
1358 versionStr = self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:Version')[0]
1363 """set Thread Network PAN ID
1369 True: successful to set the Thread Network PAN ID
1370 False: fail to set the Thread Network PAN ID
1380 cmd = self.wpan_cmd_prefix + 'setprop -s Network:PANID %s' % panid
1404 """kick router with a given router id from the Thread Network
1407 xRouterId: a given router id in hex format
1410 True: successful to remove the router from the Thread Network
1411 False: fail to remove the router from the Thread Network
1430 """set default mandatory Thread Network parameter value"""
1454 # indicate Thread device requests full or stable network data
1456 # indicate if Thread device experiences a power down event
1461 # indicate if Thread device is an active commissioner
1534 3: 21 - 255 (dB)
1535 2: 11 - 20 (dB)
1536 1: 3 - 9 (dB)
1537 0: 0 - 2 (dB)
1552 3: 21 - 255 (dB)
1553 2: 11 - 20 (dB)
1554 1: 3 - 9 (dB)
1555 0: 0 - 2 (dB)
1565 """remove the configured prefix on a border router
1568 prefixEntry: a on-mesh prefix entry
1571 True: successful to remove the prefix entry from border router
1572 False: fail to remove the prefix entry from border router
1578 """reset and join back Thread Network with a given timeout delay
1581 timeout: a timeout interval before rejoin Thread Network
1584 True: successful to reset and rejoin Thread Network
1585 False: fail to reset and rejoin the Thread Network
1611 …if self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:State')[0]) != 'ass…
1627 """configure the border router with a given prefix entry parameters
1630 P_Prefix: IPv6 prefix that is available on the Thread Network
1631 P_stable: true if the default router is expected to be stable network data
1632 P_default: true if border router offers the default route for P_Prefix
1633 P_slaac_preferred: true if allowing auto-configure address using P_Prefix
1634 P_Dhcp: is true if border router is a DHCPv6 Agent
1635 P_preference: is two-bit signed integer indicating router preference
1636 P_on_mesh: is true if P_Prefix is considered to be on-mesh
1637 P_nd_dns: is true if border router is able to supply DNS information obtained via ND
1640 True: successful to configure the border router with a given prefix entry
1641 False: fail to configure the border router with a given prefix entry
1650 parameter += ' -a -f'
1653 parameter += ' -s'
1656 parameter += ' -r'
1659 parameter += ' -d'
1662 parameter += ' -o'
1664 … cmd = self.wpan_cmd_prefix + 'add-prefix %s %s -P %d' % (prefix, parameter, P_preference)
1708 """ set the Key sequence counter corresponding to Thread network key
1733 """get current Thread Network key sequence"""
1736 keySequence = self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Network:KeyIndex')[0]
1764 """set whether the Thread device requires the full network data
1781 """configure border router with a given external route prefix entry
1786 R_Preference: a two-bit signed integer indicating Router preference
1789 -1: low
1792 True: successful to configure the border router with a given external route prefix
1793 False: fail to configure the border router with a given external route prefix
1800 cmd = self.wpan_cmd_prefix + 'add-route %s -l 64 -p %d' % (prefix, R_Preference)
1802 cmd = self.wpan_cmd_prefix + 'add-route %s -l 64 -p %d -n' % (prefix, R_Preference)
1831 """set extended PAN ID of Thread Network
1892 """set Thread Network Partition ID
1941 """get Rloc16 short address of Thread device"""
1946 """get mesh local EID of Thread device"""
1986 … childTimeout = self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v Thread:ChildTimeout')[0]
2004 cmd = self.wpan_cmd_prefix + 'joiner --start %s' % (strPSKc)
2019 …startCmd = self.wpan_cmd_prefix + 'form "%s" -c %s -T router' % (self.networkName, str(self.channe…
2037 xEUI: Joiner's EUI-64
2053 … cmd = self.wpan_cmd_prefix + 'commissioner joiner-add "%s" %s %s' % (eui64, str(timeout), strPSKd)
2113 cmd = self.wpan_cmd_prefix + 'joiner --start %s %s' % (strPSKd, self.provisioningUrl)
2117 self.__sendCommand(self.wpan_cmd_prefix + 'joiner --attach')
2160 payloadLineCount = (int(infoValue) + bytesInEachLine - 1) / bytesInEachLine
2162 payloadLineCount = payloadLineCount - 1
2196 cmd = self.wpan_cmd_prefix + 'commissioner energy-scan %s %s %s %s %s' % (
2227 … cmd = self.wpan_cmd_prefix + 'commissioner pan-id-query %s %s %s' % (panid, channelMask, sAddr)
2244 cmd = self.wpan_cmd_prefix + 'commissioner announce-begin %s %s %s %s' % (
2265 cmd = self.wpan_cmd_prefix + 'dataset mgmt-get-active'
2316 cmd = self.wpan_cmd_prefix + 'dataset mgmt-set-active'
2464 cmd = self.wpan_cmd_prefix + 'dataset mgmt-get-pending'
2508 cmd = self.wpan_cmd_prefix + 'dataset mgmt-set-pending'
2574 cmd = self.wpan_cmd_prefix + 'commissioner mgmt-get '
2606 cmd = self.wpan_cmd_prefix + 'commissioner mgmt-set '
2607 print('-------------------------------')
2614 print('-------------------------------')
2706 """force update to router as if there is child id request