hci_dump_posix_fs: improve iso summary

This commit is contained in:
Matthias Ringwald 2023-11-28 19:49:59 +01:00
parent 062276f92b
commit fb5a871d30

View File

@ -96,12 +96,17 @@ static uint16_t hci_dump_iso_summary(uint8_t in, uint8_t *packet, uint16_t len)
time_stamp = little_endian_read_32(packet, pos);
pos += 4;
}
uint16_t packet_sequence = little_endian_read_16(packet, pos);
pos += 2;
uint16_t iso_sdu_len = little_endian_read_16(packet, pos);
uint8_t packet_status_flag = packet[pos+1] >> 6;
return snprintf(log_message_buffer,sizeof(log_message_buffer), "ISO %s, handle %04x, pb %u, ts 0x%08x, sequence 0x%04x, packet status %u, iso len %u",
in ? "IN" : "OUT", conn_handle, pb, time_stamp, packet_sequence, packet_status_flag, iso_sdu_len);
if ((pb & 1) == 0) {
uint16_t packet_sequence = little_endian_read_16(packet, pos);
pos += 2;
uint16_t iso_sdu_len = little_endian_read_16(packet, pos);
uint8_t packet_status_flag = packet[pos+1] >> 6;
return snprintf(log_message_buffer,sizeof(log_message_buffer), "ISO %s, handle %04x, pb %u, ts 0x%08x, size %u, sequence 0x%04x, packet status %u, iso pdu len %u",
in ? "IN" : "OUT", conn_handle, pb, time_stamp, len, packet_sequence, packet_status_flag, iso_sdu_len);
} else {
return snprintf(log_message_buffer,sizeof(log_message_buffer), "ISO %s, handle %04x, pb %u, ts 0x%08x, size %u",
in ? "IN" : "OUT", conn_handle, pb, time_stamp, len);
}
}
static void hci_dump_posix_fs_log_packet(uint8_t packet_type, uint8_t in, uint8_t *packet, uint16_t len) {