CYW20719 set local address

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

cross mob
JeHu_3414236
Level 5
Level 5
10 likes received First like received

Is there an example project for assigning BLE address?  I want the firmware to generate a random static address on first power up and store it in flash to use from then onwards.  I tried the 3. option from this post but it does not work.  The address I set is not used but a new random address is used every time I reprogram the app.

Configuring the Bluetooth device address in CYW20706

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The WICED SDK have the api rbg_rand() to generate a random number for the static random address. You can also generate a random number by yourslef in other way and then use the api wiced_bt_set_local_bdaddr(bda , BLE_ADDR_RANDOM) to set a static random random address.

I also attach a project based on hello_sensor to set a static random address for the address. The code is added in the function hello_sensor_application_init.

View solution in original post

4 Replies
lock attach
Attachments are accessible only for community members.
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The WICED SDK have the api rbg_rand() to generate a random number for the static random address. You can also generate a random number by yourslef in other way and then use the api wiced_bt_set_local_bdaddr(bda , BLE_ADDR_RANDOM) to set a static random random address.

I also attach a project based on hello_sensor to set a static random address for the address. The code is added in the function hello_sensor_application_init.

Thanks, I will try this.

0 Likes

Every time I reprogram my app the address is erased and I need to generate a new one.  Is there a way to stop NVRAM from being erased when programming the app or can I store the address somewhere besides NVRAM like where the default address is stored?

0 Likes

You can generate a random mac address by yourself with other method and program it to the device by the API wiced_bt_set_local_bdaddr(bda , BLE_ADDR_RANDOM)