Retrieve paired Bluetooth devices from console
Solution 1:
Late to the party, I tried listing as suggested by @panmari and @MarkCh but I was getting some unknown mac addresses (on a C.H.I.P with Debian), so I used the following command:
bt-device -l
It will return both friendly name and Mac of all paired devices.
Solution 2:
I found a solution myself. In Linux, the friendly names with their according mac adresses are saved in the file:
/var/bluetooth/{MAC-of-local-Bluetooth-device}/names
It should be easy enough to read it out with a shell script or the programming language of your choice.
Solution 3:
Install bluez-utils
, run bluetoothctl paired-devices
. See bluetoothctl --help
for more useful commands.