F FrankBerra Active Member Licensed User Longtime User Nov 10, 2018 #1 Hello everyone! In the past i was used to obtain RSSI from a bluetooth device during a background scan by using this instructions: https://www.b4x.com/android/forum/threads/bluetooth-rssi-signal-strenth.43019/#post-261068 Actually with Android 8 it doesn't work, so i am guessing that it is a limitation of Android 8 related to implicit broadcasts. So is there a solution or a library that can log the RSSI during a scan of surrounding Bluetooth devices? (The scan is made always in background by a service) Isn't possible, for example, modify the original Serial Library and add something like this and then pass back the value to the sub _DeviceFound (Name As String, MacAddress As String, RSSI as Int)? Code: int rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,Short.MIN_VALUE); (Taken from https://stackoverflow.com/questions/15312858/get-bluetooth-signal-strength) Thanks in advance for your any suggestions! Last edited: Nov 10, 2018
Hello everyone! In the past i was used to obtain RSSI from a bluetooth device during a background scan by using this instructions: https://www.b4x.com/android/forum/threads/bluetooth-rssi-signal-strenth.43019/#post-261068 Actually with Android 8 it doesn't work, so i am guessing that it is a limitation of Android 8 related to implicit broadcasts. So is there a solution or a library that can log the RSSI during a scan of surrounding Bluetooth devices? (The scan is made always in background by a service) Isn't possible, for example, modify the original Serial Library and add something like this and then pass back the value to the sub _DeviceFound (Name As String, MacAddress As String, RSSI as Int)? Code: int rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,Short.MIN_VALUE); (Taken from https://stackoverflow.com/questions/15312858/get-bluetooth-signal-strength) Thanks in advance for your any suggestions!
Erel B4X founder Staff member Licensed User Longtime User Nov 11, 2018 #2 Update to Serial v1.31: https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-624554 Code: 'in Admin_DeviceFound If admin.LastFoundIntent.HasExtra("android.bluetooth.device.extra.RSSI") Then Dim rssi As Int = admin.LastFoundIntent.GetExtra("android.bluetooth.device.extra.RSSI") Log(rssi) End If Upvote 0
Update to Serial v1.31: https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-624554 Code: 'in Admin_DeviceFound If admin.LastFoundIntent.HasExtra("android.bluetooth.device.extra.RSSI") Then Dim rssi As Int = admin.LastFoundIntent.GetExtra("android.bluetooth.device.extra.RSSI") Log(rssi) End If
F FrankBerra Active Member Licensed User Longtime User Nov 11, 2018 #3 Thank you very much for Super quick fix! Upvote 0