T
T
totsamiyya2017-08-22 10:42:13
Bluetooth
totsamiyya, 2017-08-22 10:42:13

How to find out bluetooth device address in Qt, knowing its name?

In comboBox I display the list of found device names
ui->comboBox->addItem(device.name());
Then, in order to connect, I select the desired device from the cmboBox'a list and start the connectToService connection. But there you need to enter the address of the device. If you display addresses in the comboBox (ui->comboBox->addItem(device.adress().toString())), and then select them, then everything works. How can you know the address if you know the name?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill H, 2017-10-07
@KirillHelm

As an option, create a class CBluetothKeeperin which to store a table of addresses and device names. We define the interfaces for the combobox and already the code that your CBluetothKeeper. We display the names on the combobox, respectively, and generate an event that will send the address, not the name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question