5 Replies Latest reply on Aug 30, 2015 5:58 PM by LeCa_2156671

    Max number of connections

    LeCa_2156671

      Dear BCM,

           userc_4697kwangBoonT_56

       

       

           When we develop and debug one central to several peripherals.

           We have some information but confused us as below:

       

      in : \WICED\WICED-Smart-SDK-2.1.1\WICED-Smart-SDK\Wiced-Smart\tier2\brcm\libraries\inc\thread_and_mem_mgmt.h

      There is one function named cfa_mm_ConfigureMemoryPool()

      The description above this function is:

       

      ////////////////////////////////////////////////////////////////////////////////////////////////////

      /// Allows the application to configure the size and number of memory blocks in the general pool.

      /// There are only 3 memory pools in the system, 0, 1 and 2. The following is the default

      /// configuration of the pools:

      /// pool[0].size = 32, pool[0].num = 28

      /// pool[1].size = 64, pool[1].num = 6 + max_num_connections (= 4 by default)

      /// pool[2].size = 264, pool[2].num = 3

      /// If you want pool 2 to be 10 buffers with each being 272 bytes, then invoke it this way:

      /// cfa_mm_ConfigureMemoryPool(CFA_MM_POOL_2, 272, 10);

      /// Note that this can only be done only in the context of the APPLICATION_INIT function

      /// (or the function that invokes bleapp_set_cfg). Calling this in any other context is undefined.

      /// Making any of these pools larger than the defaults will reduce the amount of free RAM available

      /// to the app. Use with caution.

      /// If you are setting max number of connections using blecm_setmaxconnection(), make sure that this

      /// function is invoked after setting max number of connections, or the behavior is undefined.

      /// \param pool_id Pool ID of the pool being configured. Must be one of CFA_MM_POOL_X.

      /// \param block_size Size of (in bytes) each buffer in this pool.

      /// \param block_num Number of buffers to allocate in this pool.

      /// \return TRUE on success, else failure.

      ////////////////////////////////////////////////////////////////////////////////////////////////////

       

      /// If you are setting max number of connections using blecm_setmaxconnection(), make sure that this

      /// function is invoked after setting max number of connections, or the behavior is undefined.

      Question I: In our real test, with the current setting, BCM20736 could create as max as 4 connections at one time. if we want to create connections up to 8, how to configurate BCM20736 in APP layer?


      Question II: We refer to the app of hello_client:

           In hello_client_create();

      {

           ......

           //enable multi connection

           blecm_ConMuxInit(HELLO_CLIENT_MAX_SLAVES); // Here we define HELLO_CLIENT_MAX_SLAVES 7

          blecm_enableConMux();

          blecm_enablescatternet(); // What does this function do ??

           ...

      }

      the function of blecm_setmaxconnection() and cfa_mm_ConfigureMemoryPool() is not called in app of hello_client, where are the two functions called ??


      Question III: How to call the configuration functions in APP layter to let BCM20736 support 8 connections at one time ?


      Many thanks...