a2dp-forwarding: add 'c' to delete all link keys

This commit is contained in:
Matthias Ringwald 2020-07-16 22:19:17 +02:00 committed by Milanka Ringwald
parent bc9bb58423
commit 812872ca01

View File

@ -576,7 +576,7 @@ static void show_usage(void){
printf("p - create connection to smartphone %s\n", bd_addr_to_str(smartphone_addr));
printf("h - create connection to headset %s\n", bd_addr_to_str(headset_addr));
printf("d - disconnect all\n");
printf("c - delete all link keys\n");
printf("\nTo setup MITM, please connect to Headphone using 'h',\n");
printf("then connect from smartphone/laptop to BTstack.\n");
printf("Ctrl-c - exit\n");
@ -601,6 +601,10 @@ static void stdin_process(char cmd){
a2dp_sink_disconnect(a2dp_sink_cid);
a2dp_source_disconnect(a2dp_source_cid);
break;
case 'c':
printf("Deleting all link keys\n");
gap_delete_all_link_keys();
break;
default:
show_usage();
break;