I'm trying to mock a BLE connection between and Android phone and a HID BLE mouse by using bluez 5.50 on a Raspberry Pi 3 Model B+ to create a mock HID BLE mouse. I've managed to advertise the device as a HID, but it still isn't appearing on on the Bluetooth menu of the Android device. I've used the nRF Toolbox app to confirm that the device is at definitely visible. I've also used an Ellisys Bluetooth Analyzer to sniff the traffic and I can see the following in the Advertiser.
I've compared it to a Mad Catz R.A.T.M. BLE mouse which has the following Advertiser.
I've managed to add the Mouse category as an Appearance object by adding the below function to the Advertisement class in the example_advertisement.py file which communicates with the advertisement-api in bluez.
def add_appearance(self, appearance):
if not self.appearance:
self.appearance = 0
self.appearance = dbus.types.UInt16(appearance)
However, I can't seem to find a way to add a Flag object. Does anyone know if this is possible with bluez? Or if there is something else I'm missing that would make my mock device appear on the Android Bluetooth menu?
If there's any necessary info I'm missing from above just let me know, as this is my first time using a Raspberry Pi. Thanks in advance.