ports: disable hci dump in all ports

This commit is contained in:
Matthias Ringwald 2021-03-09 14:37:15 +01:00
parent beb3c81d4f
commit 98451c7b10
21 changed files with 21 additions and 89 deletions

View File

@ -131,7 +131,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
static void btstack_setup(void){
hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
/// GET STARTED with BTstack ///
btstack_memory_init();

View File

@ -234,7 +234,7 @@ void BTSTACK_Initialize ( void )
btstack_memory_init();
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
// setup uart driver
const btstack_uart_block_t * uart_block_driver = btstack_uart_block_embedded_instance();

View File

@ -147,7 +147,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// setup run loop

View File

@ -197,7 +197,7 @@ int main(int argc, const char * argv[]){
}
strcat(pklg_path, ".pklg");
printf("Packet Log: %s\n", pklg_path);
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// setup USB Transport
transport = hci_transport_usb_instance();

View File

@ -221,7 +221,7 @@ int main(int argc, const char * argv[]){
}
strcat(pklg_path, ".pklg");
printf("Packet Log: %s\n", pklg_path);
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// init HCI
hci_init(hci_transport_usb_instance(), NULL);

View File

@ -274,7 +274,7 @@ void main(void)
btstack_run_loop_init(btstack_run_loop_zephyr_get_instance());
// enable full log output while porting
hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
// init HCI
hci_init(transport_get_instance(), NULL);

View File

@ -585,7 +585,7 @@ int main(void)
hci_init(&hci_transport, NULL);
// enable full log output while porting
hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hand over to btstack embedded code
btstack_main();

View File

@ -170,7 +170,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port and configure uart block driver

View File

@ -165,7 +165,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port and configure uart block driver

View File

@ -165,7 +165,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port and configure uart block driver

View File

@ -141,7 +141,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port

View File

@ -242,7 +242,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port

View File

@ -204,7 +204,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port

View File

@ -302,7 +302,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "/tmp/hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// setup run loop

View File

@ -117,7 +117,7 @@ void btstack_port(void){
hci_init(hci_transport, NULL);
// enable full log output while porting
hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hand over to btstack embedded code
btstack_main();

View File

@ -582,7 +582,7 @@ void port_thread(void* args){
// enable packet logger
#ifdef ENABLE_HCI_DUMP
hci_dump_open(NULL, HCI_DUMP_STDOUT);
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
#endif
/// GET STARTED with BTstack ///
btstack_memory_init();

View File

@ -164,7 +164,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port and configure uart block driver

View File

@ -143,7 +143,7 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
const char * pklg_path = "hci_dump.pklg";
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
printf("Packet Log: %s\n", pklg_path);
// pick serial port

View File

@ -226,7 +226,7 @@ int main(int argc, const char * argv[]){
btstack_memory_init();
btstack_run_loop_init(btstack_run_loop_windows_get_instance());
hci_dump_open("hci_dump.pklg", HCI_DUMP_PACKETLOGGER);
// hci_dump_open("hci_dump.pklg", HCI_DUMP_PACKETLOGGER);
// pick serial port
config.device_name = "\\\\.\\COM7";

View File

@ -152,27 +152,6 @@ int main(int argc, const char * argv[]){
printf("BTstack/windows-winusb booting up\n");
#if 0
int usb_path_len = 0;
uint8_t usb_path[USB_MAX_PATH_LEN];
if (argc >= 3 && strcmp(argv[1], "-u") == 0){
// parse command line options for "-u 11:22:33"
const char * port_str = argv[2];
printf("Specified USB Path: ");
while (1){
char * delimiter;
int port = strtol(port_str, &delimiter, 16);
usb_path[usb_path_len] = port;
usb_path_len++;
printf("%02x ", port);
if (!delimiter) break;
if (*delimiter != ':' && *delimiter != '-') break;
port_str = delimiter+1;
}
printf("\n");
}
#endif
/// GET STARTED with BTstack ///
btstack_memory_init();
btstack_run_loop_init(btstack_run_loop_windows_get_instance());
@ -183,21 +162,11 @@ int main(int argc, const char * argv[]){
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
#if 1
char pklg_path[100];
strcpy(pklg_path, "hci_dump");
#if 0
if (usb_path_len){
strcat(pklg_path, "_");
strcat(pklg_path, argv[2]);
}
#endif
strcat(pklg_path, ".pklg");
printf("Packet Log: %s\n", pklg_path);
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
#else
hci_dump_open(NULL, HCI_DUMP_STDOUT);
#endif
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// handle CTRL-c
signal(SIGINT, sigint_handler);

View File

@ -124,52 +124,15 @@ int main(int argc, const char * argv[]){
printf("BTstack/windows-winusb booting up\n");
#if 0
int usb_path_len = 0;
uint8_t usb_path[USB_MAX_PATH_LEN];
if (argc >= 3 && strcmp(argv[1], "-u") == 0){
// parse command line options for "-u 11:22:33"
const char * port_str = argv[2];
printf("Specified USB Path: ");
while (1){
char * delimiter;
int port = strtol(port_str, &delimiter, 16);
usb_path[usb_path_len] = port;
usb_path_len++;
printf("%02x ", port);
if (!delimiter) break;
if (*delimiter != ':' && *delimiter != '-') break;
port_str = delimiter+1;
}
printf("\n");
}
#endif
/// GET STARTED with BTstack ///
btstack_memory_init();
btstack_run_loop_init(btstack_run_loop_windows_get_instance());
// if (usb_path_len){
// hci_transport_usb_set_path(usb_path_len, usb_path);
// }
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
#if 1
char pklg_path[100];
strcpy(pklg_path, "hci_dump");
#if 0
if (usb_path_len){
strcat(pklg_path, "_");
strcat(pklg_path, argv[2]);
}
#endif
strcat(pklg_path, ".pklg");
printf("Packet Log: %s\n", pklg_path);
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
#else
hci_dump_open(NULL, HCI_DUMP_STDOUT);
#endif
// hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
// init HCI
hci_init(hci_transport_usb_instance(), NULL);