Reputation: 1407
Sorry if this seems kind of generic, but I am trying to understand if there is a difference between the way that iOS and Android handle a connection to a BLE device.
I am working with a BLE device where characteristic 'A' sends notifications telling me what data is available, I then write a certain hex value to characteristic 'B', and then based on which hex value I send, I am looking for notifications to come back from either characteristic 'C' or characteristic 'D'.
The problem that I have been running into so far has been that when I subscribe to notifications for multiple characteristics, I am only able to get back actual notifications for one of them instead of all 3. I have read that you can only work with one characteristic at a time, but if that is the case then the architecture of our BLE device/firmware will not work with android.
So I guess my basic question is, can I be subscribed to notifications for multiple characteristics all at one time?
Upvotes: 1
Views: 648
Reputation: 18452
Of course you can subscribe to multiple characteristics at the same time.
Maybe you make the mistake that you write both descriptors right after each other?
Remember that in Android's API you may only have one outstanding request at a time per BluetoothGatt object. So you need to wait for the callback before you write the next one.
Upvotes: 3