brb = (struct _BRB_SCO_OPEN_CHANNEL*) &(connection->ConnectDisconnectBrb);
devCtx->ProfileDrvInterface.BthReuseBrb((PBRB)brb, BRB_SCO_OPEN_CHANNEL_RESPONSE);
brb->Hdr.ClientContext[0] = connectionObject;
brb->BtAddress = ConnectParams->BtAddress;
brb->ChannelHandle = ConnectParams->ConnectionHandle;
brb->Response = SCO_CONNECT_RSP_RESPONSE_SUCCESS;
brb->TransmitBandwidth = 8000;
brb->ReceiveBandwidth = 8000; // 64Kb/s
brb->MaxLatency = 0xFFFF;// 50;
brb->PacketType = 0x3F;// SCO_EV3;///**/devCtx->ScoPacketTypes; SCO_HV1 | SCO_HV3
brb->ContentFormat = SCO_VS_IN_CODING_LINEAR | SCO_VS_IN_SAMPLE_SIZE_16BIT | SCO_VS_AIR_CODING_FORMAT_CVSD; // SCO_VS_SETTING_DEFAULT;//SCO_VS_IN_CODING_LINEAR | SCO_VS_IN_SAMPLE_SIZE_16BIT | SCO_VS_AIR_CODING_FORMAT_CVSD;
brb->RetransmissionEffort = SCO_RETRANSMISSION_MIN1_QUALITY;// SCO_RETRANSMISSION_MIN1_POWER;
brb->ChannelFlags = SCO_CF_LINK_SUPPRESS_PIN;
brb->CallbackFlags = CALLBACK_DISCONNECT;
brb->Callback = &HpSrvIndicationCallback;
brb->CallbackContext = connectionObject;
brb->ReferenceObject = (void*) WdfDeviceWdmGetDeviceObject(devCtx->Device);
status = SendBrbAsync(devCtx->IoTarget, connection->ConnectDisconnectRequest, (PBRB)brb, sizeof(*brb), RemoteConnectCompletion, brb);
if (!NT_SUCCESS(status))
TraceEvents(TRACE_LEVEL_ERROR, DBG_CONNECT, "SendBrbAsync failed, Status = %X", status);
The above code can be connected normally before win11 Bluetooth 5.3, but in win11 Bluetooth 5.3 version brb->PacketType and brb->ContentFormat, no matter how you set the return value of status, the return value is always 0xC00000BB(STATUS_NOT_SUPPORTED)
Initialization uses BRB_SCO_GET_SYSTEM_INFO to obtain SCO information, and the result is:
BRB_SCO_GET_SYSTEM_INFO:
Features = 3
MaxChannels = 2
TransferUnit = 0
PacketTypes = 3F
DataFormats = F
From the results, SCO is supported???but why does the SCO connection above always return STATUS_NOT_SUPPORTED?