Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: kg on November 19, 2018, 04:51:39 PM

Title: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
Post by: kg on November 19, 2018, 04:51:39 PM

Hello,

I am trying to get the RSSI of a remote server that triggers an OnCharacteristicChanged event within that event's handler using the wclBluetoothRadio.GetRemoteRssi method, but the method always returns 327701 (WCL_E_BLUETOOTH_UNEXPECTED) and the out value of RSSI is zero. Under what context will this method work?

Thanks,
kg
Title: Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
Post by: Mike Petrichenko on November 19, 2018, 05:48:34 PM
In current version you can not use this method to get RSSI value of BLE device. It is possible for Classic devices only.
Title: Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
Post by: Mike Petrichenko on November 20, 2018, 07:07:25 AM
Hi,

we have just released update dversionb that can read RSSI value from BLE devices.
Title: GetRemoteRssi values stuck after connection
Post by: kg on November 20, 2018, 02:03:16 PM

With the new .NET Bluetooth Frameworks version 7.5.7.0, GetRemoteRssi() now works for me as expected while the queried server is advertising: it returns WCL_E_SUCCESS and outputs current values of a server's RSSI. RSSI values are reasonable and consistent with values that I see using a packet sniffer (nRF-Sniffer + Wireshark software with a Bluefruit LE Sniffer USB dongle).

However, once a server is connected (and no longer broadcasting advertising data) the RSSI value outputted by GetRemoteRssi no longer updates to the current value. Instead it returns WCL_E_SUCCESS with the RSSI output value stuck at the last RSSI value that was reported while the server was advertising. I can see the RSSI byte value change in packet sniffer data, though.

Ideally, I would like to access the RSSI while connected (so that I can warn the parent application or change operating modes if radio signals get too weak). Is this possible?

Thanks,
kg
Title: Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
Post by: Mike Petrichenko on November 20, 2018, 02:42:31 PM
Unfortunately it is not possible.
Title: Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
Post by: Mike Petrichenko on November 21, 2018, 02:31:46 PM
It looks there is one possible solution.

You have to use BeaconWatcher. When it is running and receiving BLE advertisement packets it alos updates RSSI value for connected BLE devices. You can then read RSSI by calling GetRemoteRssi() method or by checking Rssi value in received BLE advertisement packets.