Questions tagged [bluetooth-lowenergy]

Bluetooth Low Energy ("BLE") is a radio standard introduced in 2006. It is also known as Bluetooth Smart and is a subset of Bluetooth v4.0.

Bluetooth Low Energy is a faster and less energy consuming radio standard, introduced in 2006 and launched to mass production in 2010 as part of the Bluetooth Core specification version 4.0. Version 4.1 was released in December 2013, introducing new network topologies and privacy features.

The first smartphone with Bluetooth 4.0 was the Apple iPhone 4S launched in 2011. Today, most smartphones, for example from Apple, Samsung and Nokia, have BLE capability.

Bluetooth SIG has defined various profiles and guidelines, which have to be respected. Devices can be in either peripheral (advertise data) or central mode (Scan for BLE devices).

Apple provided the central mode support in and added the peripheral mode support in . Google has provided central mode support in with the release of Android OS version 4.3 and added the peripheral mode support in Android 5.0.

9339 questions
51
votes
4 answers

GATT callback fails to register

I'm trying to write an application to send messages over Bluetooth Low Energy, which will then be passed on by UART in my peripheral. I've followed the steps here and the app scans for and finds the device successfully. However, connection using the…
Wibble
  • 796
  • 1
  • 8
  • 23
50
votes
1 answer

Creating background services for Bluetooth low energy on Android

Background: Ideally I would like my Android device to be scanning for Bluetooth Low Energy devices all the time an the ability to start an application whenever a new device with specific properties appears. So the broadcast packet in BLE will for…
Vegar Westerlund
  • 1,604
  • 3
  • 16
  • 24
48
votes
3 answers

Bluetooth Low Energy startScan on Android 6.0 does not find devices

I'm developing an application with Bluetooth Low Energy using Nexus 5. It worked on Lollipop and now it is not working on Marshmallow. I set the ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions in the manifest and on runTime in the…
48
votes
6 answers

How to create UUID from string in android

In my app, I scan low energy Bluetooth for specific service uuid 2415. To convert the string 2415 into uuid I am using UUID serviceUUID = UUID.fromString("2415"); but at this line exception arises IllegalArgumentException: Invalid UUID 2415. Please…
user3056760
  • 481
  • 1
  • 4
  • 3
47
votes
6 answers

Communicating between iOS and Android with Bluetooth LE

I've got a working app using CoreBluetooth to communicate between an iPad (central) and iPhone (peripheral). I have one service that has two characteristics. I have a Nexus 7 running the latest Android 4.3 with BTLE support. Android is a bit late to…
45
votes
6 answers

Android BluetoothGatt - status 133 - register callback

First of all I read SOLVED: GATT callback fails to register and took the steps suggested in that post to solve this issue with no success. The recommended fix in there if you haven't read it is to make all BLE calls from the main thread directly or…
Chris K
  • 1,581
  • 1
  • 10
  • 17
45
votes
5 answers

Bluetooth Low Energy: listening for notifications/indications in linux

I'm trying to communicate with a BLE module through a Linux machine (the module is running a heart rate profile). So far, I've been able to do everything I need except listening for Notifications and indications (e.g. listening for the Heart Rate…
Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
44
votes
5 answers

How to programmatically force bluetooth low energy service discovery on Android without using cache

I am using Android 4.4.2 on a Nexus 7. I have a bluetooth low energy peripheral whose services change when it is rebooted. The android app calls BluetoothGatt.discoverServices(). However Android only queries the peripheral once to discover…
monzie
  • 665
  • 1
  • 6
  • 12
41
votes
1 answer

'App is scanning too frequently' with ScanSettings.SCAN_MODE_OPPORTUNISTIC

I noticed an issue on Samsung S8, Android 7.0 (upd. This also happens on Android 7.0: Samsung S7, Nexus 5x) which tells (after couple of tests) that app is scanning too frequently: 08-14 12:44:20.693 25329-25329/com.my.app D/BluetoothAdapter:…
41
votes
3 answers

Node.js - how to set environment variables in code

I am fairly new to node.js, and have a program that I have to set an environment variable in order to run (using the noble library, my bash command is: sudo NOBLE_HCI_DEVICE_ID=x node program.js, to tell my code which Bluetooth adapter - HCI device…
Alex
  • 1,082
  • 3
  • 12
  • 23
40
votes
2 answers

Programmatically pairing with a BLE device on Android 4.4+

Does anyone have a complete working example of how to programmatically pair with a BLE (not Bluetooth Classic) device that uses passkey entry (i.e. a 6-digit PIN) or Numeric Comparison on Android 4.4 or later? By 'programmatically' I mean I tell…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
39
votes
1 answer

Chipsets/Devices supporting Android 5 BLE peripheral mode

**Overview of devices known so far: Nexus 6, Nexus 9, Moto E 4G LTE, LG G4, Galaxy S6, Samsung Galaxy S5 (model SM-G900M), Nexus 5X, Sony Xperia Z5 Compact, Samsung Galaxy Tab S2 ** ** Also see…
MStone
  • 545
  • 2
  • 5
  • 11
39
votes
3 answers

Combine iBeacon bluetooth low energy with Android 4.3

I'm looking for a way to detect iBeacon (iOS 7.0 feature) from an Android device. I read the Android documentation, where it seem that the iBeacon is some kind of GATT server which sends its position. While the Android documentation says that I…
rekire
  • 47,260
  • 30
  • 167
  • 264
38
votes
5 answers

startLeScan replacement to current api

Goal is to read the values of a bluetooth LE heart rate monitor. Using google's sample, I get private void scanLeDevice(final boolean enable) { if (enable) { // Stops scanning after a pre-defined scan period. …
Vitalis Hommel
  • 990
  • 2
  • 8
  • 20
38
votes
5 answers

Android 4.3: How to connect to multiple Bluetooth Low Energy devices

My Question is: Can Android 4.3 (client) have active connections with multiple BLE devices (servers)? If so, how can I achieve it? What I did so far I try to evaluate what throughput you can achieve using BLE and Android 4.3 BLE API. In addition I…
Andreas Mueller
  • 383
  • 1
  • 4
  • 6