Lines Matching refs:cmd
189 def __sendCommand(self, cmd): argument
200 logging.info('%s: sendCommand[%s]', self.port, cmd)
216 ssh_stdin, ssh_stdout, ssh_stderr = self.handle.exec_command(cmd)
218 self._sendline(cmd)
219 self._expect(cmd)
221 logging.exception('%s: failed to send command[%s]: %s', self.port, cmd, str(e))
250 logging.info('%s: send command[%s] done!', self.port, cmd)
272 logging.info('%s: send command[%s] done!', self.port, cmd)
323 cmd = self.wpan_cmd_prefix + 'setprop Thread:DeviceMode %d' % mode
324 return self.__sendCommand(cmd)[0] != 'Fail'
341 … cmd = self.wpan_cmd_prefix + 'setprop Thread:RouterUpgradeThreshold %s' % str(iThreshold)
342 return self.__sendCommand(cmd)[0] != 'Fail'
360 … cmd = self.wpan_cmd_prefix + 'setprop Thread:RouterDowngradeThreshold %s' % str(iThreshold)
361 return self.__sendCommand(cmd)[0] != 'Fail'
377 … cmd = self.wpan_cmd_prefix + 'setprop Thread:RouterSelectionJitter %s' % str(iRouterJitter)
378 return self.__sendCommand(cmd) != 'Fail'
392 cmd = self.wpan_cmd_prefix + 'setprop MAC:' + mode.capitalize() + ':Enabled 1'
396 … cmd = self.wpan_cmd_prefix + 'setprop MAC:' + self._addressfilterMode.capitalize() + ':Enabled 0'
402 if self.__sendCommand(cmd)[0] != 'Fail':
640 cmd = self.wpan_cmd_prefix + 'setprop NCP:ChannelMask %s' % channelMask
643 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
674 … cmd = self.wpan_cmd_prefix + 'setprop Network:KeySwitchGuardTime %s' % str(iKeySwitchGuardTime)
675 if self.__sendCommand(cmd)[0] != 'Fail':
834 cmd = self.wpan_cmd_prefix + 'setprop -s Network:Name "%s"' % networkName
837 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
857 cmd = self.wpan_cmd_prefix + 'setprop NCP:Channel %s' % channel
860 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
888 cmd = self.wpan_cmd_prefix + 'setprop NCP:MACAddress %s' % address64
890 if self.__sendCommand(cmd)[0] != 'Fail':
1011 cmd = self.wpan_cmd_prefix + 'setprop Network:Key %s' % networkKey
1015 cmd = self.wpan_cmd_prefix + 'setprop Network:Key %s' % networkKey
1020 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
1050 cmd = self.wpan_cmd_prefix + 'insert MAC:Denylist:Entries %s' % macAddr
1051 ret = self.__sendCommand(cmd)[0] != 'Fail'
1083 cmd = self.wpan_cmd_prefix + 'insert MAC:Allowlist:Entries %s' % macAddr
1084 ret = self.__sendCommand(cmd)[0] != 'Fail'
1114 cmd = self.wpan_cmd_prefix + 'remove MAC:Denylist:Entries ' + addr
1115 self.__sendCommand(cmd)
1143 cmd = self.wpan_cmd_prefix + 'remove MAC:Allowlist:Entries ' + addr
1144 self.__sendCommand(cmd)
1322 cmd = 'ping %s -c 1 -s %s -I %s' % (destination, str(length), self.wpan_interface)
1324 self.handle.exec_command(cmd)
1326 self._sendline(cmd)
1327 self._expect(cmd)
1344 cmd = 'ping %s -c 1 -s %s -I %s' % (destination, str(length), self.wpan_interface)
1346 self.handle.exec_command(cmd)
1348 self._sendline(cmd)
1349 self._expect(cmd)
1380 cmd = self.wpan_cmd_prefix + 'setprop -s Network:PANID %s' % panid
1383 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
1424 cmd = 'releaserouterid %s' % routerId
1425 return self.__sendCommand(cmd)[0] != 'Fail'
1521 cmd = self.wpan_cmd_prefix + 'setprop NCP:SleepyPollInterval %s' % str(iPollPeriod)
1522 print(cmd)
1523 return self.__sendCommand(cmd)[0] != 'Fail'
1664 … cmd = self.wpan_cmd_prefix + 'add-prefix %s %s -P %d' % (prefix, parameter, P_preference)
1666 print(cmd)
1667 if self.__sendCommand(cmd)[0] != 'Fail':
1701 cmd = self.wpan_cmd_prefix + 'setprop NCP:SleepyPollInterval %s' % str(iTimeOut * 1000)
1702 print(cmd)
1703 return self.__sendCommand(cmd)[0] != 'Fail'
1723 cmd = self.wpan_cmd_prefix + 'setprop Network:KeyIndex %s' % str(iKeySequenceValue)
1724 if self.__sendCommand(cmd)[0] != 'Fail':
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)
1803 print(cmd)
1805 if self.__sendCommand(cmd)[0] != 'Fail':
1847 cmd = self.wpan_cmd_prefix + 'setprop Network:XPANID %s' % xpanid
1851 cmd = self.wpan_cmd_prefix + 'setprop Network:XPANID %s' % xpanid
1856 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
1904 …cmd = self.wpan_cmd_prefix + 'setprop Network:PartitionId %s' % (str(hex(partationId)).rstrip('L'))
1905 print(cmd)
1906 return self.__sendCommand(cmd)[0] != 'Fail'
1954 cmd = self.wpan_cmd_prefix + 'setprop IPv6:MeshLocalPrefix %s' % sMeshLocalPrefix
1957 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
2004 cmd = self.wpan_cmd_prefix + 'joiner --start %s' % (strPSKc)
2005 print(cmd)
2006 if self.__sendCommand(cmd)[0] != 'Fail':
2022 cmd = self.wpan_cmd_prefix + 'commissioner start'
2023 print(cmd)
2024 if self.__sendCommand(cmd)[0] != 'Fail':
2053 … cmd = self.wpan_cmd_prefix + 'commissioner joiner-add "%s" %s %s' % (eui64, str(timeout), strPSKd)
2054 print(cmd)
2057 if self.__sendCommand(cmd)[0] != 'Fail':
2075 cmd = self.wpan_cmd_prefix + 'setprop Commissioner:ProvisioningUrl %s' % (strURL)
2076 print(cmd)
2077 return self.__sendCommand(cmd)[0] != 'Fail'
2089 cmd = self.wpan_cmd_prefix + 'commissioner start'
2090 print(cmd)
2093 if self.__sendCommand(cmd)[0] != 'Fail':
2113 cmd = self.wpan_cmd_prefix + 'joiner --start %s %s' % (strPSKd, self.provisioningUrl)
2114 print(cmd)
2115 if self.__sendCommand(cmd)[0] != 'Fail':
2196 cmd = self.wpan_cmd_prefix + 'commissioner energy-scan %s %s %s %s %s' % (
2203 print(cmd)
2204 return self.__sendCommand(cmd) != 'Fail'
2227 … cmd = self.wpan_cmd_prefix + 'commissioner pan-id-query %s %s %s' % (panid, channelMask, sAddr)
2228 print(cmd)
2229 return self.__sendCommand(cmd) != 'Fail'
2244 cmd = self.wpan_cmd_prefix + 'commissioner announce-begin %s %s %s %s' % (
2250 print(cmd)
2251 return self.__sendCommand(cmd) != 'Fail'
2265 cmd = self.wpan_cmd_prefix + 'dataset mgmt-get-active'
2281 print(cmd)
2283 return self.__sendCommand(cmd)[0] != 'Fail'
2316 cmd = self.wpan_cmd_prefix + 'dataset mgmt-set-active'
2445 print(cmd)
2450 return self.__sendCommand(cmd)[0] != 'Fail'
2464 cmd = self.wpan_cmd_prefix + 'dataset mgmt-get-pending'
2480 print(cmd)
2482 return self.__sendCommand(cmd)[0] != 'Fail'
2508 cmd = self.wpan_cmd_prefix + 'dataset mgmt-set-pending'
2558 print(cmd)
2560 return self.__sendCommand(cmd)[0] != 'Fail'
2574 cmd = self.wpan_cmd_prefix + 'commissioner mgmt-get '
2580 cmd += tlvs
2582 print(cmd)
2584 return self.__sendCommand(cmd)[0] != 'Fail'
2606 cmd = self.wpan_cmd_prefix + 'commissioner mgmt-set '
2618 cmd += '0b02' + str(xCommissionerSessionID)
2622 cmd += '0b02' + self.__lstrip0x(self.__getCommissionerSessionId())
2627 cmd += '08' + str(len(hex(xSteeringData)[2:])) + str(hex(xSteeringData)[2:])
2630 cmd += '0902' + str(hex(xBorderRouterLocator))
2633 cmd += '000300' + '%04x' % xChannelTlv
2635 print(cmd)
2637 return self.__sendCommand(cmd)[0] != 'Fail'
2651 cmd = self.wpan_cmd_prefix + 'setprop Network:PSKc %s' % strPSKc
2654 … return self.__sendCommand(cmd)[0] != 'Fail' and self.__sendCommand(datasetCmd)[0] != 'Fail'
2665 cmd = self.wpan_cmd_prefix + 'setprop Dataset:ActiveTimestamp %s' % sActiveTimestamp
2667 return self.__sendCommand(cmd)[0] != 'Fail'
2692 cmd = self.wpan_cmd_prefix + 'commissioner stop'
2693 print(cmd)
2694 if self.__sendCommand(cmd)[0] != 'Fail':