2 Replies Latest reply on Jun 22, 2016 5:55 AM by userc_18214 Branched from an earlier discussion.

    BLE Connection Timeout (con't)

      Hi,

       

      Per the thread userc_20416 created here: Re: BLE Connection Timeout

       

      I have a similar problem when using RFCOMM and wifi. RFCOMM alone works fine but if I add a call to wiced_init the RFCOMM connection times out.

       

      I'm using the bt_dualmode_server to test adding a wifi connection. Works fine as is. if I add  wiced_init() I get WICED_TIMEOUT in BTM_ENABLED_EVT event in the bt_dualmode_server_management_cback.

       

      I'm using 3.5.2 already and an ISM43341.

       

       

      void application_start( )

      {

          /* Initialize Bluetooth controller and host stack */

      #ifdef WICED_DCT_INCLUDE_BT_CONFIG

          {

              /* Configure the Device Name and Class of Device from the DCT */

               platform_dct_bt_config_t* dct_bt_config;

              wiced_dct_read_lock( (void**) &dct_bt_config, WICED_TRUE, DCT_BT_CONFIG_SECTION, 0, sizeof(platform_dct_bt_config_t) );

              WPRINT_APP_INFO( ("WICED DCT BT NAME: %s \r\n", dct_bt_config->bluetooth_device_name) );

              strlcpy((char*)bluetooth_device_name, (char*)dct_bt_config->bluetooth_device_name, sizeof(bluetooth_device_name));

              wiced_bt_cfg_settings.device_name = bluetooth_device_name;

              WPRINT_APP_INFO( ("WICED DCT BT DEVICE CLASS : %02x %02x %02x\r\n", dct_bt_config->bluetooth_device_class[0],

                      dct_bt_config->bluetooth_device_class[1],dct_bt_config->bluetooth_device_class[2]) );

              memcpy(wiced_bt_cfg_settings.device_class, dct_bt_config->bluetooth_device_class, sizeof(dct_bt_config->bluetooth_device_class));

              wiced_dct_read_unlock( (void*) dct_bt_config, WICED_TRUE );

          }

      #endif

       

       

          wiced_init();

       

       

          wiced_bt_stack_init( bt_dualmode_server_management_cback, &wiced_bt_cfg_settings, wiced_bt_cfg_buf_pools );

      }

       

      Thank you.

      hugo

        • 1. Re: BLE Connection Timeout (con't)

          Hugo,

          Hi.

           

          Can you check if you have allocated sufficiently the BT side mempool buffers for your application ... In my case, I am running BLE + WiFi STA (with MQTT).

           

          const wiced_bt_cfg_buf_pool_t wiced_bt_cfg_buf_pools[WICED_BT_CFG_NUM_BUF_POOLS] =

          {

          /*  { buf_size, buf_count } */

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

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

              { 360,      12  },      /* Large Buffer Pool  (used for HCI ACL messages) */

              { 1024,      4   },      /* Extra Large Buffer Pool - Used for avdt media packets and miscellaneous (if not needed, set buf_count to 0) */

          };

           

          Also, in my case it was the module vendor's config for that specific platform that was screwed up. Can you go back to a prior platform definition that seemed to be working with standalone RFComm?

           

          Regards,

          Manish

          1 of 1 people found this helpful
          • 2. Re: BLE Connection Timeout (con't)

            Thanks for your insight,

            Didn't had time to test this yet but will in the next few weeks. I'll keep you informed of my success.

             

            Hugo