shared/hfp: Add simple 3way calls support
PATCH 1/2 shared/hfp: Add simple 3way calls support
This adds support for the AT+CHLD=0 (Releases all held calls or set User Determined User Busy for a waiting call), =1 (Releases all active calls and accept the other call, held or waiting) and =2 (Places all active calls on hold and accept the other call, held or waiting) commands and the +CCWA (Call waiting notification) event.
--- src/shared/hfp.c | 218 ++++++++++++++++++++++++++++++++++++++++++++++- src/shared/hfp.h | 15 ++++ unit/test-hfp.c | 5 ++ 3 files changed, 234 insertions(+), 4 deletions(-)
src/shared/hfp.c +214 -4
@@ -32,6 +32,7 @@#define HFP_HF_FEATURES ( \ HFP_HF_FEAT_ECNR | \ + HFP_HF_FEAT_3WAY | \ HFP_HF_FEAT_CLIP | \ HFP_HF_FEAT_ENHANCED_CALL_STATUS | \ HFP_HF_FEAT_ESCO_S4_T2 \
@@ -105,6 +106,7 @@ struct hfp_hf {uint8_t signal;bool roaming;uint8_t battchg; +uint8_t chlds;bool session;bool clcc_in_progress;
@@ -396,6 +398,12 @@ bool hfp_context_close_container(struct hfp_context *context)return true; } +bool hfp_context_is_container_close (struct hfp_context *context) +{ +return context->data[context->offset] ==')' ; +} + +bool hfp_context_get_string (struct hfp_context *context,char *buf,uint8_t len) {
@@ -1852,6 +1860,20 @@ static bool call_active_match(const void *data, const void *match_data)return (call->status ==CALL_STATUS_ACTIVE ); } +static bool call_waiting_match (const void *data,const void *match_data) +{ +const struct hf_call *call = data; + +return (call->status ==CALL_STATUS_WAITING ); +} + +static bool call_held_match (const void *data,const void *match_data) +{ +const struct hf_call *call = data; + +return (call->status ==CALL_STATUS_HELD ); +} +static void bsir_cb (struct hfp_context *context,void *user_data) {struct hfp_hf *hfp = user_data;
@@ -1866,6 +1888,43 @@ static void bsir_cb(struct hfp_context *context, void *user_data) hfp->callbacks->update_inband_ring (!!val, hfp->callbacks_data); } +static void ccwa_cb (struct hfp_context *context,void *user_data) +{ +struct hfp_hf *hfp = user_data; +char number[255 ]; +unsigned int type; +struct hf_call *call; +uint id; + +DBG (hfp,"" ); + +if (hfp->features &HFP_AG_FEAT_ENHANCED_CALL_STATUS ) { +send_clcc (hfp); +return ; + } + +if (!hfp_context_get_string (context, number,sizeof (number))) { +DBG (hfp,"hf: Could not get string" ); +return ; + } + +if (!hfp_context_get_number (context, &type)) +return ; + + call =queue_find (hfp->calls, call_waiting_match,NULL ); +if (call) { +DBG (hfp,"hf: waiting call already in progress" ); +return ; + } + + id =next_call_index (hfp); +if (id ==0 ) { +DBG (hfp,"hf: No new call index available" ); +return ; + } +call_new (hfp, id,CALL_STATUS_WAITING , number, type, false); +} +static void ciev_callsetup_cb (uint8_t val,void *user_data) {struct hfp_hf *hfp = user_data;
@@ -2240,7 +2299,7 @@ failed: hfp->callbacks_data); } -static void clip_resp (enum hfp_result result,enum hfp_error cme_err, +static void ccwa_resp (enum hfp_result result,enum hfp_error cme_err,void *user_data) {struct hfp_hf *hfp = user_data;
@@ -2248,7 +2307,7 @@ static void clip_resp(enum hfp_result result, enum hfp_error cme_err,DBG (hfp,"" );if (result !=HFP_RESULT_OK ) { -DBG (hfp,"hf: CLIP error: %d" , result); +DBG (hfp,"hf: CCWA error: %d" , result); goto failed; }
@@ -2272,6 +2331,39 @@ failed: hfp->callbacks_data); } +static void clip_resp (enum hfp_result result,enum hfp_error cme_err, +void *user_data) +{ +struct hfp_hf *hfp = user_data; + +DBG (hfp,"" ); + +if (result !=HFP_RESULT_OK ) { +DBG (hfp,"hf: CLIP error: %d" , result); + goto failed; + } + +if (!(hfp->features &HFP_AG_FEAT_3WAY )) { +/* Jump to next setup state */ +ccwa_resp (HFP_RESULT_OK , cme_err, user_data); +return ; + } + +if (!hfp_hf_send_command (hfp, ccwa_resp, hfp, +"AT+CCWA=1" )) { +DBG (hfp,"hf: Could not send AT+CCWA=1" ); + result =HFP_RESULT_ERROR ; + goto failed; + } + +return ; + +failed: +if (hfp->callbacks->session_ready) + hfp->callbacks->session_ready (result, cme_err, + hfp->callbacks_data); +} +static void cops_resp (enum hfp_result result,enum hfp_error cme_err,void *user_data) {
@@ -2328,15 +2420,56 @@ failed: hfp->callbacks_data); } -static void slc_cmer_resp (enum hfp_result result,enum hfp_error cme_err, +static void slc_chld_cb (struct hfp_context *context,void *user_data) +{ +struct hfp_hf *hfp = user_data; + +if (!hfp_context_open_container (context)) { +DBG (hfp,"hf: Could not open container for CHLD" ); +return ; + } + +while (hfp_context_has_next (context) && + !hfp_context_is_container_close (context)) { +char val[3 ]; + +if (!hfp_context_get_unquoted_string (context, val, +sizeof (val))) { +DBG (hfp,"hf: Could not get string" ); + goto failed; + } + +if (strcmp (val,"0" ) ==0 ) + hfp->chlds |=HFP_CHLD_0 ; +else if (strcmp (val,"1" ) ==0 ) + hfp->chlds |=HFP_CHLD_1 ; +else if (strcmp (val,"2" ) ==0 ) + hfp->chlds |=HFP_CHLD_2 ; +else +DBG (hfp,"CHLD not supported: %s" , val); + } + +if (!hfp_context_close_container (context)) { +DBG (hfp,"hf: Could not close container" ); + goto failed; + } + +return ; +failed: +DBG (hfp,"hf: Error on CHLD response" ); +} + +static void slc_chld_resp (enum hfp_result result,enum hfp_error cme_err,void *user_data) {struct hfp_hf *hfp = user_data;DBG (hfp,"" ); +hfp_hf_unregister (hfp,"+CHLD" ); +if (result !=HFP_RESULT_OK ) { -DBG (hfp,"hf: CMER error: %d" , result); +DBG (hfp,"hf: CHLD=? error: %d" , result); goto failed; }
@@ -2351,6 +2484,8 @@ static void slc_cmer_resp(enum hfp_result result, enum hfp_error cme_err,/* Register unsolicited results handlers */ if (hfp->features &HFP_AG_FEAT_IN_BAND_RING_TONE )hfp_hf_register (hfp, bsir_cb,"+BSIR" , hfp,NULL ); +if (hfp->features &HFP_AG_FEAT_3WAY ) +hfp_hf_register (hfp, ccwa_cb,"+CCWA" , hfp,NULL );hfp_hf_register (hfp, ciev_cb,"+CIEV" , hfp,NULL );hfp_hf_register (hfp, clcc_cb,"+CLCC" , hfp,NULL );hfp_hf_register (hfp, clip_cb,"+CLIP" , hfp,NULL );
@@ -2364,6 +2499,44 @@ failed: hfp->callbacks_data); } +static void slc_cmer_resp (enum hfp_result result,enum hfp_error cme_err, +void *user_data) +{ +struct hfp_hf *hfp = user_data; + +DBG (hfp,"" ); + +if (result !=HFP_RESULT_OK ) { +DBG (hfp,"hf: CMER error: %d" , result); + goto failed; + } + +if (!(hfp->features &HFP_AG_FEAT_3WAY )) { +/* Jump to next setup state */ +slc_chld_resp (HFP_RESULT_OK , cme_err, user_data); +return ; + } + +if (!hfp_hf_register (hfp, slc_chld_cb,"+CHLD" , hfp,NULL )) { +DBG (hfp,"hf: Could not register +CHLD" ); + result =HFP_RESULT_ERROR ; + goto failed; + } + +if (!hfp_hf_send_command (hfp, slc_chld_resp, hfp,"AT+CHLD=?" )) { +DBG (hfp,"hf: Could not send AT+CHLD=?" ); + result =HFP_RESULT_ERROR ; + goto failed; + } + +return ; + +failed: +if (hfp->callbacks->session_ready) + hfp->callbacks->session_ready (result, cme_err, + hfp->callbacks_data); +} +static void slc_cind_status_cb (struct hfp_context *context,void *user_data) {
@@ -2745,6 +2918,38 @@ bool hfp_hf_dial(struct hfp_hf *hfp, const char *number,return hfp_hf_send_command (hfp, resp_cb, user_data,"ATD%s;" , number); } +bool hfp_hf_release_and_accept (struct hfp_hf *hfp, +hfp_response_func_t resp_cb, +void *user_data) +{ +if (!hfp) +return false; + +DBG (hfp,"" ); + +if (!(hfp->chlds &HFP_CHLD_1 ) || + (!queue_find (hfp->calls, call_waiting_match,NULL ) && + !queue_find (hfp->calls, call_held_match,NULL ))) +return false; + +return hfp_hf_send_command (hfp, resp_cb, user_data,"AT+CHLD=1" ); +} + +bool hfp_hf_swap_calls (struct hfp_hf *hfp, +hfp_response_func_t resp_cb, +void *user_data) +{ +if (!hfp) +return false; + +DBG (hfp,"" ); + +if (!(hfp->chlds &HFP_CHLD_2 )) +return false; + +return hfp_hf_send_command (hfp, resp_cb, user_data,"AT+CHLD=2" ); +} +bool hfp_hf_call_answer (struct hfp_hf *hfp,uint id,hfp_response_func_t resp_cb,void *user_data)
@@ -2791,6 +2996,11 @@ bool hfp_hf_call_hangup(struct hfp_hf *hfp, uint id,if (call_setup_match (call,NULL ) ||call_active_match (call,NULL )) {return hfp_hf_send_command (hfp, resp_cb, user_data,"AT+CHUP" ); + }else if ((call_waiting_match (call,NULL ) || +call_held_match (call,NULL )) && + (hfp->chlds &HFP_CHLD_0 )) { +return hfp_hf_send_command (hfp, resp_cb, user_data, +"AT+CHLD=0" ); }return false;
src/shared/hfp.h +15 -0
@@ -38,6 +38,14 @@#define HFP_AG_FEAT_ENHANCED_VOICE_RECOGNITION_STATUS 0x00001000#define HFP_AG_FEAT_VOICE_RECOGNITION_TEXT 0x00002000 +#define HFP_CHLD_0 1 << 0 +#define HFP_CHLD_1 1 << 1 +#define HFP_CHLD_2 1 << 2 +#define HFP_CHLD_3 1 << 3 +#define HFP_CHLD_4 1 << 4 +#define HFP_CHLD_1x 1 << 5 +#define HFP_CHLD_2x 1 << 6 +enum hfp_result {HFP_RESULT_OK =0 ,HFP_RESULT_CONNECT =1 ,
@@ -177,6 +185,7 @@ bool hfp_context_get_number_default(struct hfp_context *context, unsigned int default_val);bool hfp_context_open_container (struct hfp_context *context);bool hfp_context_close_container (struct hfp_context *context); +bool hfp_context_is_container_close (struct hfp_context *context);bool hfp_context_get_string (struct hfp_context *context,char *buf,uint8_t len); bool hfp_context_get_unquoted_string(struct hfp_context *context,
@@ -242,6 +251,12 @@ const char *hfp_hf_call_get_number(struct hfp_hf *hfp, uint id);bool hfp_hf_dial (struct hfp_hf *hfp,const char *number,hfp_response_func_t resp_cb,void *user_data); +bool hfp_hf_release_and_accept (struct hfp_hf *hfp, +hfp_response_func_t resp_cb, +void *user_data); +bool hfp_hf_swap_calls (struct hfp_hf *hfp, +hfp_response_func_t resp_cb, +void *user_data);bool hfp_hf_call_answer (struct hfp_hf *hfp,uint id,hfp_response_func_t resp_cb,void *user_data);
unit/test-hfp.c +5 -0
@@ -758,12 +758,17 @@ static void test_hf_robustness(gconstpointer data) ',', '5', '\r', '\n'), \frg_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \ +raw_pdu ('\r' ,'\n' ,'+' ,'C' ,'H' ,'L' ,'D' ,':' ,'(' ,'0' , \ +',' ,'1' ,',' ,'1' ,'x' ,',' ,'2' ,',' ,'2' ,'x' , \ +',' ,'3' ,',' ,'4' ,')' ,'\r' ,'\n' ), \ +frg_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \raw_pdu ('\r' ,'\n' ,'+' ,'C' ,'O' ,'P' ,'S' ,':' ,' ' ,'0' ,',' , \'0' ,',' ,'\"' ,'T' ,'E' ,'S' ,'T' ,'\"' ,'\r' ,'\n' ), \frg_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \ +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), \ raw_pdu('\r', '\n', 'O', 'K', '\r', '\n') static void hf_cmd_complete(enum hfp_result res, enum hfp_error cme_err,
Signature · 1 line
2.43.0
PATCH 2/2 unit/test-hfp: Add tests for simple 3way support
This add the following tests:
- /HFP/HF/TWC/BV-01-C
Verify that the AG indicates to the HF the presence of an incoming call waiting and that the HF sends the User Determined User Busy (UDUB) indication to the AG (AT+CHLD=0).
- /HFP/HF/TWC/BV-02-C
Verify that the AG indicates to the HF the presence of an incoming call waiting, and the HF can end an active call and accept the other (held or waiting) call (AT+CHLD=1).
- /HFP/HF/TWC/BV-03-C
Verify that the AG indicates to the HF the presence of an incoming call waiting, and the HF can place an active call on hold and accept a call waiting (AT+CHLD=2).
--- unit/test-hfp.c | 402 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 401 insertions(+), 1 deletion(-)
unit/test-hfp.c +401 -1
@@ -996,6 +996,95 @@ static void hf_call_added(uint id, enum hfp_call_status status, ret =hfp_hf_call_hangup (context->hfp_hf, id, hf_cmd_complete, context);g_assert (ret); + }else if (g_str_equal (test_name,"/HFP/HF/TWC/BV-01-C" )) { +bool ret; + +switch (context->session.step) { +case 0 : + g_assert_cmpint(id, ==, 1); + g_assert_cmpint(status, ==, CALL_STATUS_INCOMING); +if (tester_use_debug ()) +tester_debug ("call %d: answering call" , id); + ret =hfp_hf_call_answer (context->hfp_hf, id, + hf_cmd_complete, + context); +g_assert (ret); +break ; +case 1 : + g_assert_cmpint(id, ==, 2); + g_assert_cmpint(status, ==, CALL_STATUS_HELD); +if (tester_use_debug ()) +tester_debug ("call %d: ending held call" , id); + ret =hfp_hf_call_hangup (context->hfp_hf, id, + hf_cmd_complete, + context); +g_assert (ret); +break ; +default : +tester_debug ("Unexpected session.step" ); +tester_test_failed (); + } + context->session.step++; + }else if (g_str_equal (test_name,"/HFP/HF/TWC/BV-02-C" )) { +bool ret; + +switch (context->session.step) { +case 0 : + g_assert_cmpint(id, ==, 1); + g_assert_cmpint(status, ==, CALL_STATUS_INCOMING); +if (tester_use_debug ()) +tester_debug ("call %d: answering call" , id); + ret =hfp_hf_call_answer (context->hfp_hf, id, + hf_cmd_complete, + context); +g_assert (ret); +break ; +case 1 : + g_assert_cmpint(id, ==, 2); + g_assert_cmpint(status, ==, CALL_STATUS_HELD); +if (tester_use_debug ()) +tester_debug ("call %d: " +"release and answer calls" , + id); + ret =hfp_hf_release_and_accept (context->hfp_hf, + hf_cmd_complete, + context); +g_assert (ret); +break ; +default : +tester_debug ("Unexpected session.step" ); +tester_test_failed (); + } + context->session.step++; + }else if (g_str_equal (test_name,"/HFP/HF/TWC/BV-03-C" )) { +bool ret; + +switch (context->session.step) { +case 0 : + g_assert_cmpint(id, ==, 1); + g_assert_cmpint(status, ==, CALL_STATUS_INCOMING); +if (tester_use_debug ()) +tester_debug ("call %d: answering call" , id); + ret =hfp_hf_call_answer (context->hfp_hf, id, + hf_cmd_complete, + context); +g_assert (ret); +break ; +case 2 : + g_assert_cmpint(id, ==, 2); + g_assert_cmpint(status, ==, CALL_STATUS_HELD); +if (tester_use_debug ()) +tester_debug ("call %d: swap calls" , id); + ret =hfp_hf_swap_calls (context->hfp_hf, + hf_cmd_complete, + context); +g_assert (ret); +break ; +default : +tester_debug ("Unexpected session.step" ); +tester_test_failed (); + } + context->session.step++; } }
@@ -1041,9 +1130,52 @@ static void hf_call_line_id_updated(uint id, const char *number,static void hf_call_removed (uint id,void *user_data) { +struct context *context = user_data; +const char *test_name = context->data->test_name; +if (tester_use_debug ())tester_debug ("call %d removed" , id); - g_assert_cmpint(id, ==, 1); +if (g_str_equal (test_name,"/HFP/HF/TWC/BV-01-C" )) { +switch (context->session.step) { +case 2 : + g_assert_cmpint(id, ==, 2); +break ; +case 3 : + g_assert_cmpint(id, ==, 1); +break ; +default : +tester_debug ("Unexpected session.step" ); +tester_test_failed (); + } + context->session.step++; + }else if (g_str_equal (test_name,"/HFP/HF/TWC/BV-02-C" )) { +switch (context->session.step) { +case 2 : + g_assert_cmpint(id, ==, 1); +break ; +case 3 : + g_assert_cmpint(id, ==, 2); +break ; +default : +tester_debug ("Unexpected session.step" ); +tester_test_failed (); + } + context->session.step++; + }else if (g_str_equal (test_name,"/HFP/HF/TWC/BV-03-C" )) { +switch (context->session.step) { +case 8 : + g_assert_cmpint(id, ==, 1); +break ; +case 9 : + g_assert_cmpint(id, ==, 2); +break ; +default : +tester_debug ("Unexpected session.step" ); +tester_test_failed (); + } + context->session.step++; + }else + g_assert_cmpint(id, ==, 1); } static void hf_call_status_updated(uint id, enum hfp_call_status status,
@@ -1139,6 +1271,48 @@ static void hf_call_status_updated(uint id, enum hfp_call_status status, ret =hfp_hf_call_hangup (context->hfp_hf, id, hf_cmd_complete, context);g_assert (ret); + }else if (g_str_equal (test_name,"/HFP/HF/TWC/BV-03-C" )) { +bool ret; + +switch (context->session.step) { +case 1 : +case 5 : + g_assert_cmpint(id, ==, 1); + g_assert_cmpint(status, ==, CALL_STATUS_ACTIVE); +break ; +case 3 : + g_assert_cmpint(id, ==, 1); + g_assert_cmpint(status, ==, CALL_STATUS_HELD); +break ; +case 4 : + g_assert_cmpint(id, ==, 2); + g_assert_cmpint(status, ==, CALL_STATUS_ACTIVE); +if (tester_use_debug ()) +tester_debug ("call %d: swap calls" , id); + ret =hfp_hf_swap_calls (context->hfp_hf, + hf_cmd_complete, + context); +g_assert (ret); +break ; +case 6 : + g_assert_cmpint(id, ==, 2); + g_assert_cmpint(status, ==, CALL_STATUS_HELD); +if (tester_use_debug ()) +tester_debug ("call %d: swap calls" , id); + ret =hfp_hf_release_and_accept (context->hfp_hf, + hf_cmd_complete, + context); +g_assert (ret); +break ; +case 7 : + g_assert_cmpint(id, ==, 2); + g_assert_cmpint(status, ==, CALL_STATUS_ACTIVE); +break ; +default : +tester_debug ("Unexpected session.step" ); +tester_test_failed (); + } + context->session.step++; } }
@@ -1882,5 +2056,231 @@ int main(int argc, char *argv[])frg_pdu (' ' ,'1' ,',' ,'1' ,'\r' ,'\n' ), data_end()); +/* Call waiting – handling user busy by HF (AT+CHLD=0) - HF */ +define_hf_test ("/HFP/HF/TWC/BV-01-C" , test_hf_session, +NULL , test_hf_session_done, +FULL_SLC_SESSION ('1' ,'0' ,'0' ,'0' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'3' ,',' ,'1' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'L' ,'C' ,'C' ,':' ,'1' , +',' ,'1' ,',' ,'4' ,',' ,'0' ,',' ,'0' ,',' , +'\"' ,'1' ,'2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'\"' , +',' ,'1' ,'2' ,'9' ,',' ,'\"' ,'b' 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' ,'\r' ,'\n' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +data_end ()); + +/* Initiate request to drop the active and retrieve the waiting call +* (AT+CHLD=1) - HF +*/ +define_hf_test ("/HFP/HF/TWC/BV-02-C" , test_hf_session, +NULL , test_hf_session_done, +FULL_SLC_SESSION ('1' ,'0' ,'0' ,'0' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'3' ,',' ,'1' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'L' ,'C' ,'C' ,':' ,'1' , +',' ,'1' ,',' ,'4' ,',' ,'0' ,',' ,'0' ,',' , +'\"' ,'1' ,'2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'\"' , +',' ,'1' ,'2' ,'9' ,',' ,'\"' ,'b' ,'l' ,'u' , +'e' ,'m' ,'a' ,'n' ,'\"' ,'\r' ,'\n' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'R' ,'I' ,'N' ,'G' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'L' ,'I' ,'P' ,':' , +'\"' ,'1' ,'2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'\"' , +',' ,'1' ,'2' ,'9' ,',' ,',' ,',' ,'\"' ,'b' , +'l' ,'u' ,'e' ,'m' ,'a' ,'n' ,'\"' , +'\r' ,'\n' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'2' ,',' ,'1' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'3' ,',' ,'0' ,'\r' ,'\n' ), +frg_p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g_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'3' ,',' ,'0' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'4' ,',' ,'0' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'L' ,'C' ,'C' ,':' ,'2' , +',' ,'1' ,',' ,'0' ,',' ,'0' ,',' ,'0' ,',' , +'\"' ,'7' ,'6' ,'5' ,'4' ,'3' ,'2' ,'1' ,'\"' , +',' ,'1' ,'2' ,'9' ,',' ,'\"' ,'a' ,'s' ,'e' , +'c' ,'o' ,'n' ,'d' ,'c' ,'a' ,'l' ,'l' ,'\"' , +'\r' ,'\n' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'2' ,',' ,'0' ,'\r' ,'\n' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +data_end ()); + +/* Request the AG to hold the active and retrieve the waiting call +* (AT+CHLD=2) - HF +*/ +define_hf_test ("/HFP/HF/TWC/BV-03-C" , test_hf_session, +NULL , test_hf_session_done, +FULL_SLC_SESSION ('1' ,'0' ,'0' ,'0' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'I' ,'E' ,'V' ,':' ,' ' , +'3' ,',' ,'1' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'L' ,'C' ,'C' ,':' ,'1' , +',' ,'1' ,',' ,'4' ,',' ,'0' ,',' ,'0' ,',' , +'\"' ,'1' ,'2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'\"' , +',' ,'1' ,'2' ,'9' ,',' ,'\"' ,'b' ,'l' ,'u' , +'e' ,'m' ,'a' ,'n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' ,':' ,' ' , +'4' ,',' ,'0' ,'\r' ,'\n' ), +frg_pdu ('\r' ,'\n' ,'+' ,'C' ,'L' ,'C' ,'C' ,':' ,'2' , +',' ,'1' ,',' ,'0' ,',' ,'0' ,',' ,'0' ,',' , +'\"' ,'7' ,'6' ,'5' ,'4' ,'3' ,'2' ,'1' ,'\"' , +',' ,'1' ,'2' ,'9' ,',' ,'\"' ,'a' ,'s' ,'e' , +'c' ,'o' ,'n' ,'d' ,'c' ,'a' ,'l' ,'l' ,'\"' , +'\r' ,'\n' ), +raw_pdu ('\r' ,'\n' ,'O' ,'K' ,'\r' ,'\n' ), +data_end ()); +return tester_run (); }
Signature · 1 line
2.43.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1022376
---Test result---
Test Summary:
CheckPatch PENDING 0.34 seconds GitLint PENDING 0.32 seconds BuildEll PASS 17.72 seconds BluezMake PASS 4140.52 seconds MakeCheck PASS 19.82 seconds MakeDistcheck PASS 175.21 seconds CheckValgrind PASS 233.46 seconds CheckSmatch PASS 276.37 seconds bluezmakeextell PASS 124.60 seconds IncrementalBuild PENDING 0.30 seconds ScanBuild PASS 858.54 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 10 lines · On Wed, 12 Nov 2025 09:31:49 +0100 you wrote:
This adds support for the AT+CHLD=0 (Releases all held calls or set User Determined User Busy for a waiting call), =1 (Releases all active calls and accept the other call, held or waiting) and =2 (Places all active calls on hold and accept the other call, held or waiting) commands and the +CCWA (Call waiting notification) event.
--- src/shared/hfp.c | 218 ++++++++++++++++++++++++++++++++++++++++++++++- src/shared/hfp.h | 15 ++++ unit/test-hfp.c | 5 ++ 3 files changed, 234 insertions(+), 4 deletions(-)
Here is the summary with links:
- [BlueZ,1/2] shared/hfp: Add simple 3way calls support
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e9b4bf2917a3 - [BlueZ,2/2] unit/test-hfp: Add tests for simple 3way support https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=300ec5a46f69
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html