1 2 Previous Next 19 Replies Latest reply on Sep 19, 2014 12:07 AM by joy.kang

    WICED SDK 2.4.1 support SPP ?

      Dear,

       

      During evaluating WICED SDK with BCM9WCDPLUS Board.

      I have a few question as below.

      1. WICED SDK 2.4.1 support SPP Profile ? or WICED SDK 3.0.0 ?

      2. I have test "bt_rfcomm_client" example, but I' could not connect to a remote device.

        - How can I try to connect to a remote device with specific bd_addr ?

        - Is there any user guide ?

       

      Thanks,

      Regards.

        • 1. Re: WICED SDK 2.4.1 support SPP ?
          BoonT_56

          1) I am looking at sdk3 and it implements rfcomm for the bluetooth (only for 20702 for bridge). SPP is not implemented for 732 ble device.

           

          2) I suggest you installed sdk3 and refer to the discussion on the whitelist. You can assign a device to the whitelist and if you set a filter to it, the next time the bluetooth will scan for only those devices on that list.

          1 of 1 people found this helpful
          • 2. Re: WICED SDK 2.4.1 support SPP ?

            Thank you for your information.

             

            Does the whitelist work on classic bluetooth also ?

             

            BR,

            Joy Kang.

            • 3. Re: WICED SDK 2.4.1 support SPP ?
              BoonT_56

              The concept of Whitelist is found in BLE node to protect itself from unwanted scans and connection requests. Classic mode does not have such a concept.

              • 4. Re: WICED SDK 2.4.1 support SPP ?

                My understanding is same as you. then How can I create a rfcomm connection to remote server ?

                In bt_rfcomm_client example, the example use wiced_bt_rfcomm_connect() API. the API does not have BD_ADDR argument. How can I pass the remote BD_ADDR to the connection library ? can you make simply application for me ?

                BR,

                Joy Kang.

                • 5. Re: WICED SDK 2.4.1 support SPP ?
                  BoonT_56

                  I have copied the following for adding a smart device to a whitelist. You can check out the reference guide within the IDE (SDK 3.0) for more details on how to use them....

                   

                  wiced_result_t wiced_bt_smartbridge_add_device_to_whitelist( const wiced_bt_device_address_t* device_address, wiced_bt_smart_address_type_t address_type )

                   

                  device_address : Bluetooth address of the device to add to the whitelist

                  address_type : Bluetooth Smart address type of the device

                  • 6. Re: WICED SDK 2.4.1 support SPP ?

                    Hi boont,

                     

                    1. Do you mean that I can use whitelist concept in classic bluetooth mode ? I am really confused.

                      - I want to make an bluetooth connection in CLASSIC mode not BLE mode.  but you said "The concept of Whitelist is found in BLE node to protect itself from unwanted scans and connection requests. Classic mode does not have such a concept."

                     

                    2. I've tried add whitelist using " wiced_bt_smartbridge_add_device_to_whitelis" but I could not connect to remote device. please refer to the source code I modified with "bt_rfcomm_client.c", please see the attachment and bold lines below.

                    ---------------------------------------------------------------------------------------------------------------------------------------------

                    /** @file

                    * Bluetooth RFCOMM Client Application

                    */

                    #include "wiced.h"

                    #include "wiced_bt.h"

                    #include "wiced_bt_rfcomm.h"

                    #include "bt_smart_gap.h"

                     

                    /* Interval between connections in milliseconds */

                    #define CONNECTION_INTERVAL_MS 10000

                    /* Change this to your unique friendly name */

                    #define CLIENT_FRIENDLY_NAME   "WICED+ Client"

                     

                    /* Packet content */

                    #define PACKET_CONTENT_STR     "Hello World from "

                    /* RFCOMM Server to connect to */

                    //#define SERVER_NAME            "WICED+ Server"

                    #define SERVER_NAME            "LogSole_L008001"

                    static void socket_event_callback( wiced_bt_rfcomm_socket_t* socket, wiced_bt_rfcomm_event_t event, void* arg );

                     

                    static wiced_bool_t             connection_established = WICED_FALSE;

                    static wiced_semaphore_t        connection_semaphore;

                    static wiced_bt_rfcomm_socket_t client_socket;

                     

                    /* UUID is in little endian. This has to match with the RFCOMM server UUID */

                    #if 0 //original

                    static const wiced_bt_uuid_t service_uuid =

                    {

                        .size  = UUID_128BIT,

                        .value =

                        {

                            .value_128_bit = { 0xCAFF, 0xDECA, 0xDEAF, 0xDECA, 0xFADE, 0xDECA, 0x0000, 0x0000 },

                        },

                    };

                    #else //joy modified

                    static const wiced_bt_uuid_t service_uuid =

                    {

                        .size  = UUID_16BIT,

                        .value =

                        {

                        .value_16_bit = 0x1101,

                        },

                    };

                    #endif

                     

                    /******************************************************

                    *               Function Definitions

                    ******************************************************/

                    void application_start( )

                    {

                        /* Initialise WICED */

                        wiced_init( );

                     

                        /* Initialise semaphore to indicate that connection with a client is established */

                        wiced_rtos_init_semaphore( &connection_semaphore );

                     

                        /* Initialise WICED Bluetooth device */

                        wiced_bt_init( WICED_BT_MPAF_MODE, "WICED+ Client" );

                     

                        /* Initialise Bluetooth RFCOMM protocol */

                        wiced_bt_rfcomm_init( );

                     

                        memset( &client_socket, 0, sizeof( client_socket ) );

                     

                        /* Create an RFCOMM socket */

                        wiced_bt_rfcomm_init_socket( &client_socket, socket_event_callback, NULL );

                     

                      /*begin joy added */

                      wiced_result_t rspCode;

                      wiced_bt_device_address_t r_address;

                     

                      r_address.address[0] = 0x68;

                      r_address.address[1] = 0x84;

                      r_address.address[2] = 0x70;

                      r_address.address[3] = 0x00;

                      r_address.address[4] = 0x80;

                      r_address.address[5] = 0x01;

                      rspCode = bt_smart_gap_add_device_to_whitelist(&r_address, BT_SMART_ADDR_TYPE_PUBLIC);

                      WPRINT_APP_INFO( ( "rspCode=%x\r\n", rspCode ) );

                      /* end joy */

                     

                        while ( 1 )

                        {

                            WPRINT_APP_INFO( ( "Connecting to server ...\n" ) );

                     

                            /* Attempt to connect with a WICED+ server */

                            if ( wiced_bt_rfcomm_connect( &client_socket, SERVER_NAME, &service_uuid ) == WICED_SUCCESS )

                            {

                                wiced_bt_packet_t* packet;

                                uint8_t*           data;

                     

                                /* Wait in semaphore until connection is complete.

                                  * socket_event_callback will set the semaphore once the RFCOMM connection is established

                                  */

                                wiced_rtos_get_semaphore( &connection_semaphore, WICED_WAIT_FOREVER );

                     

                                if ( connection_established == WICED_TRUE )

                                {

                                    wiced_bt_device_address_t address;

                                    uint32_t data_length;

                                    char* data_ptr;

                    -----------------------------------------------------------------------------------------------------------------------------------------------

                     

                    BR,

                    Joy Kang.

                    • 7. Re: WICED SDK 2.4.1 support SPP ?
                      MichaelF_56

                      As boont mentions, the Whitelist functionality you desire is a BLE function, supported on our BCM20736/7 which include a BLE stack on chip.

                       

                      The current WICED SmartBridge solution is based on the BCM20702 and BCM43362.  It's my understanding that while the BCM20702 is indeed a dual mode 'Smart Ready' device (BT/BLE) from a HW perspective, the BLE portion of the device is not used within the existing SmartBridge.  In fact, there is not a Bluetooth upper layer stack included within the WICED Wi-Fi SDK where SmartBridge is supported. Access to all of the Bluetooth functionality is essentially through HCI/RFCOMM (i.e. runs as an RFCOMM client/server).

                       

                      Here's the samples we provide:

                      • Apps/demo/bt_smartbridge
                      • Apps/snip/bt_rfcomm
                      • Apps/test/bt_smartbridge_console
                      • Apps/test/bt_smartbridge_mfg_test
                      • 8. Re: WICED SDK 2.4.1 support SPP ?

                        Hi,

                         

                        My hardware is BCM9WCDPLUS114 (BCM43362+STM32F205 WICED+ Module and BCM20702 Bluetooth module).

                        then do you mean smartbridge samples work as Classic Mode with BCM20702 Bluetooth module ?

                         

                        but I think only bt_rfcomm sample works as classic mode. the others(bt_smartbridge, smartbrigde_consol and bt_smartbridge_mfg_test) only support BLE mode.

                         

                        Anyway, I am testing with "bt_rfcomm_clinet" sample but I do not know how to connect a remote rfcomm server.

                        the result of connection action of the sample code is always failed.

                         

                        I wan to know how to connect a remote rfcomm server which I already know the BD_ADDR of remote rfcomm server. the sample code does not include any methods of setting the BD_ADDR of remote device.

                         

                        BR,

                        Joy Kang.

                        • 9. Re: WICED SDK 2.4.1 support SPP ?
                          MichaelF_56

                          I will check with the developers to determine whether or not we can provide an example of the "bt_rfcomm_clinet" connecting to a remote rfcomm server with a known BR_ADDR.

                           

                          More to follow on this....

                           

                          In addition, I believe you are correct in that bt_smartbridge, smartbrigde_consol and bt_smartbridge_mfg_test support BLE mode.

                          • 10. Re: WICED SDK 2.4.1 support SPP ?

                            Thank you for your helpful information.

                             

                            I have to decide which platform I will use for my sensor bridge within a few days,

                            Please let me know the your side decision ASAP. (the example of the "bt_rfcomm_client" connecting to a remote rfcomm server with a known BD_ADDR)

                             

                            In addition,

                            1. The best case is that WICED SDK includes SPP profile.

                                - Do you have any plan to release SPP profile ?

                             

                            2. If you do not have a plan to release SPP profile

                               - Could you open APIs regarding GAP functions( at least, two APIs, Inquiry and create connection with a known BD_ADDR should be included)

                             

                            Best regards,

                            Joy Kang.

                            • 11. Re: WICED SDK 2.4.1 support SPP ?
                              MichaelF_56

                              I have created a case with the factory and will try to answer these questions for you in the next few working days.

                               

                              You may also want to take a look at this thread as the existing Smartbidge functionality is explained here as well: Regarding Bluetooth peripheral method on WICED Wi-Fi platform

                              • 12. Re: WICED SDK 2.4.1 support SPP ?
                                MichaelF_56

                                The developers confirmed that the current RFCOMM client does not support connecting to a server with specific BD_ADDR. Unfortunately, this is a firmware limitation which they can’t change in the application or library code.

                                 

                                The team normally suggests that customers use a unique device-friendly name for the server.

                                • 13. Re: WICED SDK 2.4.1 support SPP ?

                                  Ok, I see,

                                   

                                  How about the additional questions ? Do you have any timeline for below features ?

                                   

                                  1. The best case is that WICED SDK includes SPP profile.

                                      - Do you have any plan to release SPP profile ?

                                   

                                  2. If you do not have a plan to release SPP profile

                                     - Could you open APIs regarding GAP functions( at least, two APIs, Inquiry and create connection with a known BD_ADDR should be included)

                                   

                                  BR,

                                  Joy,

                                  • 14. Re: WICED SDK 2.4.1 support SPP ?
                                    MichaelF_56

                                    Note that I confirmed today that the next release of the WICED-SDK version 3.1.1, will NOT include support for BT dual-mode stack, so any previous statements about simultaneous support for SPP and GATT are incorrect.

                                     

                                    Essentially, while both BLE and BT Classic are supported on the current SmartBridge solutions[s], simultaneous support for a dual mode stack is NOT.

                                     

                                    Here's the rundown on our offering:

                                     

                                    1.

                                    Currently supported on WICED-SDK-2.4.1:
                                    BCM20702
                                    - GATT (not-simultaneously with SPP)
                                    - SPP/RFCOMM

                                     

                                    2.

                                    Currently supported on WICED-SDK-3.0.1:

                                    2a.

                                    BCM20702
                                    - GATT (not-simultaneously with SPP)
                                    - SPP/RFCOMM


                                    2b.

                                    BCM43341
                                    - GATT

                                     

                                    3.
                                    Future support for a dual-mode stack with simultaneous SPP and GATT support on the 20702 and 43341 is definitely being planned, but we cannot provide an ETA on when this will be released.

                                    1 2 Previous Next