Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I develop an application in C++ on Linux, which interacts with blueooth devices (such as bluetooth sockets or speakers).
I use D-Bus command to get list of paired devices:
dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.ListDevices
It returns:
method return sender=:1.0 -> dest=:1.90 reply_serial=2
array [
object path "/org/bluez/489/hci0/dev_00_1F_C5_75_45_5E"
object path "/org/bluez/489/hci0/dev_F0_13_C3_00_A1_08"
object path "/org/bluez/489/hci0/dev_00_11_12_30_76_21"
object path "/org/bluez/489/hci0/dev_00_11_12_30_76_22"
object path "/org/bluez/489/hci0/dev_00_11_12_30_76_23"
object path "/org/bluez/489/hci0/dev_00_11_12_30_76_24"
It is great, but I need not only MACs, but names of devices also (e.g. "linvor" or "GT-I9300").
Please, help me with a proper way to get those names.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.