页次: 1
hci_dump_open(pklg_path, HCI_DUMP_PACKETLOGGER);
改成这样:
hci_dump_open(NULL, HCI_DUMP_STDOUT);
试一试.
这样是把log直接输出到控制台,而不是文件。
log如下:
root@helloworld:/mnt/mtdblock/bt# ./le_data_channel_server
Packet Log: /tmp/hci_dump.pklg
**********__line:321,le_data_channel_server
[2017-05-28 01:53:46.144] LOG -- l2cap.c.3522: L2CAP_LE_REGISTER_SERVICE psm 0x25
[2017-05-28 01:53:46.144] LOG -- hci.c.2800: hci_power_control: 1, current mode 0
[2017-05-28 01:53:46.144] LOG -- btstack_uart_block_posix.c.177: h4_set_baudrate 115200
[2017-05-28 01:53:46.244] LOG -- hci.c.3859: BTSTACK_EVENT_STATE 1
[2017-05-28 01:53:46.244] EVT <= 60 01 01
[2017-05-28 01:53:46.245] CMD => 03 0C 00
[2017-05-28 01:53:46.445] LOG -- hci.c.1098: Resend HCI Reset
root@helloworld:/mnt/mtdblock/bt# ./le_data_channel_client
Packet Log: /tmp/hci_dump.pklg
[2017-05-28 01:54:12.593] LOG -- hci.c.2800: hci_power_control: 1, current mode 0
[2017-05-28 01:54:12.594] LOG -- btstack_uart_block_posix.c.177: h4_set_baudrate 115200
[2017-05-28 01:54:12.695] LOG -- hci.c.3859: BTSTACK_EVENT_STATE 1
[2017-05-28 01:54:12.695] EVT <= 60 01 01
[2017-05-28 01:54:12.696] CMD => 03 0C 00
[2017-05-28 01:54:12.896] LOG -- hci.c.1098: Resend HCI Reset
我把hci_dump.pklg改成了7z的后缀传的
页次: 1