I am developing an application that requires the use of both the Hands Free Profile and Bluetooth Low Energy GATT server simultaneously. Currently, we are able to connect our product, which includes a CC256x chip, with both HFP and BLE to the same smartphone at the same time. However, the HFP and BLE connections are unstable when operating at the same time, and either will consistently drop within 2-3 minutes after both connections are established and while audio is continuously streamed. Most often, it is the BLE connection that drops first. I have experimented with the Slave Latency setting for BLE (also configurable using DEVM_Set_And_Update_Connection_And_Scan_Parameters), and while it does help a bit, it by no means prevents BLE connection drops entirely (even when the devices are several inches apart). The Bluetopia HFP and BLE disconnected event callbacks do not provide me with details as to why the connections were dropped, so I do not know for certain the reason why.
Here are some details about our setup that may be useful for you:
- We are streaming the audio data to the CC256x chip using PCM at 8 ksps. Each sample is 16 bits, and we are using both the input and output data from a single channel (i.e. a bidirectional monaural stream).
- We are using the CVSD codec for the HFP stream. The CC256x chip is handling the encoding and decoding of the CVSD data, which I believe is done on the CC256x coprocessor unit. Unless I'm mistaken, I think the BLE GATT transactions are also handled by the coprocessor.
- We are using encrypted BLE transmissions (i.e. only paired devices may read/write the GATT characteristics). Would this feature be adding additional strain to the CC256x coprocessor?
Is It possible to improve the dual-mode connection stability with HFP + BLE?
I suspect the CC256x's coprocessor might be overtaxed when in HFP + BLE mode. Is there a way we can reduce its load or increase its performance? Several possibilities that I would like some advice about are: increasing the coprocessor's clock rate, decreasing the CVSD bits-per-sample to reduce computational complexity, offloading the HFP CVSD processing to an external DSP (could we still use PCM to transmit the unprocessed CVSD data to the DSP, or do we have to use the Bluetooth HCI UART connection for this?).
Any advice or direction you could provide to address these issues would be greatly appreciated.
Thanks.