def _open_tracing_interface(self, connection_id, callback):
        """Enable the tracing interface for this IOTile device

        Args:
            connection_id (int): The unique identifier for the connection
            callback (callback): Callback to be called when this command finishes
                callback(conn_id, adapter_id, success, failure_reason)
        """

        try:
            context = self.connections.get_context(connection_id)
        except ArgumentError:
            callback(connection_id, self.id, False, "Could not find connection information")
            return

        self._logger.info("Attempting to enable tracing")
        self.connections.begin_operation(connection_id, 'open_interface', callback, self.get_config('default_timeout'))

        try:
            characteristic = context['services'][TileBusService][TracingChar]
        except KeyError:
            self.connections.finish_operation(
                connection_id,
                False,
                "Can't find characteristic to open tracing interface"
            )
            return

        # Register a callback function in the notifications callbacks, to trigger `on_trace` callback when a trace is
        # notified.
        self._register_notification_callback(
            context['connection_handle'],
            characteristic.value_handle,
            lambda trace_chunk: self._trigger_callback('on_trace', connection_id, bytearray(trace_chunk))
        )

        self.bable.set_notification(
            enabled=True,
            connection_handle=context['connection_handle'],
            characteristic=characteristic,
            on_notification_set=[self._on_interface_opened, context],
            on_notification_received=self._on_notification_received,
            timeout=1.0,
            sync=False
        )
def _open_tracing_interface ( self , connection_id , callback ) : try : context = self . connections . get_context ( connection_id ) except ArgumentError : callback ( connection_id , self . id , False , "Could not find connection information" ) return self . _logger . info ( "Attempting to enable tracing" ) self . connections . begin_operation ( connection_id , 'open_interface' , callback , self . get_config ( 'default_timeout' ) ) try : characteristic = context [ 'services' ] [ TileBusService ] [ TracingChar ] except KeyError : self . connections . finish_operation ( connection_id , False , "Can't find characteristic to open tracing interface" ) return self . _register_notification_callback ( context [ 'connection_handle' ] , characteristic . value_handle , lambda trace_chunk : self . _trigger_callback ( 'on_trace' , connection_id , bytearray ( trace_chunk ) ) ) self . bable . set_notification ( enabled = True , connection_handle = context [ 'connection_handle' ] , characteristic = characteristic , on_notification_set = [ self . _on_interface_opened , context ] , on_notification_received = self . _on_notification_received , timeout = 1.0 , sync = False )
Enable the tracing interface for this IOTile device

        Args:
            connection_id (int): The unique identifier for the connection
            callback (callback): Callback to be called when this command finishes
                callback(conn_id, adapter_id, success, failure_reason)