what does the rssi of bluetoothdeviceinfo mean
-
Hi
I want to know how should I understand the rssi value. It'sqint16
. Does the value show me the signal strength like-100 dbm
->rssi() == -100
?
Regards
Mihan@Mihan Maybe this explains https://www.bluetooth.com/blog/proximity-and-rssi/
-
@Mihan Maybe this explains https://www.bluetooth.com/blog/proximity-and-rssi/
-
@Mihan According to the article I provided above this is not standardised. Also you should maybe ask in some other forum more related to Bluetooth.
-
@Mihan said in what does the rssi of bluetoothdeviceinfo mean:
But why I always get the rssi zero after scanning?
That you did not say before.
Can you show how you're scanning? -
@Mihan said in what does the rssi of bluetoothdeviceinfo mean:
But why I always get the rssi zero after scanning?
That you did not say before.
Can you show how you're scanning?@jsulm
This code is used on Qt 5.6.2, so it doesn't haveQBluetoothDeviceDiscoveryAgent::deviceUpdated()
CBluetoothManager::CBluetoothManager() { m_BluetoothLocalDevice = new QBluetoothLocalDevice(this); m_BluetoothLocalDevice->powerOn(); m_BluetoothLocalDevice->setHostMode(QBluetoothLocalDevice::HostConnectable); m_BluetoothScanner = new QBluetoothDeviceDiscoveryAgent(this); connect(m_BluetoothScanner,SIGNAL(finished()),this,SLOT(BluetoothScanFinished())); } CBluetoothManager::BluetoothScanFinished() { auto list = m_BluetoothScanner->discoveredDevices(); for(int n = 0; n < list.count(); n++) { // add items into QTableWidget (QString is name, QIcon is signal strength) } }
-
@jsulm
This code is used on Qt 5.6.2, so it doesn't haveQBluetoothDeviceDiscoveryAgent::deviceUpdated()
CBluetoothManager::CBluetoothManager() { m_BluetoothLocalDevice = new QBluetoothLocalDevice(this); m_BluetoothLocalDevice->powerOn(); m_BluetoothLocalDevice->setHostMode(QBluetoothLocalDevice::HostConnectable); m_BluetoothScanner = new QBluetoothDeviceDiscoveryAgent(this); connect(m_BluetoothScanner,SIGNAL(finished()),this,SLOT(BluetoothScanFinished())); } CBluetoothManager::BluetoothScanFinished() { auto list = m_BluetoothScanner->discoveredDevices(); for(int n = 0; n < list.count(); n++) { // add items into QTableWidget (QString is name, QIcon is signal strength) } }
@Mihan said in what does the rssi of bluetoothdeviceinfo mean:
Qt 5.6.2
You should really at least try with a more recent Qt version.
-
@Mihan said in what does the rssi of bluetoothdeviceinfo mean:
Qt 5.6.2
You should really at least try with a more recent Qt version.
@jsulm but the system root provided by the main board supplier (based on freescale(NXP)) is Qt 5.6.2 . Is there something wrong in Qt5.6.2? Because the connection of bluetooth (
QBluetoothLocalDevice::requestPairing(...)
) also doesn't work in this version until Qt5.12.0.
I had tested it. It seem to have some problems between the bluetooth protocol(Bluez) and this function. -
@jsulm but the system root provided by the main board supplier (based on freescale(NXP)) is Qt 5.6.2 . Is there something wrong in Qt5.6.2? Because the connection of bluetooth (
QBluetoothLocalDevice::requestPairing(...)
) also doesn't work in this version until Qt5.12.0.
I had tested it. It seem to have some problems between the bluetooth protocol(Bluez) and this function.@Mihan said in what does the rssi of bluetoothdeviceinfo mean:
Is there something wrong in Qt5.6.2?
It is possible that some Bluetooth related issues where fixed since Qt5.6.2
-
@Mihan said in what does the rssi of bluetoothdeviceinfo mean:
Is there something wrong in Qt5.6.2?
It is possible that some Bluetooth related issues where fixed since Qt5.6.2
@jsulm Okay now I use Qt 5.12.0 to complie, it works. But I still don't know how to use these
rssi()
,all are 127 I received. It seems that thisrssi()
is different from the bluetooth's rssi(e.g. -65dbm).
In other words, what's the unit of thisrssi()
;Also, I find that the bin of 127 is 0111 1111. Does Qt use each bit to signify the signal strength?
-
@jsulm Okay now I use Qt 5.12.0 to complie, it works. But I still don't know how to use these
rssi()
,all are 127 I received. It seems that thisrssi()
is different from the bluetooth's rssi(e.g. -65dbm).
In other words, what's the unit of thisrssi()
;Also, I find that the bin of 127 is 0111 1111. Does Qt use each bit to signify the signal strength?
-
@Mihan As explained in the link I posted before there is no standardised unit for this. It just indicates whether the signal is getting stronger (higher values) or weaker (lower values).
@jsulm Oh, I didn't notice that the example the link said "For example, Manufacturer A could have an RSSI max value of 100 while Manufacturer B will return RSSI values anywhere from 0 to 127. "
So,maybe
rssi() == 127
means this signal is the best.Thank you so much!