- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When my central receives a scan from the client, it has the client's address in a CYBLE_GAPC_ADV_REPORT_T data structure. My central can connect to the client using this address. But in my client code, I get (I assume) my client's address by calling CyBle_GetDeviceAddress. THese two addressed don't match, why?
Solved! Go to Solution.
- Labels:
-
BLE
- Tags:
- ble address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
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,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:Custom
Profile role: Server (GATT Server)
GAP role: Periferal
The Central configuration:
Profile:Custom
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.
case CYBLE_EVT_GAPC_SCAN_PROGRESS_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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note: BLE device with GATT role as server and GAP role as Peripheral is a Peripheral device with server configuration.
Thanks,
P Yugandhar.