bluetooth-lowenergy

CoreBluetooth in Background at Scheduled Time

左心房为你撑大大i 提交于 2019-12-09 16:07:56
问题 Problem: I need to remain disconnected from a BLE peripheral but send data it's data to a server for processing as often as possible, as it is potentially time-critical. In other words, I want to connect every so often and send the synced data to an API, while remaining disconnected at all other times to save battery life. Failed Attempt: Setting the UIBackgroundModes field of my app's Info.plist file to bluetooth-central only gives me background execution while I am connected. I want to

BluetoothLeScanner.startScan with Android 6.0 does not discover devices

旧街凉风 提交于 2019-12-09 07:53:39
问题 I'm trying to use the function BluatoothLeScanner.startScan instead of the deprecated one BluetoothAdapter.startLeScan . Yesterday I updated my Nexus 5 to Android 6.0 and since that moment my app does not work anymore. I firstly add the preferences required ACCESS_COARSE_LOCATION as found here, https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id. Then I added the permission as described here: https://developer.android.com/training/permissions

How to make Android BLE connect to Bluez Peripheral? (Connection issues)

徘徊边缘 提交于 2019-12-09 07:42:27
I am trying to connect my Nexus 5 (Android 6.0.1) smartphone to my desktop computer (Ubuntu 15.04 64-bit with BlueZ 5.36) using Bluetooth Low Energy. I use a BT 4.0 USB dongle with a CSR BC8510 chipset. The setup did actually work just a couple of days ago. Then I switched to a Broadcom USB dongle and it started to become unstable. Connecting became slow and started to fail. It now does not work anymore at all even though I switched back to the CSR dongle and a different Ubuntu machine (still using the same Android device). However receiving advertising packets was not affected and does still

How to increase the scan period for BLE devices in Android?

旧巷老猫 提交于 2019-12-09 06:37:53
问题 I was trying to implement beacon scanning program, and i want the android BLE services to behave similar to iOS "didRangeBeacons" method,i.e, it should get called every one second. But in android there is no such method. But in android there is "leScanCallback" method that gets called very frequently with a scan period of less than a second. So is there any way that i can implement my functionality in leScanCallback method and increase its scan period interval to 1 second, so that it behaves

How to limit the advertising range of a beacon?

痞子三分冷 提交于 2019-12-09 06:28:47
问题 Is it possible to limit the ranging of the beacon, so that only devices within a certain close range(or proximity) can identify and connect to the beacon? Lets say for example the devices outside 0.5 meter zone shouldn't be able to see or connect to the beacon. I am using a iOS device as a beacon. In the Apple's CoreLocation API, there is a method called peripheralDataWithMeasuredPower in the CLBeaconRegion class which says: peripheralDataWithMeasuredPower: Retrieves data that can be used to

Is there a way to connect to a Bluetooth Low Energy device under Android 5 exposing the public static address?

感情迁移 提交于 2019-12-09 04:46:45
问题 Background : I use a BLE device (`peer') that communicates with my Android app without pairing -- the peer device advertises and android connects to it. During this connection, the Android device transmits its own Bluetooth address (this is part of each connection). Under Android 4.4 this used to be its public static (i.e. Bluetooth-MAC) address, under Android 5 (at least with my Nexus 9) this is a private random address. The Problem : The peer device checks the supplied address of the

Bluetooth low energy, how to parse R-R Interval value?

浪子不回头ぞ 提交于 2019-12-09 01:44:51
问题 My application is receiving information from smart heart device. Now i can see pulse value. Could you please help me to parse R-R Interval value? How can i check device support R-R Interval value or Not ? Any advise from you Thanks 回答1: Have you checked the Bluetooth spec? The sample code below is in C#, but I think it shows the way to parse the data in each heart rate packet. //first byte of heart rate record denotes flags byte flags = heartRateRecord[0]; ushort offset = 1; bool HRC2 =

How to retrieve advertising payload from iBeacon / BLE

六眼飞鱼酱① 提交于 2019-12-09 00:37:47
问题 How do you retrieve the advertising payload for a Bluetooth LE emitter in linux? Specifically, I've configured arduino's and R-PI's using hcitool to act as iBeacons. What I'm looking for is a command to print out what the current advertising payload is for the device. 回答1: At Radius Networks, we put together a set of scripts that parse the iBeacon identifiers out of BLE advertisement detected on Linux. You can find a description of this here. If you simply want to see the raw advertisement

Cannot read characteristic. Android BLE

帅比萌擦擦* 提交于 2019-12-08 20:45:43
问题 I'd like to read the data from a specific characteristic of my remote BLE device to my Android tablet Nexus 7. The problem is that, I can receive the data by enabling the notification of that characteristic even without calling readCharacteristic . But I cannot successfully read characteristic by calling readCharacteristic without enabling the notification. mBluetoothGatt.readCharacteristic(characteristic) returns false. Thus the function onCharacteristicRead has never been triggered. I also

Transferring Data from Central to peripheral in Background mode in iOS

喜夏-厌秋 提交于 2019-12-08 20:00:31
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 but as I am pressing the Home button the app is entering into background state and thus terminating the process after 1-2 minutes. If my screens dims after certain amount of time then the firmware transfer continues but as soon as the home button is pressed the app stops transferring the data after few