From 785879c69153ab6b5a8ea6702944d37eaa9afc7f Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 5 Feb 2018 10:01:25 +0100 Subject: [PATCH] hci_dump: print hci_dump.pklg path to console for all windows & posix ports --- port/posix-h4-atwilc3000/main.c | 4 +++- port/posix-h4-da14581/main.c | 4 +++- port/posix-h4-zephyr/main.c | 4 +++- port/posix-h4/main.c | 4 +++- port/posix-h5-bcm/main.c | 4 +++- port/posix-h5/main.c | 4 +++- port/windows-h4-zephyr/main.c | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/port/posix-h4-atwilc3000/main.c b/port/posix-h4-atwilc3000/main.c index a126a60a6..fb6613e71 100644 --- a/port/posix-h4-atwilc3000/main.c +++ b/port/posix-h4-atwilc3000/main.c @@ -151,7 +151,9 @@ int main(int argc, const char * argv[]){ btstack_run_loop_init(btstack_run_loop_posix_get_instance()); // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + const char * pklg_path = "/tmp/hci_dump.pklg"; + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); + printf("Packet Log: %s\n", pklg_path); // pick serial port and configure uart block driver transport_config.device_name = "/dev/tty.usbserial-A96PXBJ7"; diff --git a/port/posix-h4-da14581/main.c b/port/posix-h4-da14581/main.c index ab1cfcdc0..8ae116473 100644 --- a/port/posix-h4-da14581/main.c +++ b/port/posix-h4-da14581/main.c @@ -149,7 +149,9 @@ int main(int argc, const char * argv[]){ btstack_run_loop_init(btstack_run_loop_posix_get_instance()); // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + const char * pklg_path = "/tmp/hci_dump.pklg"; + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); + printf("Packet Log: %s\n", pklg_path); // pick serial port and configure uart block driver transport_config.device_name = "/dev/tty.usbmodem1442311"; diff --git a/port/posix-h4-zephyr/main.c b/port/posix-h4-zephyr/main.c index f058101ff..c85121652 100644 --- a/port/posix-h4-zephyr/main.c +++ b/port/posix-h4-zephyr/main.c @@ -126,7 +126,9 @@ int main(int argc, const char * argv[]){ btstack_run_loop_init(btstack_run_loop_posix_get_instance()); // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + const char * pklg_path = "/tmp/hci_dump.pklg"; + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); + printf("Packet Log: %s\n", pklg_path); // pick serial port config.device_name = "/dev/tty.usbmodem14514421"; // PCA10040 nRF52832 diff --git a/port/posix-h4/main.c b/port/posix-h4/main.c index a4b2b8217..7163bfc22 100644 --- a/port/posix-h4/main.c +++ b/port/posix-h4/main.c @@ -219,7 +219,9 @@ int main(int argc, const char * argv[]){ btstack_run_loop_init(btstack_run_loop_posix_get_instance()); // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + const char * pklg_path = "/tmp/hci_dump.pklg"; + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); + printf("Packet Log: %s\n", pklg_path); // pick serial port // config.device_name = "/dev/tty.usbserial-A900K2WS"; // DFROBOT diff --git a/port/posix-h5-bcm/main.c b/port/posix-h5-bcm/main.c index 2dc8cadd9..6b3e9acd0 100644 --- a/port/posix-h5-bcm/main.c +++ b/port/posix-h5-bcm/main.c @@ -125,7 +125,9 @@ int main(int argc, const char * argv[]){ btstack_memory_init(); // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + const char * pklg_path = "/tmp/hci_dump.pklg"; + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); + printf("Packet Log: %s\n", pklg_path); // setup run loop btstack_run_loop_init(btstack_run_loop_posix_get_instance()); diff --git a/port/posix-h5/main.c b/port/posix-h5/main.c index 3ad0413a1..527846fde 100644 --- a/port/posix-h5/main.c +++ b/port/posix-h5/main.c @@ -182,7 +182,9 @@ int main(int argc, const char * argv[]){ btstack_run_loop_init(btstack_run_loop_posix_get_instance()); // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + const char * pklg_path = "/tmp/hci_dump.pklg"; + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); + printf("Packet Log: %s\n", pklg_path); // pick serial port // config.device_name = "/dev/tty.usbserial-A900K2WS"; // DFROBOT diff --git a/port/windows-h4-zephyr/main.c b/port/windows-h4-zephyr/main.c index c2bfee032..1558a82a4 100644 --- a/port/windows-h4-zephyr/main.c +++ b/port/windows-h4-zephyr/main.c @@ -127,7 +127,9 @@ int main(int argc, const char * argv[]){ btstack_run_loop_init(btstack_run_loop_windows_get_instance()); // use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT - hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER); + const char * pklg_path = "hci_dump.pklg"; + hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER); + printf("Packet Log: %s\n", pklg_path); // pick serial port config.device_name = "COM6";