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

Creating background services for Bluetooth low energy on Android

This functionality has all been moved to the open source Android Beacon Library which will: wake up/launch your app when iBeacons matching a desired pattern are detected perform beacon scanning in the background even if the user has not launched your app yet reduce the scan rate automatically in the background to 30 seconds every … Read more

Use BlueZ Stack As A Peripheral (Advertiser)

With your Bluetooth dongle plugged in, running the following command will tell you the device name and give its state: $ hciconfig The output should look something like this: hci0: Type: BR/EDR Bus: USB BD Address: 00:01:02:aa:bb:cc ACL MTU: 1021:8 SCO MTU: 64:1 DOWN RX bytes:1000 acl:0 sco:0 events:47 errors:0 TX bytes:1072 acl:0 sco:0 commands:47 … Read more

Get MAC address of bluetooth low energy peripheral in iOS

CBPeripheral’s identifier property will serve your purpose, available from a still-unconnected device in CBCentralManager’s didDiscoverPeripheral delegate method: – (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI CBPeripheral *peripheral … NSUUID* serverId = [peripheral identifier]; I have a half dozen LE devices I’m experimenting with, including multiple sets of identical devices. I just confirmed that across … Read more