how to change the advertising intervals

3 posts / 0 new
Last post
ambient
Offline
Last seen:5 years 9 months ago
加入:2014-08-29 01:38
how to change the advertising intervals

Hi,
I am new to BLE firmware and I want to ask a basic question about the firmware of DA14580.
How to change the advertising interval in the DA1458x_SDK_3.0.6.
I`m using the DA1458x_SDK_3.0.6 as the firmware for the DA14580.
First, I use Keil to open the fh_proxr_sdk.uvproj and generate a hex file.
Then, I use the smart snippets to download the generated hex file into the DA14580.
By the power profiler, the advertising interval seems to be 12.5ms.
I want to change the advertising interval to 1s.
So I tried to change the "slave preferred minimum of connention interval" and
"slave preferred maximum of connention interval" to 800,
which were originally set to be 8 and 16 in the sample program of app_proxr_proj.c.
However, the advertising interval hasn't changed.

Original code:
// Peripheral only: *****************************************************************
// Slave preferred Minimum of connection interval
cmd->con_intv_min = 8; // 10ms (8*1.25ms)
// Slave preferred Maximum of connection interval
cmd->con_intv_max = 16; // 20ms (16*1.25ms)
// Slave preferred Connection latency
cmd->con_latency = 0;
// Slave preferred Link supervision timeout
cmd->superv_to = 100;

// Privacy settings bit field
cmd->flags = 0;

Revised code:
// Peripheral only: *****************************************************************
// Slave preferred Minimum of connection interval
cmd->con_intv_min = 800; // 10ms (8*1.25ms)
// Slave preferred Maximum of connection interval
cmd->con_intv_max = 1600; // 20ms (16*1.25ms)
// Slave preferred Connection latency
cmd->con_latency = 0;
// Slave preferred Link supervision timeout
cmd->superv_to = 10000;

Could you tell me the right way to change the advertising interval?

Thanks in advance.
Best regards

我_Dialog
Offline
Last seen:2 days 21 hours ago
Staff
加入:2013-12-05 14:02
Hello Ambient, we have a few

Hello Ambient, we have a few good threads on this on the forum. Please take a look at the one below ..

http://support.dialog-semiconductor.com/programatically-change-advertising-rate

You are looking for the following variables in the proximity reporter..

/// Local address type
#define APP_ADDR_TYPE 0
/// Advertising channel map
#define APP_ADV_CHMAP 0x07
/// Advertising filter policy
#define APP_ADV_POL 0
/// Advertising minimum interval
#define APP_ADV_INT_MIN 1100
/// Advertising maximum interval
#define APP_ADV_INT_MAX 1100

#if (BLE_HID_DEVICE)
#undef APP_ADV_INT_MIN
#define APP_ADV_INT_MIN 0x20 // *0.625ms (+ pseudo random advDelay from 0 to 10ms)
# undef APP_ADV_INT_MAX
#define APP_ADV_INT_MAX 0x20 // *0.625ms (+ pseudo random advDelay from 0 to 10ms)
#endif

BR JE_Dialog

Josef Albersmann
Offline
Last seen:1 week 3 days ago
加入:2014-05-12 07:44
Thank's!

Thank's!
Please close this issue.