From 020654536ac466bea504ee8425f344c37eff7086 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 22 Jul 2016 17:19:05 +0200 Subject: [PATCH 1/2] libusb: add USB path to packet log file name --- port/libusb/main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/port/libusb/main.c b/port/libusb/main.c index a97c972c6..3a50c091c 100644 --- a/port/libusb/main.c +++ b/port/libusb/main.c @@ -123,7 +123,16 @@ int main(int argc, const char * argv[]){ } // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + + char pklg_path[100]; + strcpy(pklg_path, "/tmp/hci_dump"); + if (usb_path_len){ + strcat(pklg_path, "_"); + strcat(pklg_path, argv[2]); + } + strcat(pklg_path, ".pklg"); + printf("Packet Log: %s\n", pklg_path); + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); // init HCI hci_init(hci_transport_usb_instance(), NULL); From 9620f7c41938bc08711de4bf1e8777a2a112dcac Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 22 Jul 2016 17:19:48 +0200 Subject: [PATCH 2/2] pts: fix compile warning in ble_central_test --- test/pts/ble_central_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pts/ble_central_test.c b/test/pts/ble_central_test.c index ee43168b3..61f56dd0a 100644 --- a/test/pts/ble_central_test.c +++ b/test/pts/ble_central_test.c @@ -272,7 +272,7 @@ static void handle_advertising_event(uint8_t * packet, int size){ for (ad_iterator_init(&context, adv_size, (uint8_t *)adv_data) ; ad_iterator_has_more(&context) ; ad_iterator_next(&context)){ uint8_t data_type = ad_iterator_get_data_type(&context); // uint8_t size = ad_iterator_get_data_len(&context); - uint8_t * data = ad_iterator_get_data(&context); + const uint8_t * data = ad_iterator_get_data(&context); switch (data_type){ case 1: // AD_FLAGS if (*data & 1) printf("LE Limited Discoverable Mode, ");