Merge branch 'develop' into le-data-channel

This commit is contained in:
Matthias Ringwald 2016-07-22 17:20:32 +02:00
commit 64aa668699
2 changed files with 11 additions and 2 deletions

View File

@ -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);

View File

@ -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);
const 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, ");