diff --git a/port/libusb-intel/main.c b/port/libusb-intel/main.c index 3953df00f..f10b67251 100644 --- a/port/libusb-intel/main.c +++ b/port/libusb-intel/main.c @@ -91,8 +91,26 @@ static btstack_packet_callback_registration_t hci_event_callback_registration; static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){ UNUSED(channel); UNUSED(size); + uint8_t i; + uint8_t usb_path_len; + const uint8_t * usb_path; + if (packet_type != HCI_EVENT_PACKET) return; + switch (hci_event_packet_get_type(packet)){ + case HCI_EVENT_TRANSPORT_USB_INFO: + usb_path_len = hci_event_transport_usb_info_get_path_len(packet); + usb_path = hci_event_transport_usb_info_get_path(packet); + // print device path + printf("USB device 0x%04x/0x%04x, path: ", + hci_event_transport_usb_info_get_vendor_id(packet), + hci_event_transport_usb_info_get_product_id(packet)); + for (i=0;i