bluetooth-lowenergy

Programmatically pairing with a BLE device on Android 4.4+

最后都变了- 提交于 2019-12-17 15:25:25
问题 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 Android the PIN - the user isn't prompted. There are many similar questions about this on SO but they are either a) about Bluetooth Classic, b) old (before setPin() and createBond() were public), or c) unanswered. My understanding is as follows. You

Bluetooth LE RSSI for proximity detection iOS

十年热恋 提交于 2019-12-17 15:23:25
问题 I'll start with the question. Is the BTLE RSSI a good way to indicate two devices proximity to each other or not? does it only work with small devices like fobs etc? The Issue: I am currently looking at making an app that will use BTLE and allow connections based on proximity. In this regard it is much like the demo app that apple show in the Advanced Core Bluetooth keynote (When two devices are almost touching they then connect). As I understand it the proximity is determined based on the

Run iPhone as an iBeacon in the background

萝らか妹 提交于 2019-12-17 14:59:14
问题 Is it possible to run an iOS 7 device as a Bluetooth LE peripheral (iBeacon) and have it advertise in the background? I have been able to get it to advertise in the foreground with the code below and can see it from another iOS device but as soon as I go back to the home screen it stops advertising. I did add the bluetooth-peripheral background mode in the plist but that didn't seem to help although I do get the prompt saying the device wants to use bluetooth in the background. Am I doing

Estimating beacon proximity/distance based on RSSI - Bluetooth LE

为君一笑 提交于 2019-12-17 10:12:13
问题 I've got a simple iOS app which displays the proximity of the Bluetooth LE beacons it detects using such expressions as "immediate", "near" etc. and I need to write something similar on Android. I've followed the tutorial at Android developer and I'm able to list detected devices and now want to estimate the distance/proximity - this is where it's become a problem. According to this SO thread it's just a handful of mathematical calculations. However, they require me to provide a txPower value

Is the native Android BLE implementation synchronous in nature?

五迷三道 提交于 2019-12-17 09:36:41
问题 I remember reading in the "Guide and Hint"-doc to the Samsung BLE API (archived page): One of the most important concepts of the Samsung F/W and stack is its synchronous nature . That is, if we call for example, writeCharacteristic for a particular characteristic, if it returns true , the next call to any BluetoothGatt or BluetoothGattServer method should be done after the onCharacteristicRead callback is received. This is because the stack is designed to support and process only one GATT

Android 4.3: BLE: Filtering behaviour of startLeScan()

爷,独闯天下 提交于 2019-12-17 08:33:05
问题 I'm working on a BluetoothLE sensor device, for which I need to form a one-to-many broadcast of data. As per the spec, peripherals may only have a single master, and due to limitations of the chip and stack I'm designing on, a master can only have three slaves. From what I understand, Android cannot become a BLE slave anyway, so having my device as a master is not an option. Both the BT4 spec and manufacturer documentation talk about another mode of operation, referred to as Broadcast mode.

Android BLE API: GATT Notification not received

限于喜欢 提交于 2019-12-17 07:01:28
问题 Device used for testing: Nexus 4, Android 4.3 Connection is working fine but the onCharacteristicChanged Method of my callback is never called. However I am registering for notifications using setCharacteristicNotification(char, true) inside onServicesDiscovered and that function even returns true. Device log (there are actually no messages at all when notifications should appear / are sent via the Bluetooth device): 07-28 18:15:06.936 16777-16809/de.ffuf.leica.sketch D/BluetoothGatt:

Get MAC address of bluetooth low energy peripheral

柔情痞子 提交于 2019-12-17 04:49:50
问题 I am currently working on an iOS application based on bluetooth low energy devices. In order to get a unique identifier to compare the peripherals got, I have to get the MAC address of the peripherals. It is observed that the UUID property of a peripheral device varies across iOS devices and also for the peripheral device to get a UUID, it will have to get connected to a master device at least once. Since I have to deal with check-in's I don't want to establish a connection. As I went through

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

帅比萌擦擦* 提交于 2019-12-17 04:45:46
问题 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 services, subsequent calls to discoverServices() result in the cached data from the first call, even between disconnections. If I disable/enable the Android bt adapter then discoverServices() refreshes the cache by querying the peripheral. Is there a

Bluetooth Low Energy: listening for notifications/indications in linux

徘徊边缘 提交于 2019-12-17 03:53:32
问题 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 Measurement Notification). I'm using kernel version 3.5 and bluez-5.3. Succcessful commands used so far: hcitool lescan hcitool lecc gatttool -b <Mac Address> --primary gatttool -b <MAC Address> --characteristics gatttool -b <MAC Address> --char-read