From c3ffc19697d37dc9bed815d5efa18d63e59ac68a Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Fri, 9 Apr 2010 19:44:02 +0000 Subject: [PATCH] init sm, add raw output --- 3rdparty/LogExtension.mm | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/3rdparty/LogExtension.mm b/3rdparty/LogExtension.mm index d2e2d7c78..31890b6ac 100644 --- a/3rdparty/LogExtension.mm +++ b/3rdparty/LogExtension.mm @@ -44,6 +44,7 @@ typedef enum { HCI_DUMP_BLUEZ = 0, HCI_DUMP_PACKETLOGGER, + HCI_DUMP_RAW, HCI_DUMP_STDOUT } hci_dump_format_t; @@ -147,7 +148,9 @@ MSHook(int, socket, int domain, int type, int protocol){ if (domain == 0x20 && type == 0x01 && protocol == 0x02){ printf("Opening BT device\n"); bt_filedesc = res; - hci_dump_open( "/tmp/BTServer.pklg", HCI_DUMP_PACKETLOGGER); + hci_dump_open( "/tmp/BTServer.pklg", HCI_DUMP_RAW); + h5_slip_init(&read_sm); + h5_slip_init(&write_sm); } return res; } @@ -246,6 +249,17 @@ static void hexdump(void *data, int size){ printf("\n"); } +static void hexdump2(void *data, int size){ + int i; + char buf[10]; + buf[2] = ' '; + for (i=0; i