HFP-AG : rfcomm disconnect followed by connect causes a crash

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PrYa_4592711
Level 1
Level 1
5 replies posted 5 questions asked First reply posted

Hello,

I am using the WICED SDK 6.4 for 20706 and built HFP audio gateway from demo hci_audio_gateway.

When testing with HFP devices I find a crash in the firmware (module restarts). This manifests when an earlier wiced_bt_rfcomm_result_t of wiced_bt_port_mgmt_cback_t is what appears like a graceful close (WICED_BT_RFCOMM_CLOSED) by a peer (HF). An immediate re-connection initiated by AG results in a WICED_BT_RFCOMM_START_FAILED and a crash. I was taking some actions to clean up when a port is closed, but the crash occurs even if there is no activity done.

Under these circumstances, where the reconnection was initiated, the alternate notification from wiced_bt_dev_register_connection_status_change() has not yet reported the prior connection was taken down for another 3 seconds. Could the callback wiced_bt_port_mgmt_cback_t be reporting the connection teardown too early?

Thankyou
Praveen

0 Likes
2 Replies
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hi PrYa_4592711 ,

What's the peer device you tried to connect ?

Did you modified the demo example ? If then, can you please share the code?

Can you please let us know the steps to reproduce the issue at our side?

Can you please share the logs if possible ?

Thanks,

Anjana

0 Likes

Hi Anjana,

This failure is observed with multiple headsets. I think it is repeatable against devices that have a hard power off. Airpods (close the charger case with earbuds), Jabra Boost and Jabra Talk25. From our host side software (uart interface to CyBT module, I2S for audio), we are making a reconnect attempt soon after the connection breaks.

* After a connection is Up, power off the peer HFP device. HF_AG realizes the connection is down (RFCOMM_CLOSED). Notifies the host of AG session is now closed. Host software immediately makes an attempt to reconnect to peer and encounters crash (with RFCOMM_START_FAILED).

0 Likes