parameters: (self, strPSKd='THREADJPAKETEST', waitTime=20)
docstring: start joiner
  
          Args:
              strPSKd: Joiner's PSKd
  
          Returns:
              True: successful to start joiner
              False: fail to start joiner
docstring_summary: start joiner
docstring_tokens: start joiner
function: def joinCommissioned(self, strPSKd='THREADJPAKETEST', waitTime=20):
          """start joiner
  
          Args:
              strPSKd: Joiner's PSKd
  
          Returns:
              True: successful to start joiner
              False: fail to start joiner
          """
          self.log("joinCommissioned on channel %s", self.getChannel())
  
          if self.deviceRole in [
                  Thread_Device_Role.Leader,
                  Thread_Device_Role.Router,
                  Thread_Device_Role.REED,
          ]:
              self.__setRouterSelectionJitter(1)
          self.__executeCommand('ifconfig up')
          strPSKd = self.__normalizePSKd(strPSKd)
          cmd = 'joiner start %s %s' % (strPSKd, self.provisioningUrl)
          print(cmd)
          if self.__executeCommand(cmd)[-1] == 'Done':
              maxDuration = 150  # seconds
              self.joinCommissionedStatus = self.joinStatus['ongoing']
  
              if self.logThreadStatus == self.logStatus['stop']:
                  self.logThread = ThreadRunner.run(target=self.__readCommissioningLogs, args=(maxDuration,))
  
              t_end = time.time() + maxDuration
              while time.time() < t_end:
                  if self.joinCommissionedStatus == self.joinStatus['succeed']:
                      break
                  elif self.joinCommissionedStatus == self.joinStatus['failed']:
                      return False
  
                  self.sleep(1)
  
              self.setMAC(self.mac)
              self.__executeCommand('thread start')
              self.wait_for_attach_to_the_network(expected_role=self.deviceRole,
                                                  timeout=self.NETWORK_ATTACHMENT_TIMEOUT,
                                                  raise_assert=True)
              return True
          else:
              return False
function_tokens: def joinCommissioned ( self , strPSKd = 'THREADJPAKETEST' , waitTime = 20 ) : self . log ( "joinCommissioned on channel %s" , self . getChannel ( ) ) if self . deviceRole in [ Thread_Device_Role . Leader , Thread_Device_Role . Router , Thread_Device_Role . REED , ] : self . __setRouterSelectionJitter ( 1 ) self . __executeCommand ( 'ifconfig up' ) strPSKd = self . __normalizePSKd ( strPSKd ) cmd = 'joiner start %s %s' % ( strPSKd , self . provisioningUrl ) print ( cmd ) if self . __executeCommand ( cmd ) [ - 1 ] == 'Done' : maxDuration = 150 # seconds self . joinCommissionedStatus = self . joinStatus [ 'ongoing' ] if self . logThreadStatus == self . logStatus [ 'stop' ] : self . logThread = ThreadRunner . run ( target = self . __readCommissioningLogs , args = ( maxDuration , ) ) t_end = time . time ( ) + maxDuration while time . time ( ) < t_end : if self . joinCommissionedStatus == self . joinStatus [ 'succeed' ] : break elif self . joinCommissionedStatus == self . joinStatus [ 'failed' ] : return False self . sleep ( 1 ) self . setMAC ( self . mac ) self . __executeCommand ( 'thread start' ) self . wait_for_attach_to_the_network ( expected_role = self . deviceRole , timeout = self . NETWORK_ATTACHMENT_TIMEOUT , raise_assert = True ) return True else : return False