Changing advertise parameters in 'gap_cfg_table' at runtime?

2 posts / 0 new
Last post
Ralf S.
Offline
Last seen:4 years 2 months ago
Joined:2016-02-16 08:06
Changing advertise parameters in 'gap_cfg_table' at runtime?

I'm using PAN1740, with SDK 5.0.3 and DSPS.

I have to change the some gap configuration values values - at runtime!

MT_Dialog mentioned to use a 'custom advertising function', but did not give details for that here:
https://support.dialog-semiconductor.com/comment/11781#comment-11781

E.g. I have to change 'lim_adv_timeout':
- I've found this mapped to 'GAP_TMR_LIM_ADV_TIMEOUT' (in gap_cfg.h')
- which is part gap_cfg_table->GAP_TMR_LIM_ADV_TIMEOUT_VAR
- which is located as 'static const' in 'section("timeout_table_area") (in gapm.c')
therefore not changeable at runtime. :-/

Do you have a proposal for me, how I could change some of the 'gap_cfg_table' elements at runtime?
I did not find prepared hook/callback function to alter these data before usage.

Thank you for your support!

Device:
MT_dialog
Offline
Last seen:3 months 2 days ago
Staff
Joined:2015-06-08 11:34
Hi Ralf S.

Hi Ralf S.

You can't change the advertising during runtime and that includes advertising string and the advertising parameters. In order to change the advertising parameters you will have to stop advertising and send a new advertising command with the updated variables. In order to change the advertising procedure you dont change the gap_cfg_table but the command that is send towards the stack in order to start the advertising. So in DSPS the command that starts the advertising procedure is the default_advertise_operation(), from there you can follow the function invocations and eventually get to the function that actually fills in the structure of the advertising command message app_easy_gap_undirected_advertise_start_create_msg() the parameters are set from the user_config file at the user_adv_conf structure. So by changing the parameters you will be able to manipulate the advertising procedure. You can check each parameter of the GAPM_START_ADVERTISE_CMD command at the RW-BLE-GAP-IS.

Thanks MT_dialog