Bluetooth: HFP HF: SLC Enable indicator status report

End of service level connection(call waiting or 3-way calling bit
and HF Indicators bit not set at present). AT+CMER is sent to
enable indicators status reporting in the AG side.

< ACL Data TX: Handle 256 flags 0x00 dlen 24                  [hci0] 102.898017
      Channel: 68 len 20 [PSM 3 mode 0] {chan 0}
      RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
         Address: 0x09 cr 0 dlci 0x02
         Control: 0xef poll/final 0
         Length: 16
         FCS: 0x40
        41 54 2b 43 4d 45 52 3d 33 2c 30 2c 30 2c 31 0d  AT+CMER=3,0,0,1.
        40                                               @
> ACL Data RX: Handle 256 flags 0x02 dlen 15                  [hci0] 102.942198
      Channel: 64 len 11 [PSM 3 mode 0] {chan 0}
      RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
         Address: 0x0b cr 1 dlci 0x02
         Control: 0xff poll/final 1
         Length: 6
         FCS: 0x86
         Credits: 1
        0d 0a 4f 4b 0d 0a 86                             ..OK...

Change-Id: I1630bf40f0f84e6e037b405854eb0c1c4ea691c4
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
This commit is contained in:
Sathish Narasimman 2016-12-28 11:32:41 +05:30
commit 166a8f762a

View file

@ -319,8 +319,8 @@ int cind_status_resp(struct at_client *hf_at, struct net_buf *buf)
return 0;
}
int cind_status_finish(struct at_client *hf_at, struct net_buf *buf,
enum at_result result)
int cmer_finish(struct at_client *hf_at, struct net_buf *buf,
enum at_result result)
{
if (result != AT_RESULT_OK) {
BT_ERR("SLC Connection ERROR in response");
@ -328,7 +328,26 @@ int cind_status_finish(struct at_client *hf_at, struct net_buf *buf,
return -EINVAL;
}
/* Continue SLC creation */
return 0;
}
int cind_status_finish(struct at_client *hf_at, struct net_buf *buf,
enum at_result result)
{
struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at);
int err;
if (result != AT_RESULT_OK) {
BT_ERR("SLC Connection ERROR in response");
hf_slc_error(hf_at);
return -EINVAL;
}
err = hfp_hf_send_cmd(hf, NULL, cmer_finish, "AT+CMER=3,0,0,1");
if (err < 0) {
hf_slc_error(hf_at);
return err;
}
return 0;
}