Questions tagged [rxandroidble]

RxAndroidBle is a library wrapping the native Android Bluetooth Low Energy (BLE) API based on RxJava. Use this tag when asking questions related to usage of the RxAndroidBle library.

RxAndroidBle is a powerful painkiller for Android's Bluetooth Low Energy headaches. It is backed by RxJava, implementing complicated APIs as handy reactive observables.

Features:

  • Fancy asynchronous operations support (read, write, notifications)
  • Threading management in order to meet Android contracts
  • Connection and operation error handling

See also:

268 questions
1
vote
1 answer

Continuously subscribing and unsubscribing from Observable for BLE scans

I'd like to implement a feature where a BLE scan is activated for 10 seconds, then breaks for 10 seconds, and repeats while the view is active. I'm using RxAndroidBle which wraps the Android BLE APIs for reactivity. I have a method…
Orbit
  • 2,985
  • 9
  • 49
  • 106
1
vote
2 answers

How to disable a notification with rxandroidble?

I'm currently trying to use rxandroidble in order to replace the native BLE API of Android of one of our app. How to disable a notification? I'm able to enable it with the sample code, this one: device.establishConnection(context,…
Myx
  • 175
  • 1
  • 11
1
vote
2 answers

BleGattException when writing to a particular characteristic

Writing to a specific characteristic crashes the application and throws the following exception: Caused by: BleGattException{status=8, bleGattOperation=BleGattOperation{description='CHARACTERISTIC_WRITE'}} at…
Orbit
  • 2,985
  • 9
  • 49
  • 106
1
vote
0 answers

RxAndroidBle - How to receive writeCharacteristic on Mocked Device

I'm trying to send a "hello" to mocked device and receive a feedback from it. I use writeCharacteristic to mocked Device but i dont know how to setup the response from it. Please help, many thanks !!! @OnClick(R.id.write) public void onWriteClick()…
Nhat Dear
  • 11
  • 3
1
vote
2 answers

How to check status of RxBleConnection

Is there some approach to check if the RxBleConnection instance is active or was disconnected? Or maybe some notification to track the moment of disconnection?
Jacek Kwiecień
  • 12,397
  • 20
  • 85
  • 157
1
vote
1 answer

Preferred way to specify operation timeout

What would be the recommended way of specifying a timeout for a connection or operation? Currently I use: ConnectionObservable = mDevice .establishConnection(mRxAppCompatActivity, false) …
starman
  • 356
  • 1
  • 4
  • 11
0
votes
0 answers

Android Error (0x3): GATT WRITE NOT PERMIT

After connecting the phone to the ble device on Android, the first time I try to write, I get Error (0x3): GATT WRITE NOT PERMIT error. Occurred while migrating RxBLE library to Nordic Ble library. writeUUID entered correctly. We tested some of the…
SangSun
  • 1
  • 2
0
votes
1 answer

Implemented Peripheral 1 with Native Android API and implemented Peripheral 2 with RxAndroidBle Possible Conflicts

I'm working with code that's programmed using the Native BLE APIs. It has its own queue implementation for sending/writing characteristics. But I've also had the need to implement a second peripheral which I did use RxAndroidBle. Since it has its…
0
votes
1 answer

RxAndroidBle waiting for response from peripheral when write on it (not long write) in Kotlin

I am trying to write to a peripheral in Android Kotlin using RxAndroidBle. The application writes to the peripheral and then the peripheral responds if this write request is successful, i.e. According to the evaluation made of the information sent…
FABiO
  • 92
  • 8
0
votes
1 answer

onScanFailure after a certain of time when scanning ble devices in android

I am using rxbleandroid library for scanning Bluetooth devices fun startScan() { if(rxBleClient.isScanRuntimePermissionGranted) { Log.d("TAG", "All permission granted") } else { Log.d("TAG", "Not all permission…
0
votes
0 answers

Using many write operations in RxAndroidBle creates a lot of disposables

I have the following code using an. RxAndroidBle Bluetooth Low Energy Connection: private val connectionDisposable = CompositeDisposable() private fun writeBle(writeCharacteristicUuid: UUID, command: ByteArray) if (bleDevice.connectionState ==…
WeGi
  • 1,908
  • 1
  • 21
  • 33
0
votes
0 answers

Write chunk of bytes one by one using writeCharacteristics using RxAndroidBLE

I am trying to write the file to the controller using RxAndroidBLE library. Currently, i am reading a file and converting int byte[] and sending it to in chuck of 244. To perform this task i am using below flow .flatMap(bytes ->…
Hunt
  • 8,215
  • 28
  • 116
  • 256
0
votes
1 answer

RxAndroidBle 2 : multiple Read then notify on another characteristic

I'm using RxAndroidBle 2 to watch a characteristic for CSC but I cannot read some characteristics before. It's also the first time I'm using ReactiveX so I have to deal with flatMap, flatMapSingle, etc. Here's my code to register a handler for…
0
votes
1 answer

PackageManager$NameNotFoundException for rxAndroidBle

For version 1.12.1, I am getting a runtime exception after upgrading to this version from 1.10.5 2021-07-16 15:30:16.588 22665-22665/co.(appname).staging E/AndroidRuntime: FATAL EXCEPTION: main Process: co.(appname).staging:svc, PID: 22665 …
0
votes
1 answer

rxAndroidBLE using persistent connection

I have googled this subject but not found a good example how to do it. I have tried to implement the idea discussed here: https://github.com/Polidea/RxAndroidBle/issues/138 So my code to connect: RxBleDevice device =…
Heikki
  • 21
  • 3