The issue I'm facing is that the API seems to assume that a peripheral is always a GATT server, and that a central is always a GATT client. In my experiments, I'm able to start the ESP32 in peripheral mode, advertise, and allow a phone to connect to it. At that point, I try to register a GATT client, and then perform a service discovery to find the services on the phone, by calling
Code: Select all
esp_ble_gattc_search_service()
NOTE: this is a different problem from running as a Central and Peripheral at the same time (which I've seen mentioned in some forum topics). In this case, I want to run only as a Peripheral, but also have a GATT Client.
Any clue? Is that even possible?