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

Ram Memory of Attribute Size question

Hi, 

I have some question below: note: the project_uuid belong uuid-16bit by my define uuid of product myself.

1. My project uses project_uuid and DFU_btn_less services. I figure out If my definition is wrong. I set "#define NRF_SDH_BLE_VS_UUID_COUNT 1", but my project still running OK. Is the setting right?

2. Receives writes, How many NRF_SDH_BLE_VS_UUID_COUNT if following I call how many time sd_ble_uuid_vs_add in services_init()?

3. My project includes many services(project_uuid, HID, TMP, and DFU), and then I addition ATT_MTU = 247 from 23. Now my service_init happen error message "NRF_ERROR_NO_MEM = sd_ble_gatts_characteristic_add", but execute nrf_sdh_ble_enable(&ram_start) is OK, what's the problem?

4. Receives writes, I try to fix NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE = 2048 from 1408, and then this "NRF_SUCCESS= sd_ble_gatts_characteristic_add". Really fix the problem in this way?

5. Could you explain "NRF_SDH_BLE_SERVICE_CHANGED"? I just follow some example to turn on, but I think to occupy Ram size when I turn on NRF_SDH_BLE_SERVICE_CHANGED.

Parents
  • Hi Ken

    1. If you have 1 vendor-specific UUID this should be correct.

    2. Sorry, but I'm struggling to see what you mean here. Can you try rephrasing your question?

    3. You're running out of memory in the SoftDevice itself. You can move your characteristics to userspace and if you are using a recent SoftDevice you can increase the size of the GATT table.

    4. Well, by decreasing the size of the GATTS Attribute table in the SoftDevice, there will be more room for other things, such as increased MTU.

    5. NRF_SDH_BLE_SERVICE_CHANGED must be enabled in order to include the "Service Changed" characteristic to the Attribute table, so yes, this takes up some space in the Attribute table within the SoftDevice.

    Due to the summer holidays in Norway, our support team is understaffed this week, and delayed replies must be expected. Sorry for the inconvenience!

    Best regards,

    Simon

  • Thank you, Simnr:

    Q1, Q2: I combined question1 with question2. How to calculate I need NRF_SDH_BLE_VS_UUID_COUNT ? I think to use sd_ble_uuid_vs_add(), if the function return p_uuid_type=2(BLE_UUID_TYPE_VENDOR_BEGIN) represent I need increase NRF_SDH_BLE_VS_UUID_COUNT. Is this idea right?

    Q3: I don't know what is userspace, and how to use userspace, could you provide examples or introduce document?

    Q4: I don't understand you say "decreasing the size of the GATTS Attribute table in the SoftDevice", because I set NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE is 1408 change to 2048, I think I do increase rather than decrease. So could you explain this concept?

    Q5: Thank your answer, but I don't know this service for application, why need this service in ble devices? Could you provide the document of NRF_SDH_BLE_SERVICE_CHANGED or recommend for me?

    Q6: Q3 and Q4 are solved for GATTS size of Ram problem. how is a different method between Q3 and Q4? In my problem, I need to add ATT_MTU induce  "NRF_ERROR_NO_MEM = sd_ble_gatts_characteristic_add", which are methods great solution for this?

Reply
  • Thank you, Simnr:

    Q1, Q2: I combined question1 with question2. How to calculate I need NRF_SDH_BLE_VS_UUID_COUNT ? I think to use sd_ble_uuid_vs_add(), if the function return p_uuid_type=2(BLE_UUID_TYPE_VENDOR_BEGIN) represent I need increase NRF_SDH_BLE_VS_UUID_COUNT. Is this idea right?

    Q3: I don't know what is userspace, and how to use userspace, could you provide examples or introduce document?

    Q4: I don't understand you say "decreasing the size of the GATTS Attribute table in the SoftDevice", because I set NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE is 1408 change to 2048, I think I do increase rather than decrease. So could you explain this concept?

    Q5: Thank your answer, but I don't know this service for application, why need this service in ble devices? Could you provide the document of NRF_SDH_BLE_SERVICE_CHANGED or recommend for me?

    Q6: Q3 and Q4 are solved for GATTS size of Ram problem. how is a different method between Q3 and Q4? In my problem, I need to add ATT_MTU induce  "NRF_ERROR_NO_MEM = sd_ble_gatts_characteristic_add", which are methods great solution for this?

Children
No Data
Related