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

many n00b questions about NAN-36 example project

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:

  1. 4.3.1 step 1: Do I need to replace BLE_BAS with BLE_LBS or is ble_lbs also fine?

  2. 4.3.1 step 1: Do I need to replace p_bas with p_lbs also in the .h file?

  3.   4.3.1 step 2:     Where do I need te place the methods in the code?
    
  4.    4.3.2                 Can I safely delete everything in the init struct and replace it?
    
  5. 4.3.2 What do I need to do with "The signature used for this function" ?

  6. 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);

  7.    4.3.3.1               I can't find evt_handler in the service struct, where is it?
    
  8.  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?
    
  9. 4.3.3.1                  step 3:  Where do I put the code snippet for the empty service?
    
  10.    4.3.3.2    step 2:  Do they mean the if-statement just below:       " // Add Battery Level characteristic" ?
    
  11. 4.3.3.2                              Where do I paste the security macro code snippet on page 20?
    
  12.  4.3.3.2                             How do I memset a structure?
    
  13. 4.3.3.2                              Where do I paste the second code snippet on page 20?
    
  14.  4.3.3.2                             "The initial value is not important, so you can pass a NULL for the p_initial_value", What value? Where? 
    
  15.      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.

ble_lbs.c

ble_lbs.h

Parents Reply Children
No Data
Related