4 Replies Latest reply on Mar 6, 2019 2:24 AM by AnjanaM_61

    Why can't SPP be ported arbitrarily on WICED6.2

    JoJo_2624151

       

       

      I ported the SPP to other routines.However, the RFCOMM registration fails

       

      call wiced_bt_rfcomm_create_connection()

       

      rfcomm_result = 6/8

       

      check wiced_bt_rfcomm_result_t

       

         6  =   WICED_BT_RFCOMM_NO_RESOURCES,                                   /**< No Resources */

       

         8  =  WICED_BT_RFCOMM_INVALID_MTU,                                    /**< Invalid MTU */

       

      I've seen it many times

       

       

       

      But add the other code you need in the routine that contains the SPP.

       

      There will be no such error

       

       

      @mifo

        • 1. Re: Why can't SPP be ported arbitrarily on WICED6.2
          AnjanaM_61

          Hi,

           

          Could you please clarify your query?

          Please clarify what do you mean by porting SPP to other routine?

           

          1) Error code WICED_BT_RFCOMM_NO_RESOURCES: Can you check if the /* RFCOMM Configuration */ is set to a valid value other than 0 in wiced_bt_cfg.c 

          (

          :

          /* RFCOMM Configuration */

              {

                  2,                                                          /**< Maximum Number of simultaneous RFCOMM ports */

                  2,                                                          /**< Maximum Number of simultaneous RFCOMM connections */

              },

          :

          :

          )

           

          2) WICED_BT_RFCOMM_INVALID_MTU : when are you getting this error? What is the MTU size set in the API?

           

           

          Please refer to the example snips available in WICED studio SDK and try default values used in SDK to check if still you getting error.

           

          Thanks,
          Anjana

          • 2. Re: Why can't SPP be ported arbitrarily on WICED6.2
            JoJo_2624151

            AnjanaM_61

            See the attachment. Could you help me check it?

            • 3. Re: Why can't SPP be ported arbitrarily on WICED6.2
              JoJo_2624151

              porting : Add SPP to the a2dp_sink routine

              • 4. Re: Why can't SPP be ported arbitrarily on WICED6.2
                AnjanaM_61

                Hi

                 

                Not sure if this issue fixed for you. Could you please try the below suggestions:

                 

                1: Could you please increase the buffer pool sizes in the wiced_bt_cfg.c file . Example:

                const wiced_bt_cfg_buf_pool_t wiced_bt_cfg_buf_pools[WICED_BT_CFG_NUM_BUF_POOLS] =

                {

                /* { buf_size, buf_count, }, */

                { 64, 16, }, /* Small Buffer Pool */

                { 272, 8, }, /* Medium Buffer Pool (used for HCI & RFCOMM control messages, min recommended size is 360) */

                { 1056, 3, }, /* Large Buffer Pool (used for HCI ACL messages) */

                { 1056, 2, }, /* Extra Large Buffer Pool (used for SDP Discovery) */

                };

                 

                2: As of now, I can see the MTU size in the config file of your project is set to 365. Could you please set max_mtu_size to 515 . Please try the above modifications first.

                 

                3: If still not working, can you please change the buffer size passing to API  wiced_bt_rfcomm_init and let us know the API result.

                 

                4: Not sure how did you tested the project. Please let me know

                 

                5: If your requirement is just to merge A2dp sink + SPP profile. Can you try it with the APIs in spp.c ,(removing the hci_control_spp ) and please let us know the API results if not working.

                1 of 1 people found this helpful