auto-pts: log BTP responses by btpclient

This commit is contained in:
Matthias Ringwald 2019-11-06 11:49:45 +01:00
parent 869e6d4e66
commit afa0a6aa0b

View File

@ -67,6 +67,8 @@
#define BTP_PAYLOAD_LEN_MAX 255
#define BTP_HEADER_LEN 5
#define LOG_BTP
/** prototypes */
static void btp_socket_hci_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type);
@ -158,6 +160,11 @@ void btp_socket_process(btstack_data_source_t *socket_ds, btstack_data_source_ca
void btp_socket_send_packet(uint16_t service_id, uint8_t opcode, uint8_t controller_index, uint16_t length, const uint8_t *data){
if (socket_ds.source.fd == 0) return;
#ifdef LOG_BTP
log_info("btp_socket_send_packet: service_id %0x, opcode %02x, controller_index 0x%02x, length %u", service_id, opcode, controller_index, length);
log_info_hexdump(data, length);
#endif
uint8_t header[BTP_HEADER_LEN];
header[0] = service_id;
header[1] = opcode;