Could you please let me know how you configured your client device whether it is GAP peripheral or central.
Can you please share your project ?
Thanks for your reply. I have two CY8CKIT-042-BLE kits. I also have two projects, one is a client and one as central.
The Client configuration:
Profile role: Server (GATT Server)
GAP role: Periferal
The Central configuration:
Profile role:Client(GATT Client)
GAP role: Central
My central is able to connect to the client and read/write data from/to the client. Everything works. My question is a curiosity question. When I call routine CyBle_GetDeviceAddress() on the client, I get a different address than advReport->peerBdAddr my Central receives in the following code snippet in the callback routine when receiving a scan result.
advReport = (CYBLE_GAPC_ADV_REPORT_T *) eventParam;
The advReport->peerBdAddr address is what my central uses to connect to the client.
Again, everything works but I don't understand why the address obtained by call CyBle_GetDeviceAddress() on the client is not the address obtained by the Central from the scan.
I don't think sharing my projects would add any more useful information.
If routine CyBle_GetDeviceAddress() is called while the client is advertising, the address returned matches what is in the advertising packet received by the Central.
Note: BLE device with GATT role as server and GAP role as Peripheral is a Peripheral device with server configuration.