def MGMT_COMM_SET(self, Addr='ff02::1', xCommissionerSessionID=None, xSteeringData=None, xBorderRouterLocator=None,
                      xChannelTlv=None, ExceedMaxPayload=False):
        """send MGMT_COMM_SET command

        Returns:
            True: successful to send MGMT_COMM_SET
            False: fail to send MGMT_COMM_SET
        """
        print '%s call MGMT_COMM_SET' % self.port
        try:
            cmd = WPANCTL_CMD + 'commissioner mgmt-set '
            print "-------------------------------"
            print xCommissionerSessionID
            print xSteeringData
            print str(xSteeringData) + '   ' + str(hex(xSteeringData)[2:])
            print xBorderRouterLocator
            print xChannelTlv
            print ExceedMaxPayload
            print "-------------------------------"

            if xCommissionerSessionID != None:
                # use assigned session id
                cmd += '0b02' + str(xCommissionerSessionID)
            elif xCommissionerSessionID is None:
                # use original session id
                if self.isActiveCommissioner is True:
                    cmd += '0b02' + self.__getCommissionerSessionId().lstrip('0x')
                else:
                    pass

            if xSteeringData != None:
                cmd += '08' + str(len(hex(xSteeringData)[2:])) + str(hex(xSteeringData)[2:])

            if xBorderRouterLocator != None:
                cmd += '0902' + str(hex(xBorderRouterLocator))

            if xChannelTlv != None:
                cmd += '000300' + hex(xChannelTlv).lstrip('0x').zfill(4)

            print cmd

            return self.__sendCommand(cmd)[0] != 'Fail'

        except Exception, e:
            ModuleHelper.WriteIntoDebugLogger('MGMT_COMM_SET() Error: ' + str(e))
def MGMT_COMM_SET ( self , Addr = 'ff02::1' , xCommissionerSessionID = None , xSteeringData = None , xBorderRouterLocator = None , xChannelTlv = None , ExceedMaxPayload = False ) : print '%s call MGMT_COMM_SET' % self . port try : cmd = WPANCTL_CMD + 'commissioner mgmt-set ' print "-------------------------------" print xCommissionerSessionID print xSteeringData print str ( xSteeringData ) + '   ' + str ( hex ( xSteeringData ) [ 2 : ] ) print xBorderRouterLocator print xChannelTlv print ExceedMaxPayload print "-------------------------------" if xCommissionerSessionID != None : cmd += '0b02' + str ( xCommissionerSessionID ) elif xCommissionerSessionID is None : if self . isActiveCommissioner is True : cmd += '0b02' + self . __getCommissionerSessionId ( ) . lstrip ( '0x' ) else : pass if xSteeringData != None : cmd += '08' + str ( len ( hex ( xSteeringData ) [ 2 : ] ) ) + str ( hex ( xSteeringData ) [ 2 : ] ) if xBorderRouterLocator != None : cmd += '0902' + str ( hex ( xBorderRouterLocator ) ) if xChannelTlv != None : cmd += '000300' + hex ( xChannelTlv ) . lstrip ( '0x' ) . zfill ( 4 ) print cmd return self . __sendCommand ( cmd ) [ 0 ] != 'Fail' except Exception , e : ModuleHelper . WriteIntoDebugLogger ( 'MGMT_COMM_SET() Error: ' + str ( e ) )
send MGMT_COMM_SET command

        Returns:
            True: successful to send MGMT_COMM_SET
            False: fail to send MGMT_COMM_SET