bluetooth-lowenergy

RxAndroidBle: Setup notification, write on characteristic and wait for notification to proceed

狂风中的少年 提交于 2019-12-11 17:09:41
问题 I am using Polidea's RxAndroidBle library to communicate with a Device in my Android application. I am very new to Reactive Programming so I can't figure out exactly how to do the following: Setup Notification in one characteristic (Characteristic A). When notification setup is done, write to another characteristic (Characteristic B). This will trigger a Notification coming from Characteristic A. When the write operation is done, wait for the arrival of the Notification in Characteristic A.

Android IBeaconManager not connecting from activity

旧时模样 提交于 2019-12-11 16:51:58
问题 I'm using the IBeacon SDK from radius networks on the android. Im currently using the IBeaconManager in one Activity and one Service. When the app first launches, The activity binds its iBeaconManager object however onIBeaconServiceConnect never gets called. Calling any ranging or monitoring functions ex startRangingBeaconsInRegion(region) is throwing a RemoteException: The IBeaconManager is not bound to the service. Call iBeaconManager.bind(IBeaconConsumer consumer) and wait for a callback

Android BLE BluetoothGattCallback not work

强颜欢笑 提交于 2019-12-11 16:33:10
问题 I want my ble service run in background even App is closed, that I can still read data. So I used "startService" instead of "bindService". I initialize & connect ble, but I have no idea why my BluetoothGattCallback doesnt work? Here is my code. Thanks. 回答1: Your onCharacteristicRead() method is empty. You have to read the received amount of bytes in this method. 来源: https://stackoverflow.com/questions/22836739/android-ble-bluetoothgattcallback-not-work

Automatic BLE disconnect-connect - Windows10, Android

萝らか妹 提交于 2019-12-11 15:50:55
问题 When I try to reconnect, immediate and automatic [disconnect-connect-disconnect-...] happens before they truly connect and read/write/subscribe. PC: Windows10(1903), using CSR 4.0 dongle + UWP app for BLE pairing/connection Mobile: LG V40, Galaxy Note5, LG X Power, Galaxy S9+, Galaxy S10 V40 ALMOST ALWAYS : automatic quick discon-con happens 10 times or more S10 ALMOST ALWAYS : similar to V40. *First connection (step 3 below) doesn't work. Takes forever to find the services that I get timeout

Obtaining list of connected bluetooth low energy devices in android 3.1 and later

瘦欲@ 提交于 2019-12-11 15:17:11
问题 I'm working on application which shows list of certain connected bluetooth low energy devices, so user can choose which one of them he wants to configure. The problem is that you can't just list all connected devices. As far as I know there are three possible ways: Use BluetoothProfiles bluetoothManager.getConnectedDevices(BluetoothProfile.GATT_SERVER); This fails because android won't connect to GATT server, when device connects, so device is neither under GATT_SERVER nor GATT profile.

How can I reconnect to BLE device? - UWP

淺唱寂寞╮ 提交于 2019-12-11 14:58:49
问题 Both the device id and the address are random that I CANNOT re-use them for bleDevice = await BluetoothLEDevice.FromIdAsync or bleDevice = await BluetoothLEDevice.FromBluetoothAddressAsync . I came up with 2 possible solutions: (1)ConnectionStatusChange & (2)Pairing, but both cases I have problems. (1) MAIN QUESTION Before I disconnect, I first save the bleDevice as bleDeviceReconnect . Then I unsubscribe, dispose characteristics & service & bluetooth le device, and set them to null. In the

How to modify an existing BLECentral class into a singleton class?

六眼飞鱼酱① 提交于 2019-12-11 14:53:01
问题 Hi I'm trying to make the BLE Central class into a Singleton class? I'm running into a few crashes while trying to implement it. Here is my code: //This is the BLE Central Class import Foundation import UIKit import CoreBluetooth var txCharacteristic : CBCharacteristic? var rxCharacteristic : CBCharacteristic? var blePeripheral : CBPeripheral? var characteristicASCIIValue = NSString() class BLECentralViewController : UIViewController, CBCentralManagerDelegate, CBPeripheralDelegate,

Reading values from TI BLE CC2540 on android fails with status = 10 [duplicate]

旧城冷巷雨未停 提交于 2019-12-11 14:45:32
问题 This question already exists : Bluetooth BLE service returns status = 10 at onCharacteristicRead Closed 5 years ago . I have a device with CC2540 chip that I try to connect and read / write data from Android. The device is discovered, I am able to connect, but when I try to send read command I get status = 10 at: public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) I used "BLE sensor tag" source code and changed UUIDs according to mine -

Trouble reading data from OBD 2

隐身守侯 提交于 2019-12-11 13:36:23
问题 I am using OBD2 device to get data from different vehicles. Communication between the app and OBD2 is done using Bluetooth LE. When I use an OBD2 device I get the service UUID = FFE0 and characteristic UUID = FFE1. I can use this characteristic to write PID and I am getting data from my car without any problem. But when I use a different OBD2 I get service UUID = FFF0 and two characteristics with UUID FFE1(with property .write) and FFE2(with property .read). When I try to write a PID to the

Bluetooth low energy - Devices go to deep sleep in transactions

一曲冷凌霜 提交于 2019-12-11 13:05:50
问题 When I read the book about the Data Transactions, It mentions that once the connection is made, both devices can go into deep sleep between transactions. I dont quite understand how this could happen during the transaction. Can anyone explain this? Thanks 回答1: A primary difference between Bluetooth and Bluetooth Low Energy is that the latter was not optimised for sending long data streams. In other words, Bluetooth Low Energy was optimised for sending blocks of data every "once in a while".