- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
For my project, I am generating the MAC address as following -->
Now as you can see, if the address generated for example is 00:A0:50:AA:BB:CC, I want to know in the software this address. I need to use this address for our communication protocol. How do we read this address? Is there some API provided by Cypress to read this address ?
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I figured it out. So the following API works correctly
CYBLE_API_RESULT_T CyBle_GetDeviceAddress(CYBLE_GAP_BD_ADDR_T* bdAddr);
Only when the BLE stack is TURNED ON. Otherwise it is incorrect.
STEPS
1. Wait for BLE STACK_ON event to occur
2. Then use the above API to get the correct address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer to the API CYBLE_API_RESULT_T CyBle_GetDeviceAddress (CYBLE_GAP_BD_ADDR_T *bdAddr).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi zhxh
Thanks for sharing this information. I will take a look at this and try it out.
Regards
Shrey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear zhxh
I used the API you specified. My device address as seen from LightBlue is 00:A0:50:4f:94:12
I used the API you recommended with type = 0x00 and type = 0x01 and both of which didn't result in this address? What address is it printing?
With 0x00
1970-01-01 00:00:00.000000 BLE ADDRESS PRINTING
1970-01-01 00:00:00.000000 80
1970-01-01 00:00:00.000000 95
1970-01-01 00:00:00.000000 19
1970-01-01 00:00:00.000000 29
1970-01-01 00:00:00.000000 49
1970-01-01 00:00:00.000000 80
With 0x01
1970-01-01 00:00:00.000000 BLE ADDRESS PRINTING
1970-01-01 00:00:00.000000 80
1970-01-01 00:00:00.000000 95
1970-01-01 00:00:00.000000 19
1970-01-01 00:00:00.000000 29
1970-01-01 00:00:00.000000 49
1970-01-01 00:00:00.000000 c0
How would I get the following address correctly in there ?
00:A0:50:4f:94:12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I figured it out. So the following API works correctly
CYBLE_API_RESULT_T CyBle_GetDeviceAddress(CYBLE_GAP_BD_ADDR_T* bdAddr);
Only when the BLE stack is TURNED ON. Otherwise it is incorrect.
STEPS
1. Wait for BLE STACK_ON event to occur
2. Then use the above API to get the correct address