bt_packet_logger.h File Reference

## Description

Capture the Bluetooth HCI trace from a device.

## Structs

struct | bt_packet_logger_header_t

## Macros

#define | BT_PACKETLOGGER_SERVICE_NAME "com.apple.bluetooth.BTPacketLogger"
#define | BT_MAX_PACKET_SIZE 65535

## Typedefs

typedef struct bt_packet_logger_client_private | bt_packet_logger_client_private
typedef bt_packet_logger_client_private * | bt_packet_logger_client_t
| The client handle.
typedef void(* | bt_packet_logger_receive_cb_t) (uint8_t *data, uint16_t len, void *user_data)
| Receives each hci packet received from the device.

## Enumerations

enum | bt_packet_logger_error_t { BT_PACKET_LOGGER_E_SUCCESS = 0 , BT_PACKET_LOGGER_E_INVALID_ARG = -1 , BT_PACKET_LOGGER_E_MUX_ERROR = -2 , BT_PACKET_LOGGER_E_SSL_ERROR = -3 , BT_PACKET_LOGGER_E_NOT_ENOUGH_DATA = -4 , BT_PACKET_LOGGER_E_TIMEOUT = -5 , BT_PACKET_LOGGER_E_UNKNOWN_ERROR = -256 }
| Error Codes.

## Functions

LIBIMOBILEDEVICE_API bt_packet_logger_error_t | bt_packet_logger_client_new (idevice_t device, lockdownd_service_descriptor_t service, bt_packet_logger_client_t *client)
| Connects to the bt_packet_logger service on the specified device.
LIBIMOBILEDEVICE_API bt_packet_logger_error_t | bt_packet_logger_client_start_service (idevice_t device, bt_packet_logger_client_t *client, const char *label)
| Starts a new bt_packet_logger service on the specified device and connects to it.
LIBIMOBILEDEVICE_API bt_packet_logger_error_t | bt_packet_logger_client_free (bt_packet_logger_client_t client)
| Disconnects a bt_packet_logger client from the device and frees up the bt_packet_logger client data.
LIBIMOBILEDEVICE_API bt_packet_logger_error_t | bt_packet_logger_start_capture (bt_packet_logger_client_t client, bt_packet_logger_receive_cb_t callback, void *user_data)
| Starts capturing the hci interface from the device using a callback.
LIBIMOBILEDEVICE_API bt_packet_logger_error_t | bt_packet_logger_stop_capture (bt_packet_logger_client_t client)
| Stops capturing the hci interface from the device.
LIBIMOBILEDEVICE_API bt_packet_logger_error_t | bt_packet_logger_receive_with_timeout (bt_packet_logger_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout)
| Receives data using the given bt_packet_logger client with specified timeout.