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

AN36 question

this is quote from AN36> 4.2 Set up

The nRF51822 Evaluation Kit is needed for this application example. However, it is possible to modify the project to also work with the Development Kit. 4.2.1 Setting up the Evaluation board Since the nRF51822 Evaluation Kit has an onboard SEGGER chip, you can connect the Evaluation board through a USB cable and immediately start working on it. 4.2.2 Setting up the application A lot of boilerplate code is needed to get started creating an application and a service, so the first step is to copy code from the SDK:

  1. Go to Board\nrf6310\ble\ble_app_template folder.
  2. Copy this folder to Board\pca10001\ble\ and rename it to ble_app_lbs.
  3. Inside the Arm subfolder of ble_app_lbs change the name of the project files from ble_app_template to ble_app_lbs.

At the same time AN36 has folder code[u][/u] which includes ble_app_lbs.uvproj

Could someone please clarify.

The second question/clarification is where can I find parameters SD110 used on pca10005 and pca10004 for keil?

Thank you.

Parents
  • I'm assuming than when initialization of (ble_gatts_attr_t)attr_char_value.init_len and (ble_gatts_attr_t)attr_char_value.max_len takes place sizeof of the attribute characteristic value should be used: i.e. if my initial value is string

    
    #define MAX_LEN 20
    char first[] = "hello world";
    char last[] = "good bye cruel world";
    
    

    During init

    
    attr_char_value.p_value = first;
    attr_char_value.init_len = strlen(first);
    attr_char_value.max_len = MAX_LEN;
    
    

    later

    
    attr_char_value.p_value = last;
    attr_char_value.init_len = strlen(last);
    
    

    Am I correct?

  • I don't think I fully understand what you mean. Perhaps we could take a few steps back, to make it clear what you try to achieve.

    Anyway, what I meant was this: The structure which holds the p_value and init_len fields is the ble_gatts_attr_t struct. This struct is then passed to sd_ble_gatts_characteristic_add(), and whatever value is in at the time of this function call is the value that is used. If you try to modify the value of this structure after having called sd_ble_gatts_characteristic_add(), that will cause no change. This was how I understood your reply here, since you write first "During init" and then "later".

Reply
  • I don't think I fully understand what you mean. Perhaps we could take a few steps back, to make it clear what you try to achieve.

    Anyway, what I meant was this: The structure which holds the p_value and init_len fields is the ble_gatts_attr_t struct. This struct is then passed to sd_ble_gatts_characteristic_add(), and whatever value is in at the time of this function call is the value that is used. If you try to modify the value of this structure after having called sd_ble_gatts_characteristic_add(), that will cause no change. This was how I understood your reply here, since you write first "During init" and then "later".

Children
No Data
Related