- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
I am using WICED-Studio-6.2 and with CYBT-343026-01. I am trying to transmit BLE. but I am facing a problem with MAC address. I have brought 4-5 CYBT-343026-01 controllers and every controller transmits with the same MAC address. 88:88:88:88:BC:C1.
I have used the example code of WICED-Studio-6.2\20706-A2_Bluetooth\app\demo\hello_client.
Where I am doing wrong? is there a hardcoded MAC written? if yes. in which file I can get this.? It should be unique for every controller.
Thanks in advance.
Regards,
Neeraj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Neeraj,
1. If you are using WICED SDK, then to generate the address randomly (without manually setting ) , you may try the below method for 20706 based devices :
- Use BT_DEVICE_ADDRESS=random in make file and make sure in the application code you disable privacy to generate public address ( wiced_bt_ble_enable_privacy ( WICED_FALSE ); )
Note : This may not work with Modus Tool Box IDE as the BD address generation logic is different there.
2. You may also use the GUI available here during production : WICED Module Programmer User Guide – KBA225060 . The GUI provides the option to generate address randomly for each download
3. If above two methods are not working for you, you can try the code snippet to generate address randomly inside application code as mentioned here: How to generate BD address randomly and save in flash for CYW20xx devices?
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Neeraj,
There is no Unique ID for 20xxx based devices like PSoC devices. The only way is - you can set unique BD address to each modules during production programming time. You can try following options:
- Edit the wiced_app_cfg.c file to change .rpa_refresh_timeout to WICED_BT_CFG_DEFAULT_RANDOM_ADDRESS_NEVER_CHANGE
- Build the application with the flag BT_DEVICE_ADDRESS=112233445566 (as per your requirement) and program.
- Also, you can use wiced_bt_set_local_bdaddr() API.
Following threads might be useful:
Configuring unique BD address for client device in CYBT-483039-EVAL
Re: How can I find the unique factory ID of the BLE module?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried to set
- Edit the wiced_app_cfg.c file to change .rpa_refresh_timeout to WICED_BT_CFG_DEFAULT_RANDOM_ADDRESS_NEVER_CHANGE
but it seems it is not supported for CYW20706 it seems it is supported for only CYW20719B0, CYW20719B1, CYW20721B1, CYW43012C0, CYW20735B1 and not for CYW20706.
I have tried to set from wiced_bt_set_local_bdaddr() and it works. But I need to set manually everytime. It should set randomly at the time of programming and it should not change on restart/reboot.
Please suggest correct way to do the same.
Thanks and regards,
Neeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Neeraj,
1. If you are using WICED SDK, then to generate the address randomly (without manually setting ) , you may try the below method for 20706 based devices :
- Use BT_DEVICE_ADDRESS=random in make file and make sure in the application code you disable privacy to generate public address ( wiced_bt_ble_enable_privacy ( WICED_FALSE ); )
Note : This may not work with Modus Tool Box IDE as the BD address generation logic is different there.
2. You may also use the GUI available here during production : WICED Module Programmer User Guide – KBA225060 . The GUI provides the option to generate address randomly for each download
3. If above two methods are not working for you, you can try the code snippet to generate address randomly inside application code as mentioned here: How to generate BD address randomly and save in flash for CYW20xx devices?
Thanks & Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content