Communicating between iOS and Android with Bluetooth LE

I’ve already gone through this for at least one week having this same issue. I’ve already asked a question here and I’ve already answered on my own. The main problem is an Android BUG issue. It’s sending a non permitted command on a fixed L2CAP channnel. But when Android is communicating with normal peripheral BLE … Read more

Can an Android device act as an iBeacon?

YES This is possible on Android 5+, and you can find open-source code for transmitting as a beacon in the Android Beacon Library. There is also a full-featured version of a beacon transmitter in the Beacon Scope app in the Google Play Store. Here’s an example of transmitting iBeacon with the Android Beacon Library: Beacon … Read more

Find all Bluetooth devices (headsets, phones etc) nearby, without forcing the devices in discoverable mode

So, here’s all I found after reading blogs, threads, documentations, SO answers etc. regarding Android’s bluetooth discovery. Thought this might be useful to post my findings here. So before someone starts reading, I want to clarify that, I could not find any way to detect a bluetooth device nearby which is turned on but not … Read more

Is there any way to use Bluetooth LE from a c# desktop app in windows 10?

You can use C# APIs in C# Desktop applications! I have a sample here in GitHub. In general, to get access to the C# APIS, add two references to your project: C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll Note that the #2 version depends on the version of .NET that you’re using. Background tasks … Read more

How to get the battery level after connect to the BLE device?

I have solved this problem. public class BluetoothLeService extends Service { private static final UUID Battery_Service_UUID = UUID.fromString(“0000180F-0000-1000-8000-00805f9b34fb”); private static final UUID Battery_Level_UUID = UUID.fromString(“00002a19-0000-1000-8000-00805f9b34fb”); public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { if(status == BluetoothGatt.GATT_SUCCESS) { broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic); } } private void broadcastUpdate(final String action, final BluetoothGattCharacteristic characteristic) { final Intent intent = … Read more

Using Bluetooth low energy in linux command line

SDP is absent in BLE. Broadcast/advertise frame and GATT client/server are used instead. Several links: BlueZ gatttool: command line tool to run common GATT procedures BlueZ GATT’s ready profiles hint: DBUS GATT and DBUS example How can I connect to the FitBit Zip over Bluetooth 4.0 LE on Linux with bluez? Bluetooth Low Energy: listening … Read more

Android : Permissions check for BLE [closed]

Google made Android more strict by adding the new BLUETOOTH_CONNECT and BLUETOOTH_SCAN permissions. You will get SecurityException in runtime if you attempt to access any BLE API that requires these permissions. So we need to check the permissions in the activity which is set to android.intent.action.MAIN in the manifest file. I call that as MainActivity. … Read more

SWIFT – BLE communications

The following code is for Swift 3 (XCode 8 Beta 6). It’s an example using the standard UUIDs for serial ports like the ones on some commercial modules. So the declarations for the service and characteristics should look like this: private let UuidSerialService = “6E400001-B5A3-F393-E0A9-E50E24DCCA9E” private let UuidTx = “6E400002-B5A3-F393-E0A9-E50E24DCCA9E” private let UuidRx = “6E400003-B5A3-F393-E0A9-E50E24DCCA9E” … Read more