I
I
Ilyas2019-08-01 05:55:02
Android
Ilyas, 2019-08-01 05:55:02

How does Android work with a Bluetooth gamepad?

Hello. I am connecting a bluetooth joystick (Gamesir -G3s) to the ESP32, using the nRF Connect application, I looked at what services this joystick provides (you can see it in the screenshot). There is no HID service among the services, instead the button data is wrapped in "Unknown service". So the question is, how does Android on a smartphone know how to get data from a joystick if it's not a standard HID device?5d42544ee6acd767560746.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Developer, 2019-08-01
@samodum

A service may not have a name, but it always has a UUID. It is by UUID that the device is identified.
Or rather, this is how it works. The program for accessing the gamepad requests a service from the device with a UUID known to it, the device responds and returns a list of available characteristics (also UUID) within this service.
Google this UUID and you will see that this service is tied to joysticks

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question