Generate a Random BLE MAC address

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
rahulpatel
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hi, 

I am using PSOC 4200 BLE Device. 
Component name: BLE_v3_66

My requirement is to generate a Random BLE MAC address every 10-15 seconds (We can change the time according to requirement ) and set this address so it will reflect in advertisement packet.

 

I set type from the below structure before read the address

/** Bluetooth Device Address */
typedef struct
{
/** Bluetooth device address */
uint8 bdAddr[CYBLE_GAP_BD_ADDR_SIZE];
/** public = 0, Random = 1 */
uint8 type;
}CYBLE_GAP_BD_ADDR_T;

its like 
CYBLE_GAP_BD_ADDR_T cyble_gap_bd_addr;
cyble_gap_bd_addr.type = 0x01;

CyBle_GetDeviceAddress(&cyble_gap_bd_addr);

but when i read the address every time it shows the same 

can someone help me on this

 

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello, 

Please refer to the below thread for more information on Generating Random BLE address.

https://community.cypress.com/t5/PSoC-4-MCU/Random-static-BLE-address-gives-same-value-on-two-chips/...

Please let me know if this helps.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
1 Reply
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello, 

Please refer to the below thread for more information on Generating Random BLE address.

https://community.cypress.com/t5/PSoC-4-MCU/Random-static-BLE-address-gives-same-value-on-two-chips/...

Please let me know if this helps.

Thanks,

P Yugandhar.

0 Likes