I can change BD address during startup, for example, I add some code in custom_nvds_get_func() to load BD address from an external FLASH. But I can't change it later. Is there any way to change BD addresswhenever neededafter startup?
I can change BD address during startup, for example, I add some code in custom_nvds_get_func() to load BD address from an external FLASH. But I can't change it later. Is there any way to change BD addresswhenever neededafter startup?
Hi There, please see following post which i beleive covers your quetsion.
http://support.dialog-semiconductor.com/bd-address-external-memory
BR JE_Dialog
I am afraid you misunderstand my question. I read the post already, I want to change the BD address dynamically, but the solution in the post can only change the BD address once.
I am blocking by this issue all day long, can you help me?
Any suggestions?
Hello summer20100514,
Maybe this document is helpful?
To use the described method you need to obtain IRK via bonding.
Can you describe more your issue?
Thank, but I have already add the code to achieve the functionalities as discussed in the document you point out, which is a resolvable private address solution. It works well. But my question is, can I configure the BD address whenever I want, such as using an app to configure it. Or I have no need to do so, because the BD address is already changing from time to time??? Maybe I don't make the thing clearly.
Hello summer20100514,
In core definition 4.1 vol 3 p. 384 it says:
I doubt you need to change the address yourself
Hi summer20100514,
You can change BD address, but to make it take effect, you have to reset radio. Please use GAPM_RESET message to reset your radio every time you change your bd address.
Regards!
PY
I tested GAPM_RESET command, and the BD address changed, but there is still something confuses me. I add the following code in custom_nvds_get_func()
for(uint8_t i = 0; i < 6; i++)
{
buf[i] = reload_bd_addr[i];
}
reload_bd_addr[0] += 1;
and in the function gattc_write_cmd_ind_handler() of my service
// reset the lower layers.
struct gapm_reset_cmd* cmd = KE_MSG_ALLOC(GAPM_RESET_CMD, TASK_GAPM, TASK_APP,
gapm_reset_cmd);
cmd->operation = GAPM_RESET;
ke_msg_send(cmd);
the result
My question
Hi summer20100514,
1. check whether you run this code twice.
2. you also need to reinit your profile service to after reset.
Regards!
PY
I guess the function custom_nvds_get_func() is called by stack, so I can't figure out whether it is called twice.
Would the support team be kind to answer this?
Hi Summer,
You can turn off sleep mode in da14580_config.h by comment out CFG_EXT_SLEEP and CFG_DEEP_SLEEP. Then use debug and break point to track your program.
Regards!
PY