1 2 Previous Next 15 Replies Latest reply on Aug 17, 2016 8:34 PM by userc_17087

    BTE cannot pairing with each other on wiced sdk

      I have tow BCM943341WCD1 board, run with bt_dualmode_server example on wiced idk 3.7.0,  one is the server, and the other be a client. I use wiced_bt_dev_sec_bond(p_inq->remote_bd_addr, 0, BT_TRANSPORT_BR_EDR, 0, NULL) to initiate bonding to the server, but server returns:

       

      DCT BT NAME: WICED Server407

      Local Bluetooth Address: [51:34:20:AA:BB:CC]

      WICED DCT BT DEVICE CLASS : 20 04 1c

      00:00:00.010000 GKI_create_task func=0x80187e5  id=1  name=BTU  stack=0x0  stackSize=6144

      00:00:00.019000 GKI_create_task func=0x801efd1  id=0  name=HCISU  stack=0x0  stackSize=4096

      Bluetooth Management Event: 0x15

      Unhandled Bluetooth Management Event: 0x15

      Bluetooth Management Event: 0x0

      Bluetooth enabled (success)

      Local Bluetooth Address: [43:34:1B:00:1F:AC]

      WICED DCT BT ADDR 0x51:0x34:0x20:0xaa:0xbb:0xcc

      rfcomm create_connection result:0

      Waiting for RFCOMM connection (scn=1)...

      Bluetooth Management Event: 0x14

      Unhandled Bluetooth Management Event: 0x14

      Bluetooth Management Event: 0x14

      Unhandled Bluetooth Management Event: 0x14

      Bluetooth Management Event: 0x9

      IO_CAPABILITIES_BR_EDR_RESPONSE_EVT auth, 3 io cap1 oob0

      Bluetooth Management Event: 0x8

      BTM_PAIRING_IO_CAPABILITIES_BR_EDR_REQUEST_EVT 3 io cap1 oob0

      Bluetooth Management Event: 0xb

      BTM_PAIRING_COMPLETE_EVT: failed! status 5 bonding_status0

      Bluetooth Management Event: 0xb

      BTM_PAIRING_COMPLETE_EVT: failed! status 5 bonding_status8192

       

      ==================================================================================

      DCT BT NAME: WICED client

      WICED DCT BT DEVICE CLASS : 20 04 1c

      00:00:00.006000 GKI_create_task func=0x8018665  id=1  name=BTU  stack=0x0  stackSize=6144

      00:00:00.014000 GKI_create_task func=0x801eea1  id=0  name=HCISU  stack=0x0  stackSize=4096

      Bluetooth Management Event: 0x15

      Unhandled Bluetooth Management Event: 0x15

      Bluetooth Management Event: 0x0

      Bluetooth enabled (success)

      Local Bluetooth Address: [43:34:1B:00:1F:AC]

      WICED DCT BT ADDR 0x21:0x34:0x20:0xaa:0xbb:0xcc

      Bluetooth Management Event: 0x14

      Unhandled Bluetooth Management Event: 0x14

      Bluetooth Management Event: 0x14

      Unhandled Bluetooth Management Event: 0x14

       

       

      Bluetooth Address: [CC:BB:AA:20:34:51] device class: 0x20041c

      wiced_bt_dev_sec_bond rst 1

      uuid0 80004d5

      Bluetooth Address: [01:20:B5:05:00:08] device class: 0xd50400

      Bluetooth Management Event: 0x8

      BTM_PAIRING_IO_CAPABILITIES_BR_EDR_REQUEST_EVT 3 io cap1 oob0

              I'm the Initiator!

      Bluetooth Management Event: 0xb

      BTM_PAIRING_COMPLETE_EVT: failed! status 5 bonding_status0

      Bluetooth Management Event: 0xb

      BTM_PAIRING_COMPLETE_EVT: failed! status 5 bonding_status8192

        • 1. Re: BTE cannot pairing with each other on wiced sdk
          JoYi_1844281

          your BT devices are the same BD address

          • 2. Re: BTE cannot pairing with each other on wiced sdk

            I used  wiced_bt_set_local_bdaddr( dct_bt_config->bluetooth_device_address ) to change the bdaddr:

             

            =============================================================================

            if( p_event_data->enabled.status == WICED_BT_SUCCESS )

                    {

                        wiced_bt_dev_read_local_addr( bda );

                        WPRINT_APP_INFO( ( "Local Bluetooth Address: [%02X:%02X:%02X:%02X:%02X:%02X]\n", bda[0], bda[1], bda[2], bda[3], bda[4], bda[5] ) );

             

             

            #ifdef WICED_DCT_INCLUDE_BT_CONFIG

                {

                    /* Configure the Device Address 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 ADDR 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x \r\n",

                            dct_bt_config->bluetooth_device_address[0], dct_bt_config->bluetooth_device_address[1],

                            dct_bt_config->bluetooth_device_address[2], dct_bt_config->bluetooth_device_address[3],

                            dct_bt_config->bluetooth_device_address[4], dct_bt_config->bluetooth_device_address[5]) );

                    wiced_bt_set_local_bdaddr ( dct_bt_config->bluetooth_device_address );

                    wiced_dct_read_unlock( (void*) dct_bt_config, WICED_TRUE );

                }

            #endif

             

             

            ===================================================

            • 3. Re: BTE cannot pairing with each other on wiced sdk

              Thanks! wiced_bt_set_local_bdaddr ( dct_bt_config->bluetooth_device_address ) really has no use.

               

              ===========================================================================

               

              #ifdef WICED_DCT_INCLUDE_BT_CONFIG

                  {

                      /* Configure the Device Address 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 ADDR 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x \r\n",

                              dct_bt_config->bluetooth_device_address[0], dct_bt_config->bluetooth_device_address[1],

                              dct_bt_config->bluetooth_device_address[2], dct_bt_config->bluetooth_device_address[3],

                              dct_bt_config->bluetooth_device_address[4], dct_bt_config->bluetooth_device_address[5]) );

                      wiced_bt_set_local_bdaddr ( dct_bt_config->bluetooth_device_address );

                      wiced_dct_read_unlock( (void*) dct_bt_config, WICED_TRUE );

               

               

                  }

              #endif

               

               

                wiced_bt_dev_read_local_addr( bda );

                WPRINT_APP_INFO( ( "New local Bluetooth Address: [%02X:%02X:%02X:%02X:%02X:%02X]\n", bda[0], bda[1], bda[2], bda[3], bda[4], bda[5] ) );

              Local Bluetooth Address: [43:34:1B:00:1F:AC]

              WICED DCT BT ADDR 0x51:0x34:0x20:0xaa:0xbb:0xcc

              New local Bluetooth Address: [43:34:1B:00:1F:AC]

              • 4. Re: BTE cannot pairing with each other on wiced sdk

                userc_17087 It seems your local bluetooth address is not getting updated ?

                Local bluetooth address is: 43:34

                DCT has 0x51:0x34:

                You call set_local_bdaddr() with DCT bd-addr as parameter and after you read it - it still reads the old-address of 43:34.

                 

                Can you confirm whether address changes are taking effect as intended ?

                Can you also confirm what application you're using for client side ?

                 

                Thanks,
                Dharam

                1 of 1 people found this helpful
                • 5. Re: BTE cannot pairing with each other on wiced sdk

                  Use program above it printed:

                  Local Bluetooth Address: [43:34:1B:00:1F:AC]

                  WICED DCT BT ADDR 0x51:0x34:0x20:0xaa:0xbb:0xcc

                  New local Bluetooth Address: [43:34:1B:00:1F:AC]

                   

                  So wiced_bt_set_local_bdaddr ( dct_bt_config->bluetooth_device_address ) seems has no affect, and why?

                  But scan by other bluetooth device, the MAC address is changed ok.

                  My application is use two bluetooth device (BCM943341WCD1) to communicate  at high speed, and want to implement  by RFCOMM.

                  BCM943341WCD1 can paired with my phone, but the can't  pair  with  other BCM943341WCD1.

                  • 6. Re: BTE cannot pairing with each other on wiced sdk

                    code:

                     

                    wiced_bt_dev_read_local_addr( bda );
                    WPRINT_APP_INFO( ( "#########Local Bluetooth Address: [%02X:%02X:%02X:%02X:%02X:%02X]\n", bda[0], bda[1], bda[2], bda[3], bda[4], bda[5] ) );
                    bda[0] = 0x26;
                    bda[1] = 0x55;
                    WPRINT_APP_INFO( ( "#########Bluetooth Address will be changed to: [%02X:%02X:%02X:%02X:%02X:%02X]\n", bda[0], bda[1], bda[2], bda[3], bda[4], bda[5] ) );
                    wiced_bt_set_local_bdaddr ( bda );
                    wiced_bt_dev_read_local_addr( bda );
                    WPRINT_APP_INFO( ( "#########New local Bluetooth Address: [%02X:%02X:%02X:%02X:%02X:%02X]\n", bda[0], bda[1], bda[2], bda[3], bda[4], bda[5] ) );

                     

                    as it run:

                     

                    #########Local Bluetooth Address: [43:34:1B:00:1F:AC]

                    #########Bluetooth Address will be changed to: [26:55:1B:00:1F:AC]

                    #########New local Bluetooth Address: [43:34:1B:00:1F:AC]

                    • 7. Re: BTE cannot pairing with each other on wiced sdk

                      I see a question on BCM4343w modules have the same Bluetooth MAC address says this bug, is this still a bug on WICED SDK 3.7.0?

                      • 8. Re: BTE cannot pairing with each other on wiced sdk

                        userc_17087 what you observed is strange. There had been a bug earlier(before 3.7.0, not sure which release exactly)where calling set_local_bdaddr() was updating the bluetooth mac-address as desired but when you read it using dev_read_local_addr() - it was returning the stale bluetooth-address controller was loaded with. It got fixed in subsequent releases.

                         

                        The same fix had been present on 3.7.0 as well - but as you're still observing this bug, we will verify it and let you know.

                        On the issue of pairing fail issue - will you be able to provide application which you're using for Client-side? It is not clear what kind of connection your client is trying to establish with dual_mode server?( RFCOMM / GATT ? )

                        Thanks,
                        Dharam

                        1 of 1 people found this helpful
                        • 9. Re: BTE cannot pairing with each other on wiced sdk

                          My company wants a wifi & bluetooth module, and two modules is a pair. The wifi function is ready now, but bluetooth  with master and slave mode is stopped by pairing problem. The use of bluetooth like a bluetooth to UART converter. I use the example of bt_dualmode_server to test, and masked BLE function.

                          The difference between master and slave is the slave use wiced_bt_start_inquiry() to find master and initiate a bluetooth pairing, and bt_config_dct.h is modified as follows:

                          ================================================================================

                          #define WICED_BLUETOOTH_DEVICE_NAME    "WICED Slave" //"WICED master"

                          #define WICED_BLUETOOTH_DEVICE_ADDRESS "\x28\x14\x20\x66\x7B\xCC"  //"\x51\x14\x20\x66\x7B\xCC"

                           

                          #define WICED_BLUETOOTH_DEVICE_CLASS   "\x00\x1f\x00"

                          ================================================================================

                           

                          Is any bug in this program?

                          • 10. Re: BTE cannot pairing with each other on wiced sdk

                            userc_17087

                            Thanks - it's more clear now. Problem could be in the client side app you're using or the bluetooth stack - can't say anything for sure. But as you've modified bt_dualmode_server application to use as client/server - can you post these files - so that we can give it a quick try?( assuming that won't be a problem)

                             

                            MichaelF_56

                             

                            Thanks,
                            Dharam

                            • 11. Re: BTE cannot pairing with each other on wiced sdk

                              I use bt_dualmode_server.7z as rfcomm server.

                              bt_dualmode_server_as_rfcomm_client.7z as rfcomm client.

                              • 12. Re: BTE cannot pairing with each other on wiced sdk

                                userc_17087 Did you attach these .7z packages anywhere ? I'm not able to find them.

                                • 13. Re: BTE cannot pairing with each other on wiced sdk

                                  userc_17087

                                  I can see the packages now. I'll give it a try and will let you know.

                                   

                                  Thanks,
                                  Dharam

                                  • 14. Re: BTE cannot pairing with each other on wiced sdk

                                    Hello dharamk_91

                                    How about the test result? Is any bug in my program? Can you pair success with two same boards?

                                    1 2 Previous Next