Author Topic: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED  (Read 110 times)

Offline kg

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
« 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

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3092
  • Karma: 1000
    • Wireless Communication Libraries
Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
« Reply #1 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.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3092
  • Karma: 1000
    • Wireless Communication Libraries
Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
« Reply #2 on: November 20, 2018, 07:07:25 AM »
Hi,

we have just released update dversionb that can read RSSI value from BLE devices.

Offline kg

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
GetRemoteRssi values stuck after connection
« Reply #3 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

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3092
  • Karma: 1000
    • Wireless Communication Libraries
Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
« Reply #4 on: November 20, 2018, 02:42:31 PM »
Unfortunately it is not possible.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3092
  • Karma: 1000
    • Wireless Communication Libraries
Re: GetRemoteRssi returns WCL_E_BLUETOOTH_UNEXPECTED
« Reply #5 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.

 

Sitemap 1 2 3 4 5 6 7 8 9