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

Queries regarding custom characteristic development using nRF_SDK_15.0.0 for BLE peripheral device

Hello,

I am developing application for nRF52832 based SoC using nRF_SDK_15.0.0. I need to develop number of custom characteristic using given sdk. For reference, I am using 'ble_app_uart' example and performing modifications in same to obtain my application. I have studied the examples but some points are unclear to me,

1. Do we need to use 'ble link context manager' for every custom service? In my application, only single client will be connected to at a time. If possible, how to remove dependency of context manager?

2. What is maximum length of raw data that can be communicated through single characteristic at a time. In other words, what is limitation on maximum characteristic payload length (NRF_SDH_BLE_GATT_MAX_MTU_SIZE)?

3. In 'ble_nus.h', what is the need of 'OPCODE_LENGTH' and 'HANDLE_LENGTH' parameters? What do they define?

4. How timer-scheduler is used in the example code? I see that timer based scheduler is enabled in 'sdk_config.h' file but I am not able to find that how it is used. I think my application won't need any scheduler.

I will be glad if someone comments on my queries. It will definitely improve my understanding about SDK and I can develop my application efficiently.

Parents
  • Hi,

    1. This will require rewriting the whole ble_nus implementation. I would recommend using the implementation from SDK 14.2.0, as this is mainly the ble_nus implementation found in SDK 15.0.0, without the additions of context manager.
    2. Please see this post.
    3. These defines define the length (in bytes) of Opcode and Header in PDU. These fields will take space in the ATT MTU and is used to calculate the maximum data length available. This is defined in the Bluetooth specifications.
    4. The modules do not need to be used just because they are enabled in sdk_config.h, this only indicate if the modules are compiled. You can try disabling modules that you don't need. If they are used in the project, you will get error codes when trying to recompile.

    Best regards,
    Jørgen

  • Thanks for prompt resolution. See my comments below,

    1. As per your suggestions, I have modified ble_nus implementation for SDK 15.0.0 and it worked. Thanks.
    2. I will go through post. I think it will answer my query.
    3. Ahh. How did I miss that!
    4. I will try this today. I think that timer is being used in buttons_leds_init() and conn_params_init() functions. Might be used for some timer ISR driven activity.

        Thanks again. I will give update on same.

Reply
  • Thanks for prompt resolution. See my comments below,

    1. As per your suggestions, I have modified ble_nus implementation for SDK 15.0.0 and it worked. Thanks.
    2. I will go through post. I think it will answer my query.
    3. Ahh. How did I miss that!
    4. I will try this today. I think that timer is being used in buttons_leds_init() and conn_params_init() functions. Might be used for some timer ISR driven activity.

        Thanks again. I will give update on same.

Children
No Data
Related