1

I have a device that is emitting Bluetooth Low Energy (BLE) advertisements and a Nexus 7 (2013) Android tablet that should hear those advertisements. However, it cannot hear the BLE advertisements from my device and appears not to hear any BLE advertisements (there are some BLE beacons in the area). The same goes with a ca. 2014 Moto G phone I tried.

However, an LG G4, a Samsung S4 and a Samsung S5 will pick upp precisely those advertisements.

Is there potentially some configuration I can modify for the Nexus 7 2013 device so it can hear those BLE advertisements? My internet survey suggests that the Nexus 7 2013 is BLE capable (as opposed to the Nexus 7 2012 which isn't).

Is there some way to detect (e.g. via some API) whether a given device can listen to BLE advertisements?

EDIT: Tried this on a different Nexus 7 and it worked there. For reference I'm using this app to search for BLE advertisements: https://github.com/gardarh/android-blescanner

gardarh
  • 3,084
  • 2
  • 28
  • 31
  • What API level do your problematic devices use? – reflective_mind Oct 06 '16 at 15:58
  • It's classic but have you tried switching off bluetooth and turning on again? Moto G used to have the bug when Beacons are around system bluetooth crashes and the fix was to switch it off and on again. – Waqas Oct 06 '16 at 18:20
  • I just tried this on a different Nexus 7 2013 and sure enough, it is picking up BLE probes. I guess I need to take better look at the other Nexus 7. Btw. I'm running the latest possible version on the Nexus 7 devices (Android 6). – gardarh Oct 06 '16 at 20:30
  • 1
    It's worth looking if the Nexus 7 is actually "seeing" any BLE adv. packets. Enable Developer options on your Nexus 7 (see [link](http://stackoverflow.com/questions/18103117/how-to-enable-usb-debugging-in-android)) and press the "Enable Bluetooth HCI snoop log" to enable realtime sniffing. Disable it after a while and search for "bthci_snoop.log" file (usually in /storage/emulated/0). Open it in Wireshark and look for BLE adv. packets. – Tomer Petel Oct 07 '16 at 05:51
  • Good point Tomer! The hci log indicates that the device is in fact receiving all the advertisements but not delivering them upwards (the log is here: https://dl.dropboxusercontent.com/u/18637933/btsnoop_hci.log ). Where can they be stopped? My kernel version is 3.4.0-gad29d11 and build no. MOB30X . – gardarh Oct 07 '16 at 09:11
  • 2
    Could it be, that the location service is disabled? (The one in the settings) – p2pkit Oct 10 '16 at 11:52
  • @p2pkit: Yes, that was it! Please post your comment as an answer and I'll mark it as the correct answer. – gardarh Oct 10 '16 at 13:06

1 Answers1

3

You need to activate location in the settings to receive ble scan results on Android 6+

p2pkit
  • 1,159
  • 8
  • 11
  • 2
    Note that even though your app has the location permissions that is not enough by itself. If the location service is disabled the Bluetooth Low Energy scan will just "silently not work". – gardarh Oct 10 '16 at 13:21