Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ce55abda authored by En-Shuo Hsu's avatar En-Shuo Hsu
Browse files

floss: Add call status and hook to CLCC callback

The report of the call status indicator is required for some headset to
work properly. Add a call_status private field and abstract the set of
the call status to a private helper function for better readability in
the ConnectionStateCallback. Also hook the CLCC callback to reflect the
correct call status.

We sent HF the following +CIND thus the call status index should be 1.
+CIND: ("CALL",(0,1)),("CALLSETUP",(0-3)), ...

Got +CIEV: 1,1 when SCO connection started
> HCI Event: Synchronous Connect Complete (0x2c) plen 17
        Status: Success (0x00)
        Handle: 257
        Address: 7C:96:D2:8B:F8:BC (OUI 7C-96-D2)
        Link type: eSCO (0x02)
        Transmission interval: 0x0c
        Retransmission window: 0x02
        RX packet length: 60
        TX packet length: 60
        Air mode: CVSD (0x02)
< HCI Command: Sniff Subrating (0x02|0x0011) plen 8
        Handle: 256
        Max latency: 0.000 msec (0x0000)
        Min remote timeout: 0.000 msec (0x0000)
        Min local timeout: 0.000 msec (0x0000)
< ACL Data TX: Handle 256 flags 0x00 dlen 22
      Channel: 449 len 18 [PSM 0 mode Basic (0x00)] {chan 65535}
        19 ef 1d 0d 0a 2b 43 49 45 56 3a 20 31 2c 31 0d  .....+CIEV: 1,1.
        0a 55                                            .U

Got +CIEV: 1,0 when disconnect
> HCI Event: Disconnect Complete (0x05) plen 4
        Status: Success (0x00)
        Handle: 257
        Reason: Connection Terminated By Local Host (0x16)
< HCI Command: Sniff Subrating (0x02|0x0011) plen 8
        Handle: 256
        Max latency: 750.000 msec (0x04b0)
        Min remote timeout: 1.250 msec (0x0002)
        Min local timeout: 1.250 msec (0x0002)
< ACL Data TX: Handle 256 flags 0x00 dlen 22
      Channel: 2563 len 18 [PSM 3 mode Basic (0x00)] {chan 2}
      RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
         Address: 0x63 cr 1 dlci 0x18
         Control: 0xef poll/final 0
         Length: 14
         FCS: 0x0e
        0d 0a 2b 43 49 45 56 3a 20 31 2c 30 0d 0a 0e     ..+CIEV: 1,0...

Tag: #floss
Bug: 213408429
Test: Build, flush, put to HFP mode, start then stop call, capture
btsnoop and verify +CIEV commands show up at when the call starts/stops
with correct call status

BYPASS_LONG_LINES_REASON: Bluetooth likes 120 char lines

Change-Id: Ib9af4bf0ebe695ede4614703a6d0ca2adf5478a8
parent fb2277f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment