I’m implementing feature which requires 2 simultaneous HFP connections and I have encountered problem with ROUTE cmd
I have been testing Melody 6.1.5 and it seems that BC127 returns ERROR 0x0013 for ROUTE 13 (=hfp link) if link status is not active. In order to guarantee which audio link is used I should always be able to use ROUTE cmd for HFP link. For example typically there is hearable audio when HFP is OUTGOING or INCOMING and if Siri / Google now is used then SCO can be open also in IDLE state.
Is there currently any way to force audio routing for HFP link if link is not in active state? If not, could you update Melody firmware so that it would accept ROUTE commands in all HFP states?
So you mean you want to be able to set the route if the unit has had its link lost as per your other ticket where there is a link identifier available? That will be very difficult to do as link identifiers are assigned dynamically and not statically.
Again you need to push this back through your distributor.
I would like to set force audio route for HFP when link is IDLE, INCOMING, OUTGOING or ACTIVE. If link is in link loss then there is no need to force audio path to that link.
Here is log from Melody 6.1.5 showing results for route cmd, it seems that ROUTE works when HFP is ACTIVE.
status
STATE CONNECTED[1] CONNECTABLE[ON] DISCOVERABLE[OFF] BLE[IDLE]
LINK 13 CONNECTED HFP 20FABB01911D IDLE WB
OK
route 13 -> not able to force audio path when HFP is IDLE
ERROR 0x0013
CALL_OUTGOING HFP 13
SCO_OPEN 13
route 13 -> not able to force audio path when HFP is OUTGOING
ERROR 0x0013
CALL_ACTIVE HFP 13
route 13 -> it's ok to force audio path when HFP is ACTIVE
OK
route 0
OK
SCO_CLOSE 13
CALL_IDLE HFP 13
CALL_INCOMING HFP 13
CALLER_NUMBER 13 1234
route 13 -> not able to force audio path when HFP is INCOMING
ERROR 0x0013
CALLER_NUMBER 13 1234
call 13 reject
OK
CALL_IDLE HFP 13
route 0 -> it seems to be always ok to set default routing as expected
OK
I want to have two devices connected to BC127 at the same time with following profiles and when there is active audio stream from both devices I want to select which audio stream to use:
Dev_1. HFP(13), A2DP(10), AVRCP(11)
Dev_2. HFP(23) only
Based on my experience automatic routing works like this when there are multiple audio streams available:
1: Dev_1 is streaming A2DP and Dev_2 opens SCO -> Dev_2 HFP is selected for routing
2: Dev_1 has SCO open and Dev_2 opens SCO -> Dev_1 HFP is still used for routing
3: Dev_2 has SCO open and Dev_1 opens SCO -> Dev_1 HFP is selected for routing
For example if I make a HFP call to Dev_2 and HFP state is OUTGOING while waiting other end to answer, at this point I can’t force Bc127 to keep Dev_2 audio stream and if there is another HFP call coming from Dev_1 it will override Dev_2 HFP audio stream due automatic routing.
Currently when HFP enters ACTIVE state I can use ROUTE cmd, but the problematic cases are IDLE, INCOMING and OUTGOING states.