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.

CC2564C: Connecting multiple devices over HFP profile

Part Number: CC2564C

Hi Team,

Need your expertise for our customer's query. We're aware that CC2564C can connect to 7 devices over BT. My question is do I have to setup an intercom kind of set up? Thinking of it as a local phone system over Bluetooth in a 10m room. I need to connect to different devices to speak one to one.

One possibility we are thinking about is keep connected to all the devices over BT (with HFP profile), and make the eSCO channel (Audio) only to the device we want (like dialling a call) Would this be possible?

If that is not possible. Can you help us on possible solutions to achieve the above case?

Just for background info, we are using CC2564C in Dual mode with BT-BLE support with Bluetopia stack for STM32 uC. For audio we are using unassisted-HFP and A2DP modes, and we already have HFP examples working.


Thanks in advance!


Kind Regards,

Jejomar

  • Hello Jejomar,

    Our HFP profile is designed to be used with two devices: one as client and the other as a server. For these 7 devices, will they need to transmit audio simultaneously? I'm not sure HFP would work in this scenario.

    Thanks, 

    Jacob

  • Hi Jacob,

    I am the Customer Jejomar Mentioned.

    There is no need of more than one audio connection to be active at the same time.

    A group of 7 devices and one to one call between any two devices , that is the need

    We have figured one way with switching the connections between devices for making Call.

    Will test this more and get back if I have fiurther Queries on this..

    One doubt regarding the same implementation.

    If I keep the HFP port Registered in the SDP And I have turned off my advertisement.

    in this scenario other Device(who knows my MAC ID) do an SDP port Search for HFP, will that device have the ability to get my portnumber?.

    As Simple will SDP work if Advertising is turned off? 

    Thanks!

  • Hi Vishnuprasad,

    Are you referring to advertisements for BT connection? If you previously have a connection to the phone, other devices should be able to remember the BT address and connect back. 

    Is this what you mean?

    Thanks,

    Jacob

  • Hi Jacob,

    Yes,I agree that the other device will remeber the BT address.

    But the chellenge we trying  to address is port number of the device.

    If I have to connect back to a device. I should know the  Mac Address of the device and HFP port number available on that device.

    For that, we will have to do the SDP search for the device HFP Service and SDP will give us the available port number. 

    We will have to use those port number to make the HFP connection, right ?

    That port number may vary after disconnection, connection & powercycles.

    Regards,

  • Hi Vishnuprasad,

    Yes, the MAC address changes, but the HFP port number is actually static as seen in HFPDemo_HF.c:

    #define HFP_SERVER_PORT                             (1)  /* Denotes the number*/
                                                             /* of the Server Port*/
                                                             /* that will be used */
                                                             /* by the SPP to open*/
                                                             /* the RFCOMM port.  */
    

    As you can see above, the port defaults to 1.

    Thanks,
    Jacob 

  • Hi Jacob, 

    Yes, in the HF example code it is like that. I agree.

    But as a product we may have to connect with different devices. Let's say, to some normal headset. 

    And it is not mandatory they will also use the port number 1. According to the  implementation port number may change.

    I can open port number 3 , 4 etc whatever I want as HF. This is the case we will face trouble to connect to other Bluetooth headsets.

    And if I am trying to connect back, I know the MACID, the unknown is PortID.

    Regards,

  • Hi Vishnuprasad,

    I don't think I understand your question. Yes, it is true that the device does not have to use the port number of 1. As long as you know the port number of the device before connecting, you can specify the port number in the code.

    Is your question: how do I know the port number of the device before connecting?

    Thanks,
    Jacob

  • Yes, 

    You can assume that, I know the MACID of the devices which I need to connect. The unknown for me is the HFP port number. 

    Is there anyway I can get the Portnumber of  the other device? (assume that device is not in Advertising mode. But port is registered in SDP)

    Regards,

  • Hey Vishnuprasad,

    Take a look at this thread: https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/752429/cc2564-unassisted-hfp-autoconnection 

    This is possible with an SDP query to get the client port ID.

    Thanks,

    Jacob

  • Hi Jacob, 

    Thanks for the Link. 

    Yes this is a similar case what we want. 

    One doubt need to be get cleared is, let's say(I am referring to the forum post you shared),

    the other device (phone ) has registered the SDP, but the phone is not in Advertising mode. In this case, will the device doing SDP search (our device ) will be able to get the SDP data of phone?

    Is it mandatory that phone should be in advertising mode for a successful SDP search?.

    Regards,

    Vishnuprasad V

  • Hello Vishnuprasad,

    Let me check on this and I'll get back to you tomorrow.

    Thanks,
    Jacob

  • Hi Vishnuprasad,

    Sorry for the delay. Advertising is not needed for an SDP query. However, advertising is required for pairing, which you will need to do first.

    To pair, you need to initiate a BT connection with a given address (usually with an inquiry). After a successful connection, you will call an SDP query to find the port number for HFP. Advertising mode is more relevant for the initial pairing of the device, but is not needed for SDP.

    Thank you,
    Jacob 

  • Hi Jacob, 

    Thanks for the Reply.

    This is what I wanted to know.

    One extra query related to this. 

    What all mode it should enabled on the other side to get a successful SDP Result, like connectbility, Pairability, etc.  Is any os such need to be enabled on other side (let's say phone side [in our implementation it will be our own device])?

    Thanks !

  • Hi Vishnuprasad,

    I'll refer you to the CC256x Demo Application's Guide. Here, you can see examples of SDP calls. Does the Service Discovery function address what you need?

    For the OS side, you can use the BluetopiaPM for a Linux based device, or one of our MCU SDK's for supported MCU's.

    Thanks,
    Jacob

  • Hi Jacob,

    Ok , Will go through  this reference in detail for the solution. We already have the HFP implementation  Let me  go through the details clearly. 

    Thanks 

    Vishnuprasad V