This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to increase the maximum number of characteristics per service supported by this module?

Hello,

I'm working on a project with SoftDevice s120. I played with the project ble_app_multilink_central. The maximum number of characteristics per service supported by a module is 3. But I have a module have a service with 8 characteristics.

How to increase the maximum number of characteristics per service supported by this module?

I try to change the BLE_DB_DISCOVERY_MAX_CHAR_PER_SRV in "ble_db_discovery.h" to 8. The module will hang when it initialize.

#define BLE_DB_DISCOVERY_MAX_CHAR_PER_SRV   3

Maximum number of characteristics per service supported by this module.

Edit: format.

Parents
  • You should be able to increase it, if you only have 1 service with 8 characteristics, you should be able to set

    #define BLE_DB_DISCOVERY_MAX_SRV          1  /**< Maximum number of services supported by this module. This also indicates the maximum number of users allowed to be registered to this module. (one user per service). */
    #define BLE_DB_DISCOVERY_MAX_CHAR_PER_SRV 8  /**< Maximum number of characteristics per service supported by this module. */
    

    I find it a bit hard to believe that the module hangs on init, since the init only consists of:

    uint32_t ble_db_discovery_init(void)
    {
        m_num_of_handlers_reg      = 0;
        m_initialized              = true;
        m_num_of_discoveries_made  = 0;
        m_pending_usr_evt_index    = 0;
    
        return NRF_SUCCESS;
    }
    
  • I got the resolve method from nordic support email. Here's the original text:

    Actually, when I modify BLE_DB_DISCOVERY_MAX_CHAR_PER_SRV to 4, the compiler flagged me of error due to not enough memory.

    Please ask the customer to modify the arm_startup_nrf51.s as shown below. This will allow them to free up 2k of memory reserved as heap which is not being used (no memory > allocation function being called in this project).

    Please look the picture.

Reply
  • I got the resolve method from nordic support email. Here's the original text:

    Actually, when I modify BLE_DB_DISCOVERY_MAX_CHAR_PER_SRV to 4, the compiler flagged me of error due to not enough memory.

    Please ask the customer to modify the arm_startup_nrf51.s as shown below. This will allow them to free up 2k of memory reserved as heap which is not being used (no memory > allocation function being called in this project).

    Please look the picture.

Children
No Data
Related