- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear friends,
I want to realize a function that let CYBT-343026-01 to transmit data per 7s(Defult param), and somtimes can reset the 7s to 8s or 9s...
How can I modify the code with WICED-Studio tool which generated the code? Refill the high_duty_directed_min_interval&high_duty_directed_max_interval param in wiced_bt_cfg_settings and restart timer?
I think I need to realize the function same with "SAP,H=2BC0,D=0,F=2" in ezserial_343026-CYBT_343026_EVAL-rom-ram-Wiced-release.
BR,
Treacy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Treacy,
From your previous threads, I beleive you are using ibeacon (broadcasting using adv packets). From your description , I think you want to set the adv interval , so that your adv data will be in intervals of say 7s .
In that case , yes you need to change high_duty_min_interval / low_duty_min_interval / high_duty_directed_min_interval / ... min and max depending upon the advert mode you are using in the wiced_bt_cfg_settings
You don't have to restart any timer.
To change in run time, you may try changing the same structure parameter (like db_cfg_settings.ble_advert_cfg.high_duty_nonconn_max_interval = 11200;) before calling start advertisement.
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Treacy,
From your previous threads, I beleive you are using ibeacon (broadcasting using adv packets). From your description , I think you want to set the adv interval , so that your adv data will be in intervals of say 7s .
In that case , yes you need to change high_duty_min_interval / low_duty_min_interval / high_duty_directed_min_interval / ... min and max depending upon the advert mode you are using in the wiced_bt_cfg_settings
You don't have to restart any timer.
To change in run time, you may try changing the same structure parameter (like db_cfg_settings.ble_advert_cfg.high_duty_nonconn_max_interval = 11200;) before calling start advertisement.
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just some additional comments for your question, there will be a random delay between the advertisement interval. It is a pseudo-random value with a range of 0 ms to 10 ms. You need to evaluate if it has any effect with your 7s precision.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Owen,
Isn't wiced_bt_cfg_settings struct the read-only object? I modify the code and complie, but it appear as below.
../../apps/iBeacon/iBeacon.c:740:62: error: assignment of member 'high_duty_min_interval' in read-only object
wiced_bt_cfg_settings.ble_advert_cfg.high_duty_min_interval=value;
^
../../apps/iBeacon/iBeacon.c:741:62: error: assignment of member 'high_duty_max_interval' in read-only object
wiced_bt_cfg_settings.ble_advert_cfg.high_duty_max_interval=value;
^
../../apps/iBeacon/iBeacon.c:742:71: error: assignment of member 'high_duty_directed_min_interval' in read-only object
wiced_bt_cfg_settings.ble_advert_cfg.high_duty_directed_min_interval=value;
^
../../apps/iBeacon/iBeacon.c:743:71: error: assignment of member 'high_duty_directed_max_interval' in read-only object
wiced_bt_cfg_settings.ble_advert_cfg.high_duty_directed_max_interval=value;
^
../../apps/iBeacon/iBeacon.c:744:70: error: assignment of member 'high_duty_nonconn_min_interval' in read-only object
wiced_bt_cfg_settings.ble_advert_cfg.high_duty_nonconn_min_interval=value;
^
../../apps/iBeacon/iBeacon.c:745:70: error: assignment of member 'high_duty_nonconn_max_interval' in read-only object
wiced_bt_cfg_settings.ble_advert_cfg.high_duty_nonconn_max_interval=value;
^
makefile:428: recipe for target '../../build/iBeacon-CYBT_343026_EVAL-rom-ram-Wiced-release/wiced_bt_cfg.o' failed
make.exe[1]: *** [../../build/iBeacon-CYBT_343026_EVAL-rom-ram-Wiced-release/wiced_bt_cfg.o] Error 1
make.exe[1]: *** Waiting for unfinished jobs....
makefile:428: recipe for target '../../build/iBeacon-CYBT_343026_EVAL-rom-ram-Wiced-release/iBeacon.o' failed
make.exe[1]: *** [../../build/iBeacon-CYBT_343026_EVAL-rom-ram-Wiced-release/iBeacon.o] Error 1
Makefile:536: recipe for target 'iBeacon-CYBT_343026_EVAL' failed
make: *** [iBeacon-CYBT_343026_EVAL] Error 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Treacy,
Please change the const data type and try.
just wiced_bt_cfg_settings_t db_cfg_settings = {} in the wiced_bt_cfg.c and add as extern in your main app
Thanks,
Anjana