Hi,
I'm using code from the qn9090dk6_private_profile_client_freertos SDK example.
The code is running on the QN9090, and the goal is to build a Central device that connects to a peripheral with a specific service uuid.
More specifically, the goal is for the central to start by scanning for other devices, then once it finds something it verifies that the scanned device has the specific UUID we're looking for. If so, it connects to that device, and then discover its services, characteristics, etc. Then it should go into a series of back and forth messages with that peripheral device.
Right now here's how the code I have behaves. It starts scanning, detect and finds the device with the specific UUID I'm looking for. The code then calls Gap_Connect() with the target remote address and the other connection parameters. Gap_Connect() returns, but I'm 100% sure, that it was successful. How do you check for sure that Gap_Connect() was successful?
The code then exchanges the MTU with the peripheral, and then starts discovering services on the peripheral using BleServDisc_Start(deviceId_t peerDeviceId).
The problem is that BleServDisc_Start() returns 0 services (although the Central has detected the UUID we're looking for at the scanning phase). So I wonder if this behavior is due to failure of Gap_Connect() or to something else that I'm missing.
Any thoughts on how to solve this?
Thanks.