I am developing a Bluetooth microphone device based on the SF32LB52. The current project is mainly modified from the SDK example/bt/hfp example. The goal is to have the device act as HFP HF to connect to a Windows PC. The device collects local microphone audio and uplinks it to the computer via HFP SCO/eSCO, serving as the Windows microphone input. I also directly flashed and tested the official example/bt/hfp_relay example. When connecting to a phone, it completes RFCOMM, HFP AT negotiation, and SCO audio connection, but when connecting to Windows, only ACL is established, after which no HFP RFCOMM connection callback appears, and it disconnects after about 20-30 seconds.
The goal is not to play computer audio, but:
Local microphone of the device
↓
Device as HFP HF
↓
SCO/eSCO audio uplink
↓
Windows PC as HFP AG
↓
Windows microphone input
After the device captures local microphone audio, it is desired to send it to Windows via classic Bluetooth HFP for use by Tencent Meeting, recording software, or other calling software.
Current device configuration:
CONFIG_CFG_HFP_HF=y
Previously also tested with both enabled:
CONFIG_CFG_HFP_HF=y
CONFIG_CFG_HFP_AG=y
But the current goal only needs:
Computer: HFP AG
Device: HFP HF
When a phone connects to the device, it works normally. The log shows the complete flow:
ACL connection successful
RFCOMM connection successful
BTS2MU_HF_CONN_CFM state 2 res:0
HFP AT negotiation successful
HFP HF connected
SCO connection successful
BTS2MU_HF_CONN_CFM state 3 res:0
But when Windows connects to the device, the Windows properties show:
Hands-Free HF
Device status: This device is working properly
However, when Windows connects, the device log actually only shows:
ACL connection request
ACL connection complete
Pair with device
Encryption status updated
After about 20-30 seconds:
l2c_ch_fn_disconn_req
link dis-connected
The following are not seen:
hfp_hf_gap_conn_cfm_hdl
BTS2MU_HF_CONN_CFM state 2 res:0
HFP AT command
SCO connected
It disconnects after about 20-30 seconds.
I also tried:
hfp_cmd hfp_connect <PC_MAC>
The command is parsed, but still no HFP RFCOMM is established, and it does not enter SCO either.
Now I want to know whether the SF32LB52 supports connecting as HFP HF to the HFP AG of a Windows PC.
Chip: SF32LB52
Development board: sf32lb52-lcd_n16r8
Windows version: win10








