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

Custom Service + proximity example merge - Error 12 [NRF_ERROR_DATA_SIZE] in BLE advertising init ()

Hi,

I am using SDK 14.2 -> BLE peripheral proximity example. I was trying to add a custom service and some characteristics to this proximity example. I basically took the tutorial on github and tried to merge with the proximity example. 

Four modified files (from BLE peripheral/proimity example) attached.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//13/10/2018 - I am using this project to build custom led and SPKR service but for PDK. After this is successful i'll adapt to custom board
/** @file
*
* @defgroup ble_sdk_app_proximity_main main.c
* @{
* @ingroup ble_sdk_app_proximity_eval
* @brief Proximity Application main file.
*
* This file contains is the source code for a sample proximity application using the
* Immediate Alert, Link Loss and Tx Power services.
*
* This application would accept pairing requests from any peer device.
*
* It demonstrates the use of fast and slow advertising intervals.
*/
#include <stdint.h>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ble_cus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* This code belongs in ble_cus.c*/
#include "sdk_common.h"
#include "ble_srv_common.h"
#include "ble_cus.h"
#include <string.h>
#include "nrf_gpio.h"
#include "boards.h"
#include "nrf_log.h"
/* This code belongs in ble_cus.c*/
uint32_t ble_cus_init(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init)
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I get following error in debug console ->

<error> app: ERROR 12 [NRF_ERROR_DATA_SIZE] at C:\nordic_semi\ses_v14_2_p1\examples\ble_peripheral\ble_app_proximity - Joel edit\main.c:507

Also on Call stack it seems like as soon as I am in advertising_init there is possibly a board reset. Softdevice is not complaining about memory and is a success. I'm using a PCA10056 PDK board with nrf52840. When i stepped debugger into ble_advertising_init () this error 12 comes up while returning error code at end of function. Has anyone come across such a issue?