Problem Statement: All bi-directional Audio passthrough from device to controller

I’m working on a project that requires bi-directional audio transfer between a mobile device (iOS or Android) and a controller running Ubuntu 20.04 or macOS. I’ve explored two potential solutions but encountered issues with both: 1. Using oFono on Linux to Act as an HFP-AG: I attempted to use oFono to make the controller function as a Hands-Free Profile Audio Gateway (HFP-AG). However, I’ve found this approach to be unstable. Most of the time, the system automatically selects the A2DP profile, and I’m unable to manually choose the HFP-AG profile. 2. Bluetooth Device Connected via USB (UAC-Class) with HFP/HSP Profile: In this approach, the Bluetooth device is connected to the controller via USB audio, with the HFP/HSP profile connected to the mobile device. The idea is to route the incoming audio stream through USB audio and vice versa. I managed to implement the USB audio part successfully, but I’m stuck at creating the SCO link for the Bluetooth profile. Although the HFP profile is identified, establishing the SCO link is where I’m blocked. I’m seeking insights or alternative solutions to achieve stable bi-directional audio transfer. I’m open to exploring other technologies or approaches as long as it solves the problem statement
4 Replies
techielew
techielew5w ago
@abhishek awasthi @Ming @32bitSaviour @Marvee Amasi @Enthernet Code any of you guys have suggestions?
32bitSaviour
32bitSaviour5w ago
Hey @melta101 how exactly are you blocked on establishing the link?
Ming
Ming5w ago
I found an example of bi-directional audio over BLE here: https://github.com/TexasInstruments/ble_examples/tree/simplelink_cc26x2_sdk-2.30 It's a TI example code - but may give you some hints for your case.
GitHub
GitHub - TexasInstruments/ble_examples at simplelink_cc26x2_sdk-2.30
Additional examples to compliment TI's Bluetooth Low Energy Stack offerings. - GitHub - TexasInstruments/ble_examples at simplelink_cc26x2_sdk-2.30
melta101
melta1015w ago
I’m relatively new to Bluetooth Audio development and could use some guidance on creating the SCO link. i was successfully able to have HSP control channel implemented with all AT commands functional, but ... For starters. - How do we establish this link? - Are there any comprehensive guides or resources available for Bluetooth audio development that could be useful for someone new to the field? - which bluetooth stack/ecosystem is prefered for this? - i have tried using esp-idf (hfp sample) but it used to crash post connection when we try to play on the phone. so what kind resources should we keep in mind for it. - i dont want to worry much on the codec side, simple SBC works for me Thanks! Thanks for Sharing this resource. i have gone through it and Ti-BLE docs but havnt found anything about HFP/HSP. The sample does shows, bi-directional audio, but the way it is implemented is very custom, as the SCO goes over an external audio codec, and not an internal one like SBC/aptx etc
Want results from more Discord servers?
Add your server