bluetooth-lowenergy

Android Bluetooth error 133

China☆狼群 提交于 2019-12-07 08:01:13
问题 I'm attempting to connect to a Bluetooth device on Android. I'm receiving status 133 in my onClientConnectionState handler. I don't always get this error - sometimes it connects fine. I've not been able to put a finger on what triggers the problem. I've even had it immediately after restarting the device and my repro app. I'm aware of several questions and suggested solutions to this problem, including (from here, here, and here): use the UI thread for all BT APIs be sure to close the GATT

Check if Bluetooth Low Energy Beacons are nearby in Android

家住魔仙堡 提交于 2019-12-07 07:07:10
问题 Background I want to programm an android app which can detect if I enter or leave a region. Each region (lets say a building) has a BLE Beacon in advertising mode. I do know the mac adressess of the beacons. The app shall run in background and shall be energy efficient. It is not important to recognize the region immediately, but a window of 5 minutes would be sufficient. On http://developer.android.com/guide/topics/connectivity/bluetooth-le.html its said that you should not "scan on a loop"

scanForPeripheralsWithServices:options: unable to connect when specifying services

对着背影说爱祢 提交于 2019-12-07 06:10:44
问题 When using scanForPeripheralsWithServices:options, I'm able to discover a service when using // Scanning with nil services will return all devices. NSLog(@"Looking for any service."); [self.centralManager scanForPeripheralsWithServices:nil options:nil]; however when specifying the service in advance using the service identifier obtained from the Bluetooth device via the code below, I'm unable to discover the device. #define DEVICE_INFO_SERVICE_UUID @"180a" NSArray *services = [NSArray

Advertise Bluetooth LE Service using HCITool

牧云@^-^@ 提交于 2019-12-07 05:53:57
问题 I'm experimenting with creating a Bluetooth Low Energy Peripheral on my Linux computer (The goal is to send data over Bluetooth From an iPhone). Im currently using the Tools hciconfig , hcitool and hcidump . My current experiment is to advertise a Service with a Specific UUID, that the iOS CoreBluetooth Library will pick up. (Note: I'm not trying to create an iBeacon). Right now, it's actually as simple as One Single Command that is bugging me. hcitool -i hci0 cmd 0x08 0x0008 15 02 01 1a 11

GATT over SPP profile for bluetooth communication?

烈酒焚心 提交于 2019-12-07 05:17:34
问题 This is confusing me for days. In the beginning when I was implementing the functionality, I used GATT profile for BLE bluetooth communication. Then I came up with BluetoothSocket. This uses the SPP profile for bluetooth communication. There is mentioned: The most common type of Bluetooth socket is RFCOMM, which is the type supported by the Android APIs. RFCOMM is a connection-oriented, streaming transport over Bluetooth. It is also known as the Serial Port Profile (SPP). My requirement is -

A way to uniquely identify a BTLE device

大憨熊 提交于 2019-12-07 04:23:10
问题 Is there a way to uniquely identify a BTLE device (something like hardware ID)? I have 2 hardware BTLE devices and 2 soft BTLE devices (using CBCentralManager). All these devices are sending same UUID. I want to identify the exact BTLE device when all the devices are lying near me. Any clue? 回答1: The devices should have unique Bluetooth addresses. If they don't then you wouldn't be able to properly connect to them without them interfering with each other. However, with BTLE it's possible for

Android BLE 4.3 onDescriptorWrite returns status 128 on enabling characteristics notification

守給你的承諾、 提交于 2019-12-07 04:21:46
问题 A question on enabling characteristics using the new android BLE 4.3: I am not getting any notification from the BLE device though I enable notification on characteristics one by one asynchronously using a queue. I also write the descriptor with UUID "00002902-0000-1000-8000-00805f9b34fb" with ENABLE_NOTIFICATION_VALUE. I have followed the recommendation from Google sdk doc and as well suggestions from various forums. By the way I get status = 128 on "onDescriptorWrite". Any idea as what this

BLE subscribe to notification using gatttool or bluepy

只愿长相守 提交于 2019-12-07 04:15:21
问题 I am writing a program using bluepy that listen for a characteristic sent by a bluetooth device. I can also use any library or language, the only constraint is to run on Linux and not in mobile environment (it seems is widely used only in mobile devices, no one use BLE with desktop). Using bluepy I register the delegate and after trying to register for notification calling write('\x01\x00') as described in the bluetooth rfc. But it doesn't work, any notification for the characteristic is

BLE Scan Record Explanation

守給你的承諾、 提交于 2019-12-07 04:10:05
问题 I am trying to get the UUID , Major , Minor IDs from the BLE advertisement received in the form of a byte[] . I have used the suggested code here but the i am unable to understand the output of the parser. Here is the output i get for one of the BLE devices Length: 2 Type : 1 Data : 6, Length: 26 Type : -1 Data : 76 0 2 21 -9 -126 109 -90 79 -94 78 -104 -128 36 -68 91 113 -32 -119 62 12 -121 -79 52 -77, Length: 8 Type : 9 Data : 75 111 110 116 97 107 116, Length: 2 Type : 10 Data : -12,

Swift 3: Can't connect to peripheral via BLE

谁都会走 提交于 2019-12-07 03:06:15
问题 I'm new to working with BLE, currently trying to make a simple application which would connect to my custom BLE device. I am able to discover the BLE device, but for some reason i can't connect to it. I tried to check it with 'Light Blue', it shows my device as connectable and seems to work fine. But in my app after i discover the device, CB manager tries to connect to it and seems to 'freeze'? Function 'didConnect peripheral' is never triggered, and state of peripheral is forever 'connecting