OK I see two different behaviors in your traces.
- When connected to the 60:45… (I assume it’s your android phone), we firstly receive a eSCO connection error due to unsupported SCO AIR format, it looks like controller does not support mSBC (0x02) coding format, eSCO connection is rejected. Then device (60:45…) changes the codec to CVSD (0x01) and retries a connection with the new codec parameter, this time connection is accepted.
- In iPhone case (40:9C), the first connection fails in the same way but the iPhone retries to connect with the same codec (mSBC) which makes the second attempt fail as well.
Note that mSBC is an optional codec which is linked to Wide Band Speech support, Wilink 8 supports WBS but this requests additional configuration on controller (HCI vendor commands) and host (I2S config) side.
The HFP specification says:
If wide band speech is supported, and the Initiator fails to establish an eSCO transport with the T1 settings (mSBC on eSCO link), the Initiator shall attempt to setup a Codec connection using the narrow band CVSD codec over eSCO.
So this make me feel that iPhone BT stack has a wrong behavior here.
Actually both devices firstly try to connect with mSBC codec because our stack reports it has supported:
I suppose reporting only CVSD (1) as supported codec should fix the issue. This is probably configurable in the Android fluoride BT stack. I suggest to modify bta_hf_client_send_at_bac function in system/bt/hf_client/bta_hf_client_at.cc which unconditionally returns mSBC as supported:
- buf = “AT+BAC=1,2\r”;
+ buf = “AT+BAC=1\r”;
Let me know…