Closed Bug 820143 Opened 12 years ago Closed 12 years ago

bluetooth Hfp Calling Line Identification (CLI) not supported

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox19 fixed, firefox20 fixed, b2g18 fixed)

RESOLVED FIXED
B2G C3 (12dec-1jan)
blocking-basecamp +
Tracking Status
firefox19 --- fixed
firefox20 --- fixed
b2g18 --- fixed

People

(Reporter: ggrisco, Assigned: echou)

Details

Attachments

(1 file, 2 obsolete files)

Was wondering if this is intentionally not supported or something that was overlooked.  I took a quick look at BluetoothHfpManager.cpp and didn't see any handling of "CLI" commands.
blocking-basecamp: --- → ?
We're also looking into this component of the HFP to see if it needs to be supported for v1.
Flags: needinfo?(clee)
Just synced with product team, we will fix this for v1.
Flags: needinfo?(echou)
* Implemented Calling Ling Identification(CLI) Notification. For more information, please see section 4.23 [Calling Line Identification (CLI) Notification], HFP spec 1.6.
* Avoid compiler warnings (comparison between unsigned int and int)
*
Assignee: nobody → echou
Attachment #691769 - Flags: review?(gyeh)
Comment on attachment 691769 [details] [diff] [review]
patch 1: v1: implemented Calling Line Identification(CLI)

Review of attachment 691769 [details] [diff] [review]:
-----------------------------------------------------------------

Please help to add an AT Command Parser which separates string by ',' or something else, trimming strings, and then returns an array. r+ after seeing the next patch with the parser.

::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +594,5 @@
> +     */
> +    int length = strlen(msg);
> +    mCLIP = (msg[length - 1] == '0') ? false : true;
> +
> +    SendLine("OK");

How about making an AT Command Parser for all commands?

@@ +812,5 @@
> +                                           new SendRingIndicatorTask(""));
> +        } else {
> +          int type = TOA_UNKNOWN;
> +
> +          if (aNumber && aNumber[0] == '+') {

We probably need to check length of aNumber here.

@@ +911,3 @@
>            }
>  
>            // There is no call 

Please help to remove the trailing whitespace.

@@ +915,3 @@
>              mCurrentCallIndex = 0;
>              CloseScoSocket();
>            } 

Please help to remove the trailing whitespace.

::: dom/bluetooth/BluetoothHfpManager.h
@@ +59,2 @@
>    nsString mDevicePath;
> +  nsCString mIncomingCallPhoneNumber;

Are we going to use this elsewhere?
Attachment #691769 - Flags: review?(gyeh)
blocking-basecamp: ? → +
blocking-basecamp: + → ?
* nits picked
* implemented a simple AT command parser to get values of an AT command.
Attachment #691769 - Attachment is obsolete: true
Attachment #692816 - Flags: review?(gyeh)
Comment on attachment 692816 [details] [diff] [review]
patch 1: v2: implemented Calling Line Identification(CLI) and a simple AT command parser function

Review of attachment 692816 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, r+ with nits addressed. Thanks for helping to build the AT command parser.

::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +540,2 @@
>      if (NS_FAILED(rv)) {
>        NS_WARNING("Failed to extract volume value from bluetooth headset!");

We probably need to response OK here. Please help to add it.

::: dom/bluetooth/BluetoothUtils.cpp
@@ +136,5 @@
>    }
>  }
>  
> +void
> +ParseAtCommand(const nsACString& aAtCommand, int aStart,

The value of aStart won't be/shouldn't be changed in this function. Let's make it as a const.

@@ +142,5 @@
> +{
> +  int length = aAtCommand.Length();
> +  int begin = aStart;
> +
> +  for (int i = aStart; i < length; ++i) {

How about directly putting aAtCommand.Length() here? Then we don't one more variable.
Attachment #692816 - Flags: review?(gyeh) → review+
* Modified, except the third item. To avoid .Length() being invoked for many times, I prefer declaring it outside the loop.
Attachment #692816 - Attachment is obsolete: true
blocking-basecamp: ? → +
https://hg.mozilla.org/mozilla-central/rev/a88f372dacaf
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: