mutiple sco connections transfer

20 views
Skip to first unread message

Daniel Su

unread,
Aug 7, 2025, 6:45:06 AMAug 7
to btsta...@googlegroups.com, Daniel Su
Hi Sir;

    We are testing btstack(1.6.2) with two sco links. One of them(SCO_A) connects to mobilephone acting as handsfree and the other(SCO_B) connects to headset acting as handsfree gateway. We want forwarding audio data between the two SCOs(or eSCOs).  Receiving SCO audio data seems no issue. For transfer , we found that the hci_request_sco_can_send_now_event() call does not distinguish sco handles.  So when HCI_EVENT_SCO_CAN_SEND_NOW events received, we just do alternate transmission between SCO_A and B. 
    when mobilephone call comes in, I can hear in-band ring on headset side for a while, then btstack panic becasue of memory issue.  I just wonder if this is the issue talked above or others like porting issue?

Matthias Ringwald

unread,
Aug 9, 2025, 3:37:13 AMAug 9
to btsta...@googlegroups.com
Hi Daniel

It's correct that hci_request_sco_can_send_now_event does not distinguish SCO handles. Please send SCO packets in a round robin (A B A B ..) fashion, as you've already tried.

There shouldn't be any memory issues. Please update to the develop branch (for better comparison of line numbers etc) and check what's going wrong. 
A good use is to use log_info as these messages are included in the HCI dump. Please also provide a HCI dump for any issues.

Back to the general topic: man-in-the-middle for SCO. In general, this should work fine with any Bluetooth Controller if your device is in master role to both devices (smartphone + headset) as the master schedules the communication.
Unfortunately for this setup, most smartphones want/need to stay in master role, which results in your device becoming  slave to smartphone and master to headset. Often, glitches appear as SCO time slots for both roles overlap.
One customer reported good results with Infineon's CYW20706, but I haven't tested that. In our experiments, there always haven audio glitches. Because of this, we generally recommend to use two Bluetooth Controllers for such a setup.

Best regards,
Matthias


On 7 Aug 2025, at 12:45, Daniel Su <sueshe...@gmail.com> wrote:


Hi Sir;

    We are testing btstack(1.6.2) with two sco links. One of them(SCO_A) connects to mobilephone acting as handsfree and the other(SCO_B) connects to headset acting as handsfree gateway. We want forwarding audio data between the two SCOs(or eSCOs).  Receiving SCO audio data seems no issue. For transfer , we found that the hci_request_sco_can_send_now_event() call does not distinguish sco handles.  So when HCI_EVENT_SCO_CAN_SEND_NOW events received, we just do alternate transmission between SCO_A and B. 
    when mobilephone call comes in, I can hear in-band ring on headset side for a while, then btstack panic becasue of memory issue.  I just wonder if this is the issue talked above or others like porting issue?

--
You received this message because you are subscribed to the Google Groups "btstack-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to btstack-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/btstack-dev/CA%2ByU7WYZRfV1u0vRNzwO35x7pQpnU%3D4_9ZuzwiP1cqz7QL27gw%40mail.gmail.com.

Daniel Su

unread,
Aug 11, 2025, 9:30:46 AMAug 11
to btsta...@googlegroups.com
Hi  Matthias;
      Thanks for the information. We will do more debugging for investigation.

Best regards,
Daniel

Matthias Ringwald <matthias...@gmail.com> 于2025年8月9日周六 15:37写道:
Reply all
Reply to author
Forward
0 new messages