Closed amorniroli closed 4 months ago
You're definitely right about the problem of tracking the call state of multiple mobile phones in a single variable. On a first glance, moving these into the per connection state might already be sufficient. We'll give it a try next week.
Hi @amorniroli Could you try our changes on develop. We merely moved the globals into the per connection struct and initialized them on connect. Please let me know how this works for two phones, thanks!
Hi @amorniroli Could you try our changes on develop. We merely moved the globals into the per connection struct and initialized them on connect. Please let me know how this works for two phones, thanks!
Hi @mringwal , thanks for the fix: it's working as expected.
Great. Thanks for validating the fix.
Describe the bug
Inside hfp_hf.c I've noticed these three variables which are declared as "singleton".
Some BT stack events (e.g. HFP_SUBEVENT_START_RINGING) are not triggered if, for example, we have two mobile phones connected to the controller, and 1 call is already ringing.
To Reproduce
If needed, I'll provide example in the form of 'btstack_main' to reproduce the issue.
As pseudo code:
Expected behavior I'd expect that both START_RINGING would have been routed correctly.
HCI Packet Logs I can produce it if needed.
Environment: (please complete the following information):
Additional context I think the problem is that the check is done on "singleton" variable and not real HFP context status
e.g.