bluetooth-lowenergy

Subscribe to a characteristic and catch the value Android

我是研究僧i 提交于 2019-12-12 05:29:25
问题 I´m developing an BLE app, based on the Gatt sample project provided by google: https://developer.android.com/samples/BluetoothLeGatt/index.html. So, I can send data writing in a characteristic successfully. Now I need to know when this characteristic change its value. DeviceActivity private void displayGattServices(List<BluetoothGattService> gattServices) { // get services & characteristics ................ final BluetoothGattCharacteristic characteristic = mGattCharacteristics.get(2).get(0)

Android Bluetooth low energy, how to reuse existing bond for communicating with existing device [closed]

≯℡__Kan透↙ 提交于 2019-12-12 05:03:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I am able to successfully connect and create bond to my bluetooth low energy target device with android phone. However, if I disable my phone's bluetooth and turn it back on, I would like to reconnect back to my device. I have no problem with reconnecting, it is just that whenever I reconnect, it appears that I

ble device bluetoothdevice.getname() returns null [duplicate]

折月煮酒 提交于 2019-12-12 04:59:53
问题 This question already has answers here : android BluetoothDevice.getName() return null (6 answers) Closed 4 years ago . i am using the android's Bluetoothgatt sample application. the device is connected but the bluetoothdevice.getname() returns null. this happens only on micromax mobile. (it is having Kitkat os and bluetooth 4.0 support). is there any solution to read the data from the device? i am able to get the device name and other characterstics on other phone. 回答1: Try below code.

How to check integrity with Bluetooth low energy devices ? How to get timestamp with Ble devices?

两盒软妹~` 提交于 2019-12-12 04:23:43
问题 I know that MIC and CRC exists with ble data packet but i don't know if checking integrity is available with ble devices or i have to implement a code that offer this . For timestamp , can i get the time from ble devices to know when the message is sent . 回答1: CRC and MIC are part of the data packets and checked already on Link Layer level. You do not need to implement extra code in your appliccation to do this checking. Data packets from a BLE device do not automatically contain a time stamp

Packets swapped on BLE receive

心已入冬 提交于 2019-12-12 04:11:36
问题 First of all, a short introduction to the application. We are developing a wireless sensor that sends data over BLE using a single characteristic (hardware limitation) to a client UWP app. The messages vary in size from under 20 bytes, to 512 bytes. The messages consist of a start character (start_char), preamble, data, CRC for detecting errors and an end character (end_char). If these special characters occur inside the message, they are escaped. Message processing on the client side

Linux BlueZ 4.101 Allows GATT Connection but does not Expose GATT Services on Ubuntu

孤街醉人 提交于 2019-12-12 04:08:14
问题 My goal is to use BlueZ 4.101 ( not BlueZ 5.X ) to expose a GATT Server through a USB BLE Dongle ( Cambridge Silicon Radio CSR8510 A10 ) on Ubuntu 14.04. BlueZ 4.101 ships with a gatt-example plugin that several people have confirmed works for them. For example, the last answer in the post claims it works: Bluez: advertise service / gatt server example? Ultimately, I want to implement my own GATT server in BlueZ 4.101 similar to this post: http://gaiger-programming.blogspot.tw/2015/01

BLE Number of Packet per Connection Interval in Wireshark

我是研究僧i 提交于 2019-12-12 03:46:35
问题 I need to know exactly how many packets per interval my BLE can handle. The peripheral, as per its datasheet, handles 6 packets per interval, but I have been unable to find out how many packets the Central can handle. The Central device is a Motorola Moto G (generation 2), running Android 5.0.2. By examining he btsnoop_hci.log file I have been able to identify multiple connection parameters, such as the connection interval (7.5ms in my case). My questions is wheter it is possible to determine

setting the BluetoothLEAdvertisement.Flags in C# for iBeacon advertisemet

▼魔方 西西 提交于 2019-12-12 03:44:14
问题 MS provided samples to send and receive Bluetooth Low Energy advertisements. I saw this very helpful answer for breaking down the iBeacon packet. There's also an example for setting BluetoothLEAdvertisement.ManufacturerData as the ibeacon standards. May I ask how can I set the Flags of the BluetoothLEAdvertisement? For example set the value to: 02-01-06 Thanks Edit 1: Here's the code: using System; using System.Management; using System.Text.RegularExpressions; using Windows.Devices.Bluetooth

onLeScan function not called when trying to detect BLE devices

感情迁移 提交于 2019-12-12 03:09:01
问题 I am trying to detect nearby Bluetooth Low-Energy devices on a service. When the service is started, startLeScan() is called, and then stopLeScan() is called after 10 seconds. Even though startLeScan() returns true, and I didn't get any error, onLeScan on the LeScanCallback was not called. the Service : . . . // Device scan callback. private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { public void onLeScan(final BluetoothDevice device, final int

Can't seem to get core bluetooth to work

落爺英雄遲暮 提交于 2019-12-12 02:58:03
问题 I can't seem to get core bluetooth working on my iPad. ViewController.h @interface ViewController : UIViewController <CBCentralManagerDelegate, CBPeripheralDelegate> { CBCentralManager *manager; } @end ViewController.m #import "ViewController.h" @interface ViewController () @property (strong, nonatomic) IBOutlet UITextView *textField; @end @implementation ViewController @synthesize textField; - (void)viewDidLoad { [super viewDidLoad]; manager = [[CBCentralManager alloc] initWithDelegate:self