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

Queued Write Service Halts when trying to write to characteristic

Good afternoon,

I'm using nRF52840 with SDK15 and Softdevice6.0.0.

I'm using the Queued Write Service Module to make use of a characteristic able to receive up to 510bytes of data.

I tested the queued write service through the ble_app_queued_writes with NRF_BLE_QWRS_MAX_RCV_SIZE = 510 and MEM_BUFF_SIZE = 686 and it works OK when trying to write data through nRFConnect with 21-510bytes size.

When I integrate exactly the same code on my application I had to set NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE to a minimum of 1832 and increase the RAM size respectively to avoid NRF_ERROR_NO_MEM as I have 6 more services with 1-6 characteristics each. Yet, when attempting to write data through the queued write characteristic through nRFConnect the app keeps spinning until it timeouts, no matter the size of the data I to write. Do you have any idea why this is happening and can you please help me solve this issue?

Also, I want to be able to write data <20bytes through the same characteristic. Is there any way to achieve this?

Thank you,

João

Parents
  • Good afternoon,

    Just discovered I was missing the nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle); line in the BLE_GAP_EVT_CONNECTED event which was causing the hanging, so now the problem is solved.

    Yet, I still need to find a way to write data with <20bytes through the same characteristic. Is there any way to achieve this?

    Also, I can only write a maximum of 510bytes of data with the Queued Write Service but I would need 1024bytes. How can I accomplish it?

    Thank you,

    João

Reply
  • Good afternoon,

    Just discovered I was missing the nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle); line in the BLE_GAP_EVT_CONNECTED event which was causing the hanging, so now the problem is solved.

    Yet, I still need to find a way to write data with <20bytes through the same characteristic. Is there any way to achieve this?

    Also, I can only write a maximum of 510bytes of data with the Queued Write Service but I would need 1024bytes. How can I accomplish it?

    Thank you,

    João

Children
Related