add dedicated bonding

This commit is contained in:
matthias.ringwald@gmail.com 2014-01-27 20:49:26 +00:00
parent caaa388c98
commit 7ceba3b69d

View File

@ -217,6 +217,9 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
show_usage();
}
break;
case GAP_DEDICATED_BONDING_COMPLETED:
printf("GAP Dedicated Bonding Complete, status %u\n", packet[2]);
break;
case L2CAP_EVENT_CHANNEL_OPENED:
// inform about new l2cap connection
bt_flip_addr(event_addr, &packet[3]);
@ -392,6 +395,11 @@ int stdin_process(struct data_source *ds){
start_scan();
break;
case 'j':
printf("Start dedicated bonding to %s using MITM %u\n", bd_addr_to_str(remote), gap_mitm_protection);
gap_dedicated_bonding(remote, gap_mitm_protection);
break;
// case 'c':
// printf("Creating L2CAP Connection to %s, PSM SDP\n", bd_addr_to_str(remote));
// l2cap_create_channel_internal(NULL, packet_handler, remote, PSM_SDP, 100);