This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

change Beacon advertising parameters while button pressed?

Hi,

I m using NRF52840 as a Beacon. i m using SDK15.2 ble_app_beacon.Advertising is works fine. Now i want to change advertising parameter while button pressed.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "app_timer.h"
#include "ble_advdata.h"
#include "bsp.h"
#include "nordic_common.h"
#include "nrf_pwr_mgmt.h"
#include "nrf_sdh.h"
#include "nrf_sdh_ble.h"
#include "nrf_soc.h"
#include <stdbool.h>
#include <stdint.h>
#include "ble_srv_common.h"
#include "boards.h"
#include "nrf_delay.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
#define APP_BLE_CONN_CFG_TAG 1 // Tag identifying the BLE configuration.
#define NON_CONNECTABLE_ADV_INTERVAL MSEC_TO_UNITS(500, UNIT_0_625_MS) // iBeacon specifies an advertising interval of 100ms
#define APP_BEACON_INFO_LENGTH 0x17 // Total length of information advertised by the Beacon. */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Here is my code.I m not getting the result.Please guide me to solve this issue