-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two rxBleClient instances to handle two devices simultaneously #250
Comments
Hello @Jogosb
Unfortunately no — currently it is not possible
It is not tested in any way and you may experience weird behaviour / bugs. For sure actions on a single Best Regards |
I using 4 RxBleClient for connect 4 device in the same time. Currently, I do see anything problem. |
(#250) It was found that commands from different `BluetoothGatt`’s are synchronized so it is possible to decouple synchronization of commands for different connections. Thanks to that if there are two or more connections opened and one connection would get stalled — other connections may continue to work without stalling — with a single command queue shared between connections it was not possible.
(#250) It was found that commands from different `BluetoothGatt`’s are synchronized so it is possible to decouple synchronization of commands for different connections. Thanks to that if there are two or more connections opened and one connection would get stalled — other connections may continue to work without stalling — with a single command queue shared between connections it was not possible.
I have just merged a pull request that should make additional The change should be available in Best Regards |
Dear @dariuszseweryn , Thanks |
There are some minor things to finish. Maybe I will be able to release today. If not then early next week. Still waiting to clarify #275 :) |
Summary
It’s not exactly an issue, more like a architecture-ish question.
Basically in app, we perform some kind of a real time control on two ble devices simultaneously.
Ble operations are performed very fast so as long there are no errors everything works smoothly.
The problem appears when one of the two devices vanish, and operation hangs. It’s waiting for a timeout, and all the operations from the
second device are waiting in the queue.
We were able to overcome this issue by adding second rxBleClient so every client handles communication with single device.
However, in all Your docs You strongly emphsise that there should only be one rxBleClient instance in app.
Basically the question is:
is there any way to handle two devices using one rxBleClient without problem I described before?
If not, are there any crucial downsides of using two rxBleClients?
Thanks in advance for any feedback!
The text was updated successfully, but these errors were encountered: