Bluetooth Low Energy: listening for notifications/indications in linux

Try this… Run gatttool -b <MAC Address> –interactive like you did before. You’ll get a prompt and then you type connect. You should see a CON in the prompt indicating that you’ve connected to the device. Then type char-read-uuid 2902. You should get a list of all CCC (Client Characteristic Configuration) attributes on the device. … Read more

What are the nominal distances for iBeacon “Far”, “Near”, and “Immediate”

From what I understood of the API is that there is never a guarantee on actual distance, you should not use the readings to be considered an accurate measurement. The proximity is rather used to determine the relative distance between different beacons so that you can respond accordingly based on your applications requirements. With that … Read more

getBluetoothService called with no BluetoothManagerCallback

By reading into the Android source code, it seems to be a warning you cannot do anything about. The source code shows that if you call BluetoothSocket#connect(); Then it will call BluetoothAdapter.getDefaultAdapter().getBluetoothService(null); The key here, is the null parameter that it passes in the above line. Due to this, there will be no callback, and … Read more

Bluetooth Low Energy startScan on Android 6.0 does not find devices

I struggled with the same issue. To fix it you have to enable “Location” (GPS) in the settings of the phone as well as request location permission in the app at runtime. Both need to be done for scanning to work properly. To request the location permission put the following in a dialog or the … Read more

What is AWDL (Apple Wireless Direct Link) and how does it work?

AWDL recently caught a lot of attention when it caused Wi-Fi issues in iOS 8 and OS X Yosemite devices. What is AWDL? AWDL (Apple Wireless Direct Link) is a low latency/high speed WiFi peer-to peer-connection Apple uses for everywhere you’d expect: AirDrop, GameKit (which also uses Bluetooth), AirPlay, and perhaps elsewhere. It works using … Read more

How can I avoid or dismiss Android’s Bluetooth pairing notification when I am doing programmatic pairing?

Try setting the confirmation first in the PAIRING_REQUEST BluetoothDevice device = intent.getParcelableExtra(“android.bluetooth.device.extra.DEVICE”); device.getClass().getMethod(“setPairingConfirmation”, boolean.class).invoke(device, true); device.getClass().getMethod(“cancelPairingUserInput”).invoke(device); This worked for me between two Android devices using RFCOMM but I’m not entering any PINs

How to prevent Android bluetooth RFCOMM connection from dying immediately after .connect()?

Try to change your code for creating RfcommSocket: sock = zee.createRfcommSocketToServiceRecord( UUID.fromString(“8e1f0cf7-508f-4875-b62c-fbb67fd34812”)); for this code: Method m = zee.getClass().getMethod(“createRfcommSocket”, new Class[] { int.class }); sock = (BluetoothSocket) m.invoke(device, 1); Also try to change argument value in range 1-3 in this m.invoke(device, 1); When connection will be Connected, but aborted when you try reading, call in … Read more

Android – Bluetooth discovery doesn’t find any device

What version of Android are you running this on? If it is Android 6.x, I believe you need to add the ACCESS_FINE_LOCATION permission to your manifest. For example: <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”/> I had a similar issue and this fixed it for me. UPDATE: Adding documentation direct from Google on this: To access the hardware identifiers of … Read more