rxandroidble

Using RxAndroidBle, how do I subscribe to responses from writing to a characteristic?

坚强是说给别人听的谎言 提交于 2019-11-29 12:27:11
The BLE device that I'm connecting to emits bytes on one of its GATT characteristics in response to writes to the characteristic. Clients are supposed to enable notifications on that characteristic, and to interpret change bytes on the characteristic. (The behavior I'm controlling is turning on a scanning service for nearby wireless networks, then listening to the service output.) I'm using RxAndroidBle and following the examples . I have an active connection Observable. The characteristic I want to observe has a UUID called AP_SCAN_DATA . It's supposed to emit 0xFE in response to receiving a

Using RxAndroidBle, how do I subscribe to responses from writing to a characteristic?

拟墨画扇 提交于 2019-11-28 06:29:49
问题 The BLE device that I'm connecting to emits bytes on one of its GATT characteristics in response to writes to the characteristic. Clients are supposed to enable notifications on that characteristic, and to interpret change bytes on the characteristic. (The behavior I'm controlling is turning on a scanning service for nearby wireless networks, then listening to the service output.) I'm using RxAndroidBle and following the examples. I have an active connection Observable. The characteristic I

RxAndroidBle keeping a persistant connection + Write/Notification handling

偶尔善良 提交于 2019-11-27 23:55:14
I am building an Android application that has specific requirements regarding Bluetooth Low Energy. I need to write to a Write-only characteristic and receive responses on a separate notification characteristic, and I need to do it in many, many activities. Is there a Rx way to send a request on the 1st characteristic, wait for the answer on the second one, then proceed to another request? Also, to share my instance of RxAndroidBle I thought about doing some sort of BleManager Singleton where I would expose the Observables, so I can easily subscribe to them in my Presenter. I just want to