BLE_CEN_CFG

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Where can I find a complete definition of the BLE_CEN_CFG attributes?

0 Likes
1 Solution
Anonymous
Not applicable

Hello michaelnelson,

Please see the hello_client.c project in the SDK 2.0.1.

const BLE_PROFILE_CFG hello_client_cfg =

{

    /*.fine_timer_interval            =*/ 1000, // ms

    /*.default_adv                    =*/ HIGH_UNDIRECTED_DISCOVERABLE,

/*.button_adv_toggle              =*/ 0,    // pairing button make adv toggle (if 1) or always on (if 0)

    /*.high_undirect_adv_interval     =*/ 32,   // slots

    /*.low_undirect_adv_interval      =*/ 1024, // slots

    /*.high_undirect_adv_duration     =*/ 30,   // seconds

    /*.low_undirect_adv_duration      =*/ 300,  // seconds

    /*.high_direct_adv_interval       =*/ 0,    // seconds

    /*.low_direct_adv_interval        =*/ 0,    // seconds

    /*.high_direct_adv_duration       =*/ 0,    // seconds

    /*.low_direct_adv_duration        =*/ 0,    // seconds

    /*.local_name                     =*/ "Hello Client", // [LOCAL_NAME_LEN_MAX];

    /*.cod                            =*/ BIT16_TO_8(APPEARANCE_GENERIC_TAG),0x00, // [COD_LEN];

    /*.ver                            =*/ "1.00",         // [VERSION_LEN];

    /*.encr_required                  =*/ 0, // (SECURITY_ENABLED | SECURITY_REQUEST),    // data encrypted and device sends security request on every connection

    /*.disc_required                  =*/ 0,    // if 1, disconnection after confirmation

    /*.test_enable                    =*/ 1,    // TEST MODE is enabled when 1

    /*.tx_power_level                 =*/ 0,    // dbm

    /*.con_idle_timeout               =*/ 0,    // second  0-> no timeout

    /*.powersave_timeout              =*/ 0,    // second  0-> no timeout

    /*.hdl                            =*/ {0x00, 0x00, 0x00, 0x00, 0x00}, // [HANDLE_NUM_MAX];

    /*.serv                           =*/ {0x00, 0x00, 0x00, 0x00, 0x00},

    /*.cha                            =*/ {0x00, 0x00, 0x00, 0x00, 0x00},

    /*.findme_locator_enable          =*/ 0,    // if 1 Find me locator is enable

    /*.findme_alert_level             =*/ 0,    // alert level of find me

    /*.client_grouptype_enable        =*/ 1,    // if 1 grouptype read can be used

    /*.linkloss_button_enable         =*/ 0,    // if 1 linkloss button is enable

    /*.pathloss_check_interval        =*/ 0,    // second

    /*.alert_interval                 =*/ 0,    // interval of alert

    /*.high_alert_num                 =*/ 0,    // number of alert for each interval

    /*.mild_alert_num                 =*/ 0,    // number of alert for each interval

    /*.status_led_enable              =*/ 1,    // if 1 status LED is enable

    /*.status_led_interval            =*/ 0,    // second

    /*.status_led_con_blink           =*/ 0,    // blink num of connection

    /*.status_led_dir_adv_blink       =*/ 0,    // blink num of dir adv

    /*.status_led_un_adv_blink        =*/ 0,    // blink num of undir adv

    /*.led_on_ms                      =*/ 0,    // led blink on duration in ms

    /*.led_off_ms                     =*/ 0,    // led blink off duration in ms

    /*.buz_on_ms                      =*/ 100,  // buzzer on duration in ms

    /*.button_power_timeout           =*/ 0,    // seconds

    /*.button_client_timeout          =*/ 1,    // seconds

    /*.button_discover_timeout        =*/ 3,    // seconds

    /*.button_filter_timeout          =*/ 10,   // seconds

#ifdef BLE_UART_LOOPBACK_TRACE

    /*.button_uart_timeout            =*/ 15,   // seconds

#endif

};

This project will get you started.

Thank you

JT

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

Hello michaelnelson,

Please see the hello_client.c project in the SDK 2.0.1.

const BLE_PROFILE_CFG hello_client_cfg =

{

    /*.fine_timer_interval            =*/ 1000, // ms

    /*.default_adv                    =*/ HIGH_UNDIRECTED_DISCOVERABLE,

/*.button_adv_toggle              =*/ 0,    // pairing button make adv toggle (if 1) or always on (if 0)

    /*.high_undirect_adv_interval     =*/ 32,   // slots

    /*.low_undirect_adv_interval      =*/ 1024, // slots

    /*.high_undirect_adv_duration     =*/ 30,   // seconds

    /*.low_undirect_adv_duration      =*/ 300,  // seconds

    /*.high_direct_adv_interval       =*/ 0,    // seconds

    /*.low_direct_adv_interval        =*/ 0,    // seconds

    /*.high_direct_adv_duration       =*/ 0,    // seconds

    /*.low_direct_adv_duration        =*/ 0,    // seconds

    /*.local_name                     =*/ "Hello Client", // [LOCAL_NAME_LEN_MAX];

    /*.cod                            =*/ BIT16_TO_8(APPEARANCE_GENERIC_TAG),0x00, // [COD_LEN];

    /*.ver                            =*/ "1.00",         // [VERSION_LEN];

    /*.encr_required                  =*/ 0, // (SECURITY_ENABLED | SECURITY_REQUEST),    // data encrypted and device sends security request on every connection

    /*.disc_required                  =*/ 0,    // if 1, disconnection after confirmation

    /*.test_enable                    =*/ 1,    // TEST MODE is enabled when 1

    /*.tx_power_level                 =*/ 0,    // dbm

    /*.con_idle_timeout               =*/ 0,    // second  0-> no timeout

    /*.powersave_timeout              =*/ 0,    // second  0-> no timeout

    /*.hdl                            =*/ {0x00, 0x00, 0x00, 0x00, 0x00}, // [HANDLE_NUM_MAX];

    /*.serv                           =*/ {0x00, 0x00, 0x00, 0x00, 0x00},

    /*.cha                            =*/ {0x00, 0x00, 0x00, 0x00, 0x00},

    /*.findme_locator_enable          =*/ 0,    // if 1 Find me locator is enable

    /*.findme_alert_level             =*/ 0,    // alert level of find me

    /*.client_grouptype_enable        =*/ 1,    // if 1 grouptype read can be used

    /*.linkloss_button_enable         =*/ 0,    // if 1 linkloss button is enable

    /*.pathloss_check_interval        =*/ 0,    // second

    /*.alert_interval                 =*/ 0,    // interval of alert

    /*.high_alert_num                 =*/ 0,    // number of alert for each interval

    /*.mild_alert_num                 =*/ 0,    // number of alert for each interval

    /*.status_led_enable              =*/ 1,    // if 1 status LED is enable

    /*.status_led_interval            =*/ 0,    // second

    /*.status_led_con_blink           =*/ 0,    // blink num of connection

    /*.status_led_dir_adv_blink       =*/ 0,    // blink num of dir adv

    /*.status_led_un_adv_blink        =*/ 0,    // blink num of undir adv

    /*.led_on_ms                      =*/ 0,    // led blink on duration in ms

    /*.led_off_ms                     =*/ 0,    // led blink off duration in ms

    /*.buz_on_ms                      =*/ 100,  // buzzer on duration in ms

    /*.button_power_timeout           =*/ 0,    // seconds

    /*.button_client_timeout          =*/ 1,    // seconds

    /*.button_discover_timeout        =*/ 3,    // seconds

    /*.button_filter_timeout          =*/ 10,   // seconds

#ifdef BLE_UART_LOOPBACK_TRACE

    /*.button_uart_timeout            =*/ 15,   // seconds

#endif

};

This project will get you started.

Thank you

JT

0 Likes