Run iPhone as an iBeacon in the background

Standard CoreBluetooth advertisements can broadcast while the app is in the background, but not if they were started with CLBeaconRegion dictionary. The workaround is to ditch CoreLocation framework altogether and create your own proximity “framework” using only CoreBlueTooth. You still need to use the appropriate background specifiers in the Info.plist file (e.g. bluetooth-peripheral and bluetooth-central). … Read more

Triangulate example for iBeacons

I have been making some experiments to get a precise position using three beacons. Results of trilateration Unluckily, the results were very disappointing in terms of quality. There were mainly two issues: In non-controlled environments, where you can find metals, and other objects that affect the signal, the received signal strength of the beacons changes … Read more

Android BLE API: GATT Notification not received

It seems like you forgot to write the Descriptor which tells your BLE device to go in this mode. See the code lines that deal with descriptor at http://developer.android.com/guide/topics/connectivity/bluetooth-le.html#notification Without setting this descriptor, you never receive updates to a characteristic. Calling setCharacteristicNotification is not enough. This is a common mistake. code snipped protected static final … 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

How to connect Android device to an iOS device over BLE (Bluetooth Low Energy)

Adding a summary for reference: What could it be? There are some limitations on Android or iOS that don’t permit to connect from an Android to an iOS or viceversa? When connecting to a GATT server that is advertised as dualmode (BLE and BR/EDR) device by calling connectGatt(…), the TRANSPORT_AUTO flag that is internally added … Read more

Location needs to be enabled for Bluetooth Low Energy Scanning on Android 6.0

No, this is not a bug. This issue was brought up to Google where they responded saying that this was the intended behavior and they won’t fix it. They directed developers to this site where it points out that location permission is now needed for hardware identifier access. It is now the developer’s responsibility to … Read more

Understanding ibeacon distancing

The distance estimate provided by iOS is based on the ratio of the beacon signal strength (rssi) over the calibrated transmitter power (txPower). The txPower is the known measured signal strength in rssi at 1 meter away. Each beacon must be calibrated with this txPower value to allow accurate distance estimates. While the distance estimates … Read more

Android 4.3 Bluetooth Low Energy unstable

Important implementation hints (Perhaps some of those hints aren’t necessary anymore due to Android OS updates.) Some devices like Nexus 4 with Android 4.3 take 45+ seconds to connect using an existing gatt instance. Work around: Always close gatt instances on disconnect and create a fresh instance of gatt on each connect. Don’t forget to … Read more