This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/CC2564: how can I establish a connection with APP of mobile phone by modifying the program of CC2564B terminal?

Part Number: CC2564

Tool/software: TI C/C++ Compiler

Hi!

       I use the TI SPPdemo of CC2564B,Now I set the CC2564B terminal as the client and use the command SetPairability Mode 2 (Attempts to set the Pairability Mode of the Local Device to Secure Simple Pairing)。

      First,At the "Client>" prompt, enter Inquiry. This will initiate the Inquiry process. Once it is complete,I will get a list of all discovered devices.and then  find the index number of the device I need to connect to, and pass Issue a Open <index number> <server port number> command at the command prompt。

     After SPP is opened, the CC2564B terminal will send a pairing command to the mobile phone (Android platform). After clicking on the pairing, it can pair with the mobile phone. Next, we need to connect with the mobile phone. 


     App (Blueterm) has been installed on the mobile phone. At present, CC2564B terminal is set in client mode. The Bluetooth on the mobile phone has been successfully paired. But CC2564B terminal can not establish a connection with APP. Do I need MCU to send a command to CC2564B terminal to establish a connection with APP on the mobile phone through Bluetooth? How to operate on mobile app instead?

     My problem is that CC2564B terminals are configured in client mode.After the Bluetooth of CC2564B terminal and mobile phone is paired well, how can I establish a connection with APP of mobile phone by modifying the program of CC2564B terminal?

Thanks for your help!

  • Is this continuation of the query ?
    e2e.ti.com/.../771737

    I will check with Blueterm installed on my android device and get back..

    Thanks
  • Hi.  

    How will I do it? At present, CC2564B terminal has been paired with client mode as shown above, but the APP on mobile phone is not connected with the CC2564B terminal. At present, we do not know how to establish the connection between CC2564B terminal and mobile phone APP?

    thanks your help.

  •  Hi,

    I tried the SPP demo with Blueterm and it worked fine.. I am using the MSP432+cc2564B setup with SPPdemo in server mode. I got the Blueterm installed on Android phone. First pair to the CC2564B from 'Settings/Bluetooth' and then from Blueterm application connect to the device. After this you can exchange data on the SPP port.

    Choose Mode>server

    ******************************************************************

    * Command Options: Inquiry, DisplayInquiryList, Pair,            *

    *                  EndPairing, PINCodeResponse, PassKeyResponse, *

    *                  UserConfirmationResponse,                     *

    *                  SetDiscoverabilityMode, SetConnectabilityMode,*

    *                  SetPairabilityMode,                           *

    *                  ChangeSimplePairingParameters,                *

    *                  GetLocalAddress, GetLocalName, SetLocalName,  *

    *                  GetClassOfDevice, SetClassOfDevice,           *

    *                  GetRemoteName, SniffMode, ExitSniffMode,      *

    *                  Open, Close, Read, Write,                     *

    *                  GetConfigParams, SetConfigParams,             *

    *                  GetQueueParams, SetQueueParams,               *

    *                  Loopback, DisplayRawModeData,                 *

    *                  AutomaticReadMode, SetBaudRate, Send          *

    *                  SdpQuerry          *

    *                  Help, Quit                                    *

    ******************************************************************

    Server>open 1

    Server Opened: 1.

    Server>

    atPINCodeRequest: 0xE89120143FDC

    Respond with: PINCodeResponse

    Server>PINCodeResponse 0000

    GAP_Authentication_Response(), Pin Code Response Success.

    Server>

    atLinkKeyCreation: 0xE89120143FDC

    Link Key Stored.

    Server>

    atLinkKeyRequest: 0xE89120143FDC

    GAP_Authentication_Response success.

    Server>

    SPP Open Indication, ID: 0x0001, Board: 0xE89120143FDC.

    Server>

    SPP Port Status Indication: 0x0001, Status: 0x000B, Break Status: 0x0000, Length: 0x0000.

    Server>

    SPP Data Indication, ID: 0x0001, Length: 0x0001.

    Server>

    SPP Data Indication, ID: 0x0001, Length: 0x0001.

    Server>read

    Read: 2.

    Message: we

    Read: 0.

    Server>

    HCI Mode Change Event, Status: 0x00, Connection Handle: 1, Mode: Sniff, Interval: 800

    Server>write

    Wrote: 22.

    Server>write

    Wrote: 22.

    Server>

    HCI Mode Change Event, Status: 0x00, Connection Handle: 1, Mode: Active, Interval: 0

    Server>

    SPP Close Port, ID: 0x0001

    Server>

  • Hi  Hari Nagalla:

          Your answer is that STM32F4+CC2564B terminal is used as server mode, which I have implemented。However, I set STM32F4 + CC2564B terminal as client mode. STM32F4 + CC2564B terminal has been paired with mobile phone in client mode. The whole process is shown in the following figure.

    but the APP on mobile phone is not connected with the STM32F4+CC2564B terminal. At present, we do not know how to establish the connection between STM32F4+CC2564B terminal and mobile phone APP?

    thanks your help.

  • Do, you mean it works for you when CC2564B is in server mode? but fails only in client mode?

    Please, check below thread, you may need to read the SDP descriptions from the server to get the RFCOM port for SPP to open the correct port:

    e2e.ti.com/.../2658746

    Thanks