bluetooth-lowenergy

Autoconnecting to known BLE device

旧城冷巷雨未停 提交于 2020-01-01 05:33:07
问题 I know that setting autoConnect to true in connectGatt won't reconnect my device if i get out and in range again with a big time frame in between. My question is, how can i reconnect without maintaining android awake, and avoid killing my battery? 回答1: I think my solution for similar question (of me) might help. Just save the MAC address of the BLE device into DB or something, and connect by using the MAC address when it needed. You can call connectGatt() periodically, when the app starts, or

iOS CoreBluetooth: State Preservation and Restoration

◇◆丶佛笑我妖孽 提交于 2020-01-01 05:28:05
问题 hope to get some input here. In my current iOS project I am using CoreBluetooth with swift. The app is enabled to communicate using CoreBluetooth in the background which basically works, kind of. The peripheral requires to have an active connection with the iOS device in order to work as expected. Whenever the connection breaks, the peripheral stops it current action. This also happens when the app is closed due to memory pressure. In that case the peripheral should not stop working, so there

iOS Bluetooth LE - Proper Way to Write Without Response

荒凉一梦 提交于 2020-01-01 05:06:10
问题 With iOS CoreBluetooth, when sending a relatively large amount data, it's important to break it up into 20 byte chunks and then write them one at a time into the peripheral object. This is pretty easy to do when using a WriteWithResponse characteristic: write 20 bytes, wait for the callback, write the next 20 bytes, and so on. But what about with a WriteWithoutResponse characteristic? I need to send of 1-2kB of data as quickly as I can over BLE. WriteWithResponse is very inefficient at doing

Raspberry Pi Bluetooth 4.0 Connection

我怕爱的太早我们不能终老 提交于 2020-01-01 04:55:09
问题 I am trying to connect to a Raspberry Pi via iPhone using CoreBluetooth (bluetooth 4.0). I have discovered the device and send out a connection request using this code: if (peripheral != self.foundPeripheral) { NSLog(@"Try to connect to %@", peripheral.name); self.foundPeripheral = peripheral; [self.centralManager stopScan]; [self.centralManager connectPeripheral:peripheral options:nil]; } Neither the didConnectPeripheral or didFailedToConnectPeripheral are called. I also made sure to set the

Cannot connect to BLE device on Raspberry Pi

你。 提交于 2020-01-01 04:34:05
问题 I'm trying to connect to a BLE device (Heart rate sensor, Polar H7), on a Raspberry Pi 2. I use the last version of bluez (5.35) found here: http://www.bluez.org/download/ But when I'm trying to connect using gatttool , I always have "connection refused" error. Here is what I do : pi@raspberrypi ~ $ sudo su root@raspberrypi:/home/pi# hciconfig dev hci0: Type: BR/EDR Bus: USB BD Address: 5C:F3:70:69:54:3D ACL MTU: 1021:8 SCO MTU: 64:1 DOWN RX bytes:616 acl:0 sco:0 events:34 errors:0 TX bytes

How to Bind manually to a BlueTooth Low Energy Device in a WinForm using C#?

限于喜欢 提交于 2020-01-01 03:37:05
问题 This question is mostly answered by: Windows UWP connect to BLE device after discovery I am writing a custom service and testing,for now, using a C#.NET WinForm on Windows 10 to connect to a Bluetooth Low Energy (BLE) device. I am using Framework 4.6.1. We are using a TI SmartRF06 Evaluation Board with a TI CC2650 BLE daughter card. Another developer is handling the Firmware of the Board. Currently using methods similar to the reference answer above I am able to connect to an already bound

Android bluetooth low energy (ble) writeCharacteristic delay callback

☆樱花仙子☆ 提交于 2020-01-01 03:30:28
问题 I am implementing a application on Android using BLE Api (SDK 18), and I have a issue that the transfer data process is delay very slow. This is my log. 03-12 16:20:05.121: D/BluetoothGatt(13578): writeCharacteristic() - uuid: ... 03-12 16:20:06.272: D/BluetoothGatt(13578): onCharacteristicWrite() - Device=... UUID=... Status=0 03-12 16:20:06.972: D/BluetoothGatt(13578): writeCharacteristic() - uuid: ... 03-12 16:20:08.254: D/BluetoothGatt(13578): onCharacteristicWrite() - Device=... UUID=...

How to use BLE Shield based on HM-10 bluetooth module?

核能气质少年 提交于 2020-01-01 03:30:25
问题 I'm a new bie on arduino projects. I would like to ask you for some help. I bought a BLE Shield for Arduino from ( http://imall.iteadstudio.com/development-platform/arduino/shields/im130704001.html ). They made this shield using Hm-10 Bluetooth module(http://www.jnhuamao.cn/bluetooth.asp?ID=1). Itead Studio has no sample codes using this shield. I have no idea on how to program it or send AT commands from Arduino. I read the “AT commands” at the data sheet (ftp://imall.iteadstudio.com/Shield

Android Bluetooth accept() / connect() with already paired devices

白昼怎懂夜的黑 提交于 2019-12-31 16:39:14
问题 I am having trouble connecting two Android devices via Bluetooth, which happens only when they have been paired before. I am running one as the server and the other as the client. Here is the sequence of things on the server side: Check various Bluetooth statuses (adapter available, is enabled, etc). call listenUsingRfcommWithServiceRecord() with a pre-defined UUID that I chose. request to make device discoverable since being discoverable happens asynchronously, I call accept() and wait for

c# Bluetooth LE - write configuration error - ValueChanged never called

ぐ巨炮叔叔 提交于 2019-12-31 05:40:10
问题 So I try to connect my c# WPF program to a BLE device and this is the code to connect to the device: private async Task ConnectToWatcher(DeviceInformation deviceInfo) { try { // get the device BluetoothLEDevice device = await BluetoothLEDevice.FromIdAsync(deviceInfo.Id); // get the GATT service Thread.Sleep(150); var gattServicesResult = await device.GetGattServicesForUuidAsync(new Guid(RX_SERVICE_UUID)); service = gattServicesResult.Services[0]; // get the GATT characteristic Thread.Sleep