- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I will try this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)