at 18.09-beta 19 lines 718 B view raw
1diff --git a/sixpair.c b/sixpair.c 2index b009a6f..78b7ef0 100644 3--- a/sixpair.c 4+++ b/sixpair.c 5@@ -76,11 +76,11 @@ void process_device(int argc, char **argv, struct usb_device *dev, 6 exit(1); 7 } 8 } else { 9- FILE *f = popen("hcitool dev", "r"); 10+ FILE *f = popen("bluetoothctl list", "r"); 11 if ( !f || 12- fscanf(f, "%*s\n%*s %x:%x:%x:%x:%x:%x", 13+ fscanf(f, "%*s %x:%x:%x:%x:%x:%x", 14 &mac[0],&mac[1],&mac[2],&mac[3],&mac[4],&mac[5]) != 6 ) { 15- printf("Unable to retrieve local bd_addr from `hcitool dev`.\n"); 16+ printf("Unable to retrieve local bd_addr from `bluetoothctl list`.\n"); 17 printf("Please enable Bluetooth or specify an address manually.\n"); 18 exit(1); 19 }