FAQ Database Discussion Community


Problems using notifications as a callback?

ios,objective-c,callback,notifications,bluetooth-lowenergy
I am trying to update a view when something happens in another class, and after some looking, it appeared that the most common way to do this was to use either delegates or blocks to create a callback. However, I was able to accomplish this task using notifications. What I...

How to force Bluetooth LE “Just Works” Pairing in Android

android,bluetooth,bluetooth-lowenergy,android-bluetooth
I have an embedded system running a GATT server that I am trying to connect to via Android. The task is simple: connect to the GATT server, navigate characteristics, and validate read/write capabilities. The problem is when I try and connect with an Android app, it attempts to pair with...

Android One as beacon transmitter

android,bluetooth-lowenergy,altbeacon
I tried using altbeacon-transmitter-android to make my android one(Mito Impact) as beacon transmitter. When I ran it, I got error message "E/BeaconTransmitter﹕ Advertisement start failed, code: 4". I can use android one as beacon receiver, so I'm sure that my android one support bluetooth low energy (BLE). Could I use...

writeCharacteristic() returns true, but does not call onCharacteristicWrite()

android,bluetooth,bluetooth-lowenergy
I wish to read a characteristic value stored in a device, modify the value, and then write it to the device. For some reason, writeCharacteristic() return true, but the internal device value does not change and onCharacteristicWrite() is not called. In fact, for some reason it is only called if...

Prevent disconnection of Bluetooth LE Service

android,bluetooth,bluetooth-lowenergy
I am making an app using Bluetooth LE Service. What I noticed is the device gets disconnected automatically after some time after app goes to background. Can someone explain reason for this? I am getting following error. 02-12 16:48:27.497 11695-11695/main.nesttech.com.nesttechble E/ActivityThread﹕ Activity main.nesttech.com.nesttechble.MainActivity has leaked ServiceConnection [email protected] that was originally...

IOS App : Is it possible to have 2 Bluetooth connections in one app?

objective-c,iphone,xcode,bluetooth,bluetooth-lowenergy
I'm in the process in developing an App That receives data from a Bluetooth accessory and does some processing for the data and then send a simple command to a Bluetooth-Low Energy(BLE) Module which is connected to an arduino . So far I managed to develop and app for the...

How much memory does Bluetooth Low Energy device has

bluetooth,bluetooth-lowenergy,ibeacon,altbeacon
Let's say I want to start transmitting advertising packets from a Blueooth 4 module attached to a Raspberry Pi. I am planning to use BlueZ library for the same. Have a basic questions regarding the same - How much memory does a typical Bluetooth device contains (is it standard or...

Issue in writing CBCharacteristic

ios,objective-c,bluetooth-lowenergy,core-bluetooth,ibeacon
I am currently working on an BLE app which scans my company beacons , i need to update the values for CBCharacteristic . I am not getting any error after my write function , but the change does not reflect on BLE device. I have scanned all CBCharacteristics and then...

Arduino voltage regulator power consumption

arduino,bluetooth-lowenergy,sensor,battery,atmega
I am trying to create battery powered sensor from Arduino mini. I am allready aware and I am using sleep and clock regulations, but my concern at the moment is voltage regulator of the board. I am using HM-10 as transmitter and it works well. I know, that the board...

Detecting beacons via iBeacon Monitoring & Ranging vs CoreBluetooth scanForPeripheralsWithServices

ios,bluetooth-lowenergy,core-bluetooth,ibeacon
There is a lot of confusion regarding the restrictions that are applied by the iOS on apps that want to scan BLE beacons\peripherals. After reading several blogs and stackoverflow answers, I want to see if I understand all the issues correctly. Please correct me if there is anything I misunderstood...

keyfob cc2541 bluetooth connection drops when trying to enable acclerometer on android

android,bluetooth-lowenergy
I am developing an Android app that needs to read the Keyfob's Accelerometer data. Until now I've followed this tutorial: https://thenewcircle.com/s/post/1553/bluetooth_smart_le_android_tutorial With it I was able to connect with the Keyfob, search for services and read some characteristics. The problem is when I try to enable the keyfob's Accelerometer, the...

innerHTML output with Javascript template

javascript,jquery,html,templates,bluetooth-lowenergy
For my project I have to scan BLE-tags and show their RSSI for proximity. The output of the BLEs is working with a JavaScript template. <body> <div id="header" data-role="header" data-theme="b"> <h1>BLE overview</h1> </div> </br> <div data-role="content" id="home"> <a href="#" data-role="button" data-theme="b" data-inline="true" class="pure-button initialize">Initialize</a> <a href="#" data-role="button" data-theme="b" data-inline="true" class="pure-button...

How to get the characteristic from UUID in objective-C?

ios,objective-c,bluetooth-lowenergy,core-bluetooth
I am developing for BLE in objective-C. I define the UUID like the following code: static NSString *const LEDStateCharacteristicUUID = @"ffffffff-7777-7uj7-a111-d631d00173f4"; I want to write characteristic to BLE device by following code , it need to pass 3 parameter:1.Data 2.Characteristic 3.type CBCharacteristic *chara = ??? // how to set the...

How to pass BluetoothGatt and Characteristic to AsyncTask in Android?

android,android-asynctask,bluetooth-lowenergy
I want to use AsyncTask to implement mGatt.writeCharacteristic. At first , I try to pass mBluetoothGatt and BluetoothGattCharacteristic to AsyncTask like the following code. private static BluetoothGatt mBluetoothGatt; BluetoothGattCharacteristic HueCharacteristic; new WriteCharacteristic().execute(mBluetoothGatt , HueCharacteristic); private class WriteCharacteristic extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... urls) { BluetoothGatt gatt...

Writing is not permitted error when attempting to subscribe to CBCharacteristic

ios,objective-c,bluetooth,bluetooth-lowenergy,core-bluetooth
I'm developing an App that communicates with a Bluetooth LE device and so I'm using CoreBluetooth to do this. The peripheral I'm using exposes 1 service which has two characteristics a serial port FIFO characteristic which supports indication/notification/write/write no response; and a serial port credit characteristic which supports write. From...

Android: iBeacon - read its advertisement (e.g txPower)

bluetooth-lowenergy,android-5.0-lollipop,ibeacon,ibeacon-android
I have a problem here right now as I'm trying to read the tx-Power from my Onyx iBeacon. I've read multiple suggestions and tried so many code on the internet, but I still can't figure this out. I'm using android lollipop and tried the iBeacon tutorial from https://github.com/devunwired/accessory-samples/tree/master/BluetoothGatt for a...

Bluetooth classic connection awareness

ios,objective-c,bluetooth,bluetooth-lowenergy,core-bluetooth
I have a Bluetooth application that communicates with a peripheral device over a low energy. This peripheral device also has a classic (HFP and/or A2DP) connection with the iOS device. It happens that the classic connection gets interrupted sometimes. What I need is to be able to notify the user...

Detecting whether a BLE device is connectable on Android

android,bluetooth-lowenergy
I am working on a project for configuring beacons. A certain amount of time after being powered on, a beacon becomes unconfigurable until it is power-cycled. In order to show a list of the configurable beacons, I am looking at certain characteristics (Bluetooth device name, certain manufacturer data in the...

Smart Bluetooth: GATT Vs. ATT - what are the differences between them?

bluetooth,bluetooth-lowenergy,att,gatt
Can anyone please define for me what are the differences between GATT and ATT? I didn't manage to understand. I know that they are both generic protocol to handle BLE services. but didn't really understand it. Please explain. Thanks!

Beacons in Windows Phone 8.1 - there are no possibilities?

c#,bluetooth,windows-phone-8.1,bluetooth-lowenergy,ibeacon
First of all, yes, i have read all other similar questions. Secondly, i am developing app (WP 8.1 WinRT), which must use Beacons. I read a lot about it, and i know, that generally connection with BLE device is not possible without pairing it first. But hope dies last, so...

Bluetooth LE Java byte array size on characteristic setValue

java,android,bluetooth,bluetooth-lowenergy
I am trying to send a value using Bluetooth LE on my Android phone with the following line of code. I am getting an error that it exceeds the size of the array, which is 127 because of the 0xEA byte. I converted the byte to around 234. Is there...

Core Bluetooth Peripheral disconnects every 30 seconds

ios,bluetooth-lowenergy,core-bluetooth,btle
I have an app that acts as a Bluetooth LE peripheral. I have a single service with four characteristics. 2 out of the 4 are read and write only, the other two are configured as notify. If I subscribe to one of the "notify" characteristics then the app will not...

Android Thread vs AsyncTask vs IntentService called from BLE onCharacteristicChanged()

android,multithreading,android-asynctask,bluetooth-lowenergy,intentservice
I have an Android app from which I receive BLE data (every 62ms via notifications). The app can save data via a BufferedWriter to a file. Upon each onCharacteristicChanged() callback, I call either an AsyncTask, Thread or an IntentService to do a file write if the user enabled file save....

Transferring Data from Central to peripheral in Background mode in iOS

ios,iphone,xcode,bluetooth-lowenergy,background-process
I am developing an application for a custom wearable communicating through BLE. I have subscribed to the UI background modes in the info.plist file for Bluetooth-central. I am transferring a firmware file of around 600 kb by dividing into chunk sizes of 200 bytes each. The process is going fine...

BLE changing which UUID characteristic to write to

bluetooth-lowenergy,core-bluetooth
I'm very new to coding using Swift so I'm hoping someone can help me out with an easy answer. I'm basically trying to send a characteristic UUID into a write function and switch the write function to write to that UUID. It will just keep using the original one I...

Nordic nRF51 DK on Mac with CrossWorks

arm,bluetooth-lowenergy,nrf51
On OSX with Rowley Associates CrossWorks what are the steps needed to compile and run a simple BLE UART sample code for Nordic nRF51 DK to an iPhone. I found iOS and Android code here and am comfortable with that part: https://www.nordicsemi.com/Products/nRFready-Demo-APPS But I am not sure how to get...

Send a Android BLE GATT Notification

android,bluetooth,notifications,bluetooth-lowenergy
I´m currently developing an BLE application, based on the Gatt sample project provided by Google. What I want to realize is to send a notification from my Android device(smartphone) to another BLE device(e.g. TI CC2540). There are many discussion about how to receive a notification on the Internet. However, I...

Android BLE notification: method setCharacteristicNotification is enough?

android,bluetooth-lowenergy,android-bluetooth
I'm developing two app one peripheral and one central role. Peripheral 2 characteristic : one (called pippo) with write_noresponse property one (called paperino) with read and notify property y private void addServiceToGattServer() { Service = new BluetoothGattService( UUID.fromString(CostantUUID.xxx), BluetoothGattService.SERVICE_TYPE_PRIMARY); paperino = new BluetoothGattCharacteristic( UUID.fromString(CostantUUID.xxx),...

Ble Scan service of a device without connecting to it

java,bluetooth,bluetooth-lowenergy,device,android-bluetooth
I want to scan some device with BLE. I only want to show my device, so for know I get the name of the device and if it is the good one I put it in my list. if (device.getName().contains(DEVICE_NAME)) { mDevices.put(device.hashCode(), device); invalidateOptionsMenu(); } My problem is that if...

BLE-Takes too much time while sending data from ios 7.1 to ios 8 - Transfer speed

ios8,bluetooth-lowenergy,core-bluetooth,ios7.1,ios-bluetooth
I Have a strange issue. I am developing an app in which i am sending Chunks in 20-20 bytes.. Everything is working fine. When i am sending Bytes data from iOS 8 to iOS 8 device it take around 4-5 second to transfer from one device to another, but my...

CoreBluetooth and BluetoothManager, device is not BLE

ios,objective-c,swift,bluetooth,bluetooth-lowenergy
Connect and receive data via bluetooth. We are developing an app for a client. It is a toy for babies that connects via bluetooth and we're having trouble connecting and transferring data. After all the research we did, we found two alternatives: CoreBluetooth and BluetoothManager. As far as I know...

GattCharacteristic.ValueChanged stops getting called

c#,bluetooth-lowenergy,gatt
I am attempting communication with an arduino using an Adafruit Bluefruit LE (a bluetooth 4 module), everything is set up and paired and all that, but I'm having trouble with the ValueChanged event on my GattCharacteristic, it stops firing after somewhere between 30 and 40 times. Below is the setup...

BluetoothGattCallback only calls onConnectionStateChange

android,bluetooth-lowenergy
My device.connectGatt() only triggers onConnectionStateChage. The status is 0, and the connection is established. I tested it on a 4.4 and 5.1 system - with the same result. This is my code: private final BluetoothGattCallback myCallBack = new BluetoothGattCallback() { @Override public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {...

Android BluetoothGatt writeCharacteristic with response

android,ios,bluetooth-lowenergy
From the documentations I see how to write without response like this: BluetoothGattCharacteristic characteristic = ... characteristic.setValue(bytes); mBluetoothGatt.writeCharacteristic(characteristic); How do you preform a write request operation WITH response? (In iOS there is option to select write type CBCharacteristicWriteWithResponse and CBCharacteristicWriteWithoutResponse)...

How to share files with all other devices from my iOS device through application? [closed]

ios,objective-c,bluetooth-lowenergy,ibeacon,file-transfer
I want to share files/data from my iOS app to other devices (ios and android), which have the application installed, through wireless communication. Is it possible? Please help me.

My BLE Peripheral service not discovered on android with Samsung Galaxy Note 3

android,bluetooth-lowenergy
I'm creating a BLE peripheral on my Samsung Galaxy Note3 (API=21). The code seems to be reasonable and the device is discovered (slowly) but services can't be discovered (testing with LightBlue app on my mac) - it's waiting and waiting and no services are shown. Is this a hardware issue...

Third Estimote beacon triggered by startMonitoringForRegion does not receive didEnterRegion or didExitRegion

ios,cocoa-touch,bluetooth-lowenergy,cllocation,estimote
In my app delegate I am registering to receive updates for didEnterRegion and didExitRegion. Specifically, in didFinishLaunchingWithOptions I declare and register to the beacons like so: //Setup the beacon monitoring CLLocationManager *locationManager = [[CLLocationManager alloc] init]; locationManager.delegate=self; for(CLRegion *r in locationManager.monitoredRegions){ [locationManager stopMonitoringForRegion:r]; } self.beaconManager = [[ESTBeaconManager alloc] init]; self.beaconManager.delegate...

Is it possible to use HM-10 or HM-11 BLE Module with Arduino to communicate with an iOS device (ANCS)?

ios,arduino,bluetooth-lowenergy,ancs
I would like to build a smartwatch for my iPhone based on the arduino tools and libraries. But I have a problem with BLE: I know there is already a library for the nRF8001 for ancs (https://github.com/robotastic/ANCS-Library) , but I want to use the HM-11 module, mainly because it's smaller...

HM-10 and iOS/iBeacon. Communicating between the two

ios,iphone,bluetooth-lowenergy,ibeacon
I am trying to wrap my head around the possibilities of the HM-10 but am very new to a lot of how it works. I am only familiar with higher level things. I originally thought I was going to use the hm-10 as an iBeacon but quickly found out it's...

BLE GATT onCharacteristicChanged not called after subscribing to notification

android,arduino,bluetooth-lowenergy,gatt
this is my first post on SO. I have some problems subscribing to GATT notifications on android 5.0.2 . What I aim to do is to connect an Arduino with a BLE Shield to my Android phone. I have a sensor connected to the Arduino and want to send the...

Bluetooth Low Energy: gattCharacteristic.getDescriptor() returns null

android,bluetooth,bluetooth-lowenergy,descriptor,characteristics
I have a problem with getting characteristic's descriptor, it always returns null. There is a chunck of my code: public static final String CHARACTERISTIC_UPDATE_NOTIFICATION_DESCRIPTOR_UUID = "00000001-0000-1000-8000-00805f9b34fb"; public final static UUID tmp_uuid_1 = UUID.fromString(CHARACTERISTIC_UPDATE_NOTIFICATION_DESCRIPTOR_UUID); ... BluetoothGattDescriptor descriptor = gattCharacteristic.getDescriptor(tmp_uuid_1); descriptor.setValue(true ? BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE : new byte[]{0x00, 0x00}); I tried this on...

Transform CBPeripheral's UUID to string format :

objective-c,bluetooth-lowenergy,uuid,core-bluetooth
I am trying to transform a CBPeripheral's UUID to string format: CBPeripheral* peripheral; NSString *pUuid = (__bridge NSString *)(CFUUIDCreateString(nil, peripheral.UUID)); but i got this error: Incompatible pointer types passing retainable parameter of type 'NSString *' to a CF functions expecting 'CFUUIDRef' (aka 'const struct _CFUUID *') type ...

forget a BLE device in a iPhone 6 (8.1.3)

ios,bluetooth-lowenergy,core-bluetooth
I don't know how to forget a BLE device in my iPhone device. Going to Settings -> Bluetooth page , I see the list of Devices, but I don't see any option to forget it.

Android BLE readCharacteristic fails

android,bluetooth-lowenergy,android-ble
I'm trying to read the initial state of a BLE device when I connect to it. Here's the code I have to try to do that: @Override public void onServicesDiscovered(BluetoothGatt gatt, int status) { if(status == BluetoothGatt.GATT_SUCCESS) { Log.i(TAG, gatt.getDevice().toString() + "Discovered Service Status: " + gattStatusToString(status)); for(BluetoothGattService service :...

What is the proper way to search for regions in CoreLocation with Swift?

ios,swift,xcode6,bluetooth-lowenergy,core-location
I've been working with a number of tutorials and continuously have the exact same issue with each of them. When I run the following code or other incarnations of it in other tutorials, I keep getting: 2015-06-12 13:50:33.797 Scanner[4599:2593734] *** Assertion failure in -[CLLocationManager startRangingBeaconsInRegion:], /SourceCache/CoreLocationFramework/CoreLocation-1756.0.20/Framework/CoreLocation/CLLocationManager.m:1129 2015-06-12 13:50:33.798 Scanner[4599:2593734] ***...

iBeacon android app

java,android-studio,bluetooth-lowenergy,ibeacon
I am busy with transmitting a Bluetooth Low Energy UUID via my Raspberry Pi. That setup is done and works to a satisfactory extent. But now my personal objective is to make a very simple android app, that catches this UUID and displays it on the android screen. So after...

How to Write consecutive Characteristic fast and stable for BLE in Android?

android,bluetooth-lowenergy,characteristics
I am developing BLE in Android , I can scan, connected and write characteristic to to the BLE device. I call the following function to pass BluetoothGatt and characteristic to AsyncTask when click the Button. write_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { new WriteCharacteristic(mBluetoothGatt , HueCharacteristic).execute(); } });...

How deploy an large number iBeacons

bluetooth,raspberry-pi,bluetooth-lowenergy,uuid,ibeacon
I want deploy a large number of iBeacons with the same UUID because we can't access dynamically to the UUID of the beacons detected. What is the limit number of the maximum Beacons with the same UUID ? I found some discussions with a number of 65000 approximately, is it...

BlueZ Bluetooth API and distance calibration precision

c,bluetooth,bluetooth-lowenergy,bluez
I am using BlueZ C API to program my bluetooth mouse to read the distance. I have set up a bluetooth dongle. At the moment, I have to move the mouse at least 5-10 feet from the laptop (bluetooth dongle) to get some reading of RSSI. Below this distance, I...

Bluetooth LE app, how to build it cross-plaftorm (iOS-Android)?

android,ios,cordova,bluetooth,bluetooth-lowenergy
I am working on an app that talks to a Bluetooth LE device. I would like some way to avoid developing it twice, for iOS and for Android. Is there a cross-platform app framework that has good support for Bluetooth LE? I have had a quick look at frameworks like...

How does ReadRemoteRssi() works

android,geolocation,bluetooth-lowenergy
I am using BLE beacons for indoor geolocalization puropses. As we all know, RSSI values are never accurate, but still I am trying to enhance my application. So, what i would like to know is how does Android calculate the RSSI? and how often? I found this article but im...

BLE Device Name irretrievable

android,bytearray,bluetooth-lowenergy,android-bluetooth
I have a project that is scanning for beacons that run on BLE. I can scan for the beacon and list them in a nice custom ListView just fine. However retrieving their names seems to not work. In my OnLeScan callback I use device.getName() which appears to always be returning...

Difference between attributes and services in BLE

bluetooth,bluetooth-lowenergy
I would like to know what is the difference between attributes and service in GATT in BLE specification. and where we can find attributes, are they in service, caracteristics or in descriptors. thanks

Is Android BluetoothLE support two way communication between glass and mobile?

android,bluetooth,bluetooth-lowenergy,android-bluetooth
My Google Glass and Mobile supports Bluetooth LE.Can I use the Bluetooth LE for two way communication between Glass and mobile.I try to send an image from Glass to mobile and again send response to Glass using bluetooth LE.Is it possible to do this?

detect bluetooth Le devices in Android

android,bluetooth,bluetooth-lowenergy
I'm a beginner in android app development. I've tried reading the documentation but am getting nowhere (functions in Android's tutorial such as StartLeScan() have been deprecated, etc...) Is there a simple function that returns a list of bluetooth devices ? something like getDevices() -> (list of devices) ? Thank you...

How to define chrome.bluetooth successfully?

javascript,google-chrome,bluetooth,bluetooth-lowenergy
I am looking for a minimal working example of a bluetooth low energy object for chrome such that: chrome.bluetooth returns something other than undefined from javascript at runtime. I've tried various incarnations of manifest.json including: { "name": "Bluetooth Low Energy Test App", "description": "App testing the chrome.bluetoothLowEnergy API", "version": "0.1",...

Upsampling wav file for Android Devices (Bluetooth LE)

android,audio,bluetooth-lowenergy,wav,tritonus
I have been trying for about a week now to get an extremely difficult concept completed for a project. I am attempting to use the 19 bytes BLE allows to transfer raw PCM data through Bluetooth LE to all other Android devices in the vicinity. I used Audacity to reduce...

Bluetooth 4.0 (low energy) API for windows desktop C# application

c#,bluetooth-lowenergy
I am looking for a way to interface with an Adafruit bluefruit LE (nRF8001 chipset) board, using c# in a windows desktop app (From what I've seen, I cannot use the Windows.Devices namespace without hacking it in.) The device is properly paired to my tablet and seems to have no...

iOS: Writing to Bluetooth LE device with NSTimer

ios,bluetooth-lowenergy,nstimer
I'm trying to write a char to my Bluetooth LE device, and so far it has worked, but only when I do it inside the didDiscoverCharacteristicsForService method. - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error { if (error) { [self cleanup]; return; } for (CBCharacteristic *characteristic in service.characteristics) { if ([characteristic.UUID...

ClassCast Exception Error

android,bluetooth-lowenergy,classcastexception,android-bluetooth
When I am trying to use Application object for maintain bluetooth service in whole android app, My application throw me Classcast Exception. When I am trying to connect bluetooth Peripheral. 04-27 09:11:37.704 3289-3289/com.xemodex.bluetooth.xemodex E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.xemodex.bluetooth.xemodex, PID: 3289 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xemodex.bluetooth.xemodex/com.xemodex.bluetooth.xemodex.DeviceControlActivity}: java.lang.ClassCastException: android.app.Application...

Virtual serial port over BLE + ios?

ios,bluetooth,bluetooth-lowenergy,spp
AFAIK iOS 7 supports BLE but it does not support SPP. Any chance to have virtual serial port on iOS just like it's UART to send bytes to BLE module and receive bytes from BLE module? I've purchased cc2540 and cc2541 TI's ble modules, will they work as virtual serial...

How do I use Meteor and a Cordova BLE plugin to connect to a BLE device

meteor,bluetooth-lowenergy,cordova-plugins
I'm trying to use Meteor and this Cordova plugin -https://github.com/don/cordova-plugin-ble-central - added to my project using meteor add cordova in order to connect to a Bluetooth LE device (TI Sensortag). All I want to do to begin with is, when a link is clicked, to connect to the device and...

Xamarin iOS Bluetooth Low Energy - CBPeripheral.UpdatedCharacteristicValue reading TX characteristic shows unexpected data

ios,bluetooth,xamarin,bluetooth-lowenergy,cbperipheral
I recently received a BLE device for Bluetooth to Serial. It uses TruConnect and I'm trying to get it to communicate with my serial device. The serial device receives communication over a serial cable and echoes back anything that is sent to it as well as any results from a...