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

Trying to implement S132 SD with SDK 15.2.0 for nRF52810. Please help me understand few things.

I’m using nRF52810 in my design and for BLE communication I want to use Data Length Extension (DLE). Currently I’m using SDK v 15.2.0 , S112 and since DLE cannot take place in S112 but in S132, I came across that S132 has been production tested for nRF52810 SDK v14.2.0. Now since my design is currently implemented on 15.2.0, I don’t want to change my SDK version but at the same time use S132 for DLE.

Q1. Even though S132 with SDK 15.2.0 for nRF52810 is not production tested yet, can it still be implemented? If yes, what are the important considerations to keep in mind for the project to run as smoothly as it currently does with S112.

Q2. I followed shorturl.at/qrJQ7 article to see how to switch from S112 to S132 in my project and it compiled and linked successfully. I also debugged to figure out the start address of RAM and changed that in the linker file. But I’m getting a weird error (err_code=0x3002) i.e. BLE_ERROR_INVALID_CON_HANDLE as the return to the function 'sd_ble_gatts_service_add()' which is not even any of the return type for the function and if I take this function and call it somewhere else I get other errors like watchdog event. Could all this be in anyway related to compatibility between SDK 15.2.0 and S132 and is there something I need to correct in order to not get such errors ?

  • Hi,

    Manish Kaul said:
    Yes, I've already done that and get this

    Good.

    Manish Kaul said:
    Like what ways ? Can you please elaborate on this.

     The easiest thing to do is to just increase the SoftDevice buffer, so that you don't get this error(NRF_ERROR_RESOURCES ). But on the application layer, you could create your own buffer by using e.g. the SDK queue library/block allocator library, to store the data when the SD buffer is full. Then when you get the BLE_NUS_EVT_TX_RDY event, then retry the transmission.

    Are you still getting NRF_ERROR_RESOURCES ? Did you try to increase NRF_SDH_BLE_GAP_EVENT_LENGTH to value higher than 40? 

  •  The easiest thing to do is to just increase the SoftDevice buffe

    How ? By increasing SRV_BLE_HVN_QUEUE_SIZE ? It's currently set to 33 and I've increased it to 36, cant increase it too much as I'm using nRF52810 and its constrained on RAM.

    ncrease NRF_SDH_BLE_GAP_EVENT_LENGTH to value higher than 40? 

    No, I didn't but I'll try doing it. It should be within minimum and maximum connection interval right ?

    Are you still getting NRF_ERROR_RESOURCES ?

    No I'm not getting this error as I've implemented this


    The only issue right now is while I'm transmitting PCM audio data from device using the above logic and receiving on the master and playing it back as an audio file, I'm loosing few data packets and that can be seen in the audio, how can I prevent that from happening ? Would implementing the queue/block allocator help me with it ?

  • Manish Kaul said:
    How ? By increasing SRV_BLE_HVN_QUEUE_SIZE ?

     Try with NRF_SDH_BLE_GAP_EVENT_LENGTH . The buffer is also indirectly increased by increasing NRF_SDH_BLE_GAP_EVENT_LENGTH. 

    Manish Kaul said:
    It should be within minimum and maximum connection interval right ?

    You can set it higher than that.

    Manish Kaul said:
    Would implementing the queue/block allocator help me with it ?

    Yes, but just like with increasing NRF_SDH_BLE_GAP_EVENT_LENGTH, it will require additional RAM as well. If increasing the NRF_SDH_BLE_GAP_EVENT_LENGTH to a high value does not solve the issue, then I can try to write a small illustrative example for you that shows you have to use ble_app_uart + queue/block allocator to buffer packets.

Related