You are here

please tell me how to set random device address | Cypress Semiconductor

please tell me how to set random device address

Summary: 3 Replies, Latest post by Anjana Muralidharan on 27 Oct 2016 11:50 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.
yoshizu_1678311's picture
User
30 posts

I use PSoC Creator3.3.

Please tell me how to set  (Advertiser Address Type=random )  on broadcaster role?

Best Regards,yoshizu

 

 

Anjana Muralidharan's picture
Cypress Employee
160 posts

Hi Yoshizu,

You can set the address type as random as below:
cyBle_discoveryModeInfo.advParam->ownAddrType = CYBLE_GAP_ADDR_TYPE_RANDOM; in the
CYBLE_EVT_STACK_ON event before starting advertisment.

This is only for setting the address type. For setting the advertising address as a random address, you can generate a random address and set using CyBle_SetDeviceAddress() API. They call the above code line of setting address type. Then start adv.

Thanks,
Anjana

yoshizu_1678311's picture
User
30 posts

Hi Anjana,

When I change BD address by CyBle_SetDeviceAddress() set, then BD address is changed.

But  when add  "cyBle_discoveryModeInfo.advParam->ownAddrType = CYBLE_GAP_ADDR_TYPE_RANDOM"   to source,

then BD address is not changed.

why?

Best regards,yoshizu

 

 

 

 

 

 

 

Anjana Muralidharan's picture
Cypress Employee
160 posts

Hi yoshizu,

Could you please make sure you have followed the below sequence:

- Make sure device is not advertising mode

- set the device address

- cyBle_discoveryModeInfo.advParam->ownAddrType = CYBLE_GAP_ADDR_TYPE_RANDOM;

- call enter discovery API

If still you are facing any issue, please share the project, I will help you to find what could be the issue.

Thanks,
Anjana

Log in to post new comments.