Reputation: 51
I'm working with ANCS compatible android BLE app. The ANCS content consumer is nRF52-based thingie that listens for ANCS notifications and (should) also be able to adjust phone volume.
I've got the ANCS as solicitated UUID in the advertisement package and the HID device UUID in the advertisement response package.
All is well with iOS. All works and no problems. However with android the ANCS part of my system works ok, but I cannot get the volume part working. After bonding the android shows the device as input device and it's also selected for input. If I try to send volume up/down key, I get no indication from the android side.
My assumption was that I do not need to connect to nrf board as periperal (bluetoothdevice.connectGatt()), I've only got gatt server running and providing the nrf board the ANCS service. That part works just fine. I've also tried connecting it via connectGatt, and checking the services and enabling the notifications for it. However I cannot see any indication when I send the key. If I request read for characteristic or descriptor, that works OK.
Is there some fundamental flaw in my thinking? Shouldn't the android framework handle the keyboard part? Also why I cannot get any notification about the input_report change?
Upvotes: 0
Views: 933
Reputation: 51
Ok, the keyboard now works also with Android. I'll listen to keyboard volume in the gatt callback. Problem with previous trial was that I just enabled & read the characteristics and descriptors in a loop. After I serialized the operations it works fine.
Upvotes: 0