Hi, I take the tutorial here: https://github.com/NordicPlayground/nRF5x-custom-ble-service-tutorial
Because I have the SDK16 I made same mofification.
1) I comment all inside the static void sleep_mode_enter(void) function
2) I comment : err_code = bsp_btn_ble_init(NULL, &startup_event); APP_ERROR_CHECK(err_code); in the buttons_leds_init function
3) I delete the btn config in the buttons_leds_init function , like that ----> err_code = bsp_init(BSP_INIT_LEDS, bsp_event_handler); because I use the feather nrf52840, of course I have a custom_board.h file with the right LED.
With that, It works with a timer sending notification each second. I don't try more than one minute.
Then I make some change, inthe main.c file :
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(10, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.1 seconds). */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS)
and
#define NOTIFICATION_INTERVAL APP_TIMER_TICKS(50)
In the ble_cus.c in the ble_cus_custom_value_update function I had
uint8_t cu[80];
memset(cu, 0, sizeof(uint8_t));
cu[0]=custom_value;
and you wil reconize these modified lines:
gatts_value.len = 80*sizeof(uint8_t);
gatts_value.offset = 0;
gatts_value.p_value = cu;
of course I modified these lines too in the custom_value_char_add function
attr_char_value.init_len = 80*sizeof(uint8_t);
attr_char_value.init_offs = 0;
attr_char_value.max_len = 80*sizeof(uint8_t);
You have guessed I want to increase the data rate.
I tryed the program , It runs during some seconds and finishes with NRF_BREAKPOINT_COND and the console says <info> app: sd_ble_gatts_hvx result: 13.
Have you an idea of my mistake ?