addded command to disable ssp

This commit is contained in:
matthias.ringwald@gmail.com 2014-01-29 08:29:58 +00:00
parent df26da3c10
commit 57aa5a341d

View File

@ -394,6 +394,7 @@ void show_usage(){
printf("j - perform dedicated bonding to %s, MITM = %u\n", bd_addr_to_str(remote), gap_mitm_protection); printf("j - perform dedicated bonding to %s, MITM = %u\n", bd_addr_to_str(remote), gap_mitm_protection);
printf("z - perform dedicated bonding to %s using legacy pairing\n", bd_addr_to_str(remote)); printf("z - perform dedicated bonding to %s using legacy pairing\n", bd_addr_to_str(remote));
printf("t - terminate HCI connection with handle 0x%04x\n", handle); printf("t - terminate HCI connection with handle 0x%04x\n", handle);
printf("y - disable SSP\n");
printf("---\n"); printf("---\n");
printf("k - query %s for RFCOMM channel\n", bd_addr_to_str(remote_rfcomm)); printf("k - query %s for RFCOMM channel\n", bd_addr_to_str(remote_rfcomm));
printf("l - create RFCOMM connection to %s using channel #%u\n", bd_addr_to_str(remote_rfcomm), rfcomm_channel_nr); printf("l - create RFCOMM connection to %s using channel #%u\n", bd_addr_to_str(remote_rfcomm), rfcomm_channel_nr);
@ -523,6 +524,11 @@ int stdin_process(struct data_source *ds){
gap_dedicated_bonding(remote, gap_mitm_protection); gap_dedicated_bonding(remote, gap_mitm_protection);
break; break;
case 'y':
printf("Disabling SSP for this session\n");
hci_send_cmd(&hci_write_simple_pairing_mode, 0);
break;
case 'k': case 'k':
printf("Start SDP query for SPP service\n"); printf("Start SDP query for SPP service\n");
sdp_query_rfcomm_channel_and_name_for_uuid(remote_rfcomm, 0x1002); sdp_query_rfcomm_channel_and_name_for_uuid(remote_rfcomm, 0x1002);