Skip to content

Commit

Permalink
Bluetooth: HFP HF: SLC Enable indicator status report
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sathishnarasimman committed Jan 5, 2017
1 parent 55190c9 commit 166a8f7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion subsys/bluetooth/host/hfp_hf.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,35 @@ int cind_status_resp(struct at_client *hf_at, struct net_buf *buf)
return 0;
}

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");
hf_slc_error(hf_at);
return -EINVAL;
}

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;
}

/* Continue SLC creation */
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;
}
Expand Down

0 comments on commit 166a8f7

Please sign in to comment.