[PATCH BlueZ v2 1/6] android/handsfree: Relax AT+CMER handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Szymon Janc <szymon.janc@xxxxxxxxx>

Spec says that HF may (not should) use AT+CMER=3,0,0,1 command to
activate indicators. Since AT+CMER has additional bfr parameter that
may be send by HF we should just skip it instead of failing.

This fix connection with Jaguar XF 2009 carkit.
---
 android/handsfree.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/android/handsfree.c b/android/handsfree.c
index 4020ed5..4af2a89 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -1197,11 +1197,14 @@ static void at_cmd_cmer(struct hfp_context *result, enum hfp_gw_cmd_type type,
 		if (!hfp_context_get_number(result, &val) || val > 1)
 			break;
 
+		dev->indicators_enabled = val;
+
+		/* skip bfr if present */
+		hfp_context_get_number(result, &val);
+
 		if (hfp_context_has_next(result))
 			break;
 
-		dev->indicators_enabled = val;
-
 		hfp_gw_send_result(dev->gw, HFP_RESULT_OK);
 
 		if (dev->features & HFP_HF_FEAT_3WAY)
-- 
2.2.0.rc0.207.ga3a616c

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux