Hi Developers,
I'm using an nRF51822 and finally beginning to understand BLE. I want to learn by example so I downloaded NAN-36.
Im at a point where the Application Note is a bit vague and I need some help:
-
4.3.1 step 1: Do I need to replace BLE_BAS with BLE_LBS or is ble_lbs also fine?
-
4.3.1 step 1: Do I need to replace p_bas with p_lbs also in the .h file?
-
4.3.1 step 2: Where do I need te place the methods in the code?
-
4.3.2 Can I safely delete everything in the init struct and replace it?
-
4.3.2 What do I need to do with "The signature used for this function" ?
-
4.3.2 Where can I find "The battery service event declarations in the ble_lbs.h file", is it?
void ble_lbs_on_ble_evt(ble_lbs_t * p_bas, ble_evt_t * p_ble_evt);
-
4.3.3.1 I can't find evt_handler in the service struct, where is it?
-
4.3.3.1 My generated Base-UUID doesn't look like the 16 hex numbers in de example. it looks like this: C11Cxxxx-C1AD-13CD-06FC-C9BEF61C942E. how is this possible?
-
4.3.3.1 step 3: Where do I put the code snippet for the empty service?
-
4.3.3.2 step 2: Do they mean the if-statement just below: " // Add Battery Level characteristic" ?
-
4.3.3.2 Where do I paste the security macro code snippet on page 20?
-
4.3.3.2 How do I memset a structure?
-
4.3.3.2 Where do I paste the second code snippet on page 20?
-
4.3.3.2 "The initial value is not important, so you can pass a NULL for the p_initial_value", What value? Where?
-
4.3.3.2 I put the #Endif in the header file, wasn't that the purpose?
As expected with this questions: Compiling was a disaster. This BLE looks way out of my legue right now. I don't understand the simpelest instruction in de NAN-36. I included my .h file and .c files.