- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To use BD_ADDR (Public address) to BLE advertising, I have used multi_advertisement function.
---------------------------------------------------------------------------------
wiced_bt_set_local_bdaddr(addr, 0);
wiced_bt_dev_read_local_addr(adv_params.own_bd_addr);
adv_params.own_addr_type = BLE_ADDR_PUBLIC;
wiced_set_multi_advertisement_params(1, &adv_params);
---------------------------------------------------------------------------------
As I expected, I can see the advertising packet with public address and a central device can connect to this device by using the public address.
However if I initiate authentication, this procedure fails with error code:SMP_DHKEY_CHK_FAIL.
I found the following web site and it indicates that the problem may be related to LE privacy functionality.
CY_BLE_EVT_GAP_AUTH_FAILED with reason 0x24
By the way, if I use normal wiced_bt_start_advertisements() function, private address (RPA) will be used.
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please use the API wiced_bt_start_advertisements() to start advertising.
If you need to disable the RPA, please set the rpa_refresh_timeout to WICED_BT_CFG_DEFAULT_RANDOM_ADDRESS_NEVER_CHANGE in the wiced_bt_cfg.c file as follows:
/* Interval of random address refreshing */
.rpa_refresh_timeout = WICED_BT_CFG_DEFAULT_RANDOM_ADDRESS_NEVER_CHANGE, /**< Interval of random address refreshing - secs */
BTW, you can also set the bt address in the make file such as:
BT_DEVICE_ADDRESS?=20819A123456
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please use the API wiced_bt_start_advertisements() to start advertising.
If you need to disable the RPA, please set the rpa_refresh_timeout to WICED_BT_CFG_DEFAULT_RANDOM_ADDRESS_NEVER_CHANGE in the wiced_bt_cfg.c file as follows:
/* Interval of random address refreshing */
.rpa_refresh_timeout = WICED_BT_CFG_DEFAULT_RANDOM_ADDRESS_NEVER_CHANGE, /**< Interval of random address refreshing - secs */
BTW, you can also set the bt address in the make file such as:
BT_DEVICE_ADDRESS?=20819A123456
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response.
However even though WICED_BT_CFG_DEFAULT_RANDOM_ADDRESS_NEVER_CHANGE is set, the address used for advertising is a PRIVATE ADDRESS.
I'd like to use a public address by disabling the RPA.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When the parameter is set, the address is public per test:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for confirmation.
In addition to setting rpa_refresh_timeout, by changing the makefile definition (BT_DEVICE_ADDRESS?=FFFFFFFFFFFF to BT_DEVICE_ADDRESS?=20819A123456), and optionally issuing wiced_bt_set_local_bdadd(), I have been able to see the advertising packets with the public address I set.
It seems that we should not set FFFFFFFFFFFF as default BD_ADDR in makefile.
Thank you very much.