An example of another answer does not work for me, it stops at Scanning ...
The following link works for the c language, but has an error when issuing bytes containing information about the de rssi signal. https://github.com/glock45/intel-edison-playground/blob/master/scan.c
this line 121:
printf("%s - RSSI %d\n", addr, (**char**)info->data[info->length]);
it should be:
printf("%s - RSSI %d\n", addr, (**int8_t**)info->data[info->length]);
I found them by looking inside bluez-version/monitor/*.c , where the btmon program is. You can see the data types and structures, hcidump.c very useful and packets.c and main.c too, but there is a lot to learn about hci sockets
Yao hao
source share