Closed Bug 796224 Opened 12 years ago Closed 12 years ago

[Bluetooth] Needs Dailer app to observe a system message sent from Bluetooth

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: ghtobz, Assigned: etienne)

References

Details

(Keywords: feature, Whiteboard: [label:bluetooth][LOE:S])

Attachments

(1 file)

[GitHub issue by eric30 on 2012-09-21T03:17:13Z, https://github.com/mozilla-b2g/gaia/issues/4999]
Once we have connected with a remote bluetooth headset, the user would be able to Answer/Hangup/Redial by tapping or pressing buttons on the headset. Currently on my branch, Bluetooth module in Gecko can receive messages sent from headset and parse those messages to understand what action the user would like to do.

My idea is bluetooth would send a system message "bluetooth-dialer-command" with an argument indicating which command it is, and Dialer app listens to this topic and do the corresponding action. 

I've talked to Etienne about this and I think he could help us on this issue. : )
[GitHub comment by eric30 on 2012-09-21T03:21:42Z]
CC @etiennesegonzac 

Etienne, could you help on this please? The interface would be:

  system message topic:  bluetooth-dialer-command
  argument:  an integer - Answer(1), Hangup(2), Redial(3)

Please feel free to tell me if you have any question. 
Thanks in advance.

Eric
[GitHub comment by ginayeh on 2012-09-25T11:11:34Z]
Here's the bug link: https://bugzilla.mozilla.org/show_bug.cgi?id=794005

We changed the API a bit, please check comments in the link. Please feel free to write comments and let me know if there's any problem. Thanks.
[GitHub comment by etiennesegonzac on 2012-09-28T16:26:25Z]
Hi @eric30 and @ginayeh!

I tried to make some progress on this today, but I'm having issues.
I got a bluetooth headset successfully paired with my Otoro (I can see it on the main settings screen under Bluetooth).

But
* I do not get any sound in the headset during a phone call
* The dialer does not receive any system message when I press the headset button

What can I provide to help you debug this?

Cheers!
[GitHub comment by eric30 on 2012-09-28T17:26:52Z]
Hi @etiennesegonzac

Sorry that I did not explain clear about this. Since bug 794005 has been merged to m-c, supposed that we should be able to connect to a headset. However, related DOM API has not checked in to m-i yet (bug 794515, reviewing), so when you press "Connect" on the phone, it won't work.

I'm trying to get 794005 done asap, before that, please use the branch "OppManager" of my repo (https://github.com/eric30/releases-mozilla-central/tree/OppManager) instead. Also, after you flash this version of Gecko, please get latest Gaia, and make 2 small changes in function setDeviceConnect() of gaia/apps/settings/js/bluetooth.js:

(a)
      var req = defaultAdapter.connect(device.address, defaultAdapter.HANDSFREE);
=> var req = defaultAdapter.connect(device.address, 0x111E);

(b)
      var req = defaultAdapter.disconnect(device.address, defaultAdapter.HANDSFREE);
=>  var req = defaultAdapter.disconnect(0x111E);

Then press "Connect" button shown on the menu, our device and headset will be connected soon. Currently no voice because the patch is also under review, however you should be able to Redial/Answer/Hang up the call via pressing headset buttons.

Hope this helps, and please feel free to tell me if you have any questions.

Many thanks,
Eric
Assignee: nobody → etienne
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
clee - can you help with prioritization here?
Flags: needinfo?(clee)
Etienne, could you help?
Keywords: feature
The first patch is almost ready :)
Hi Etienne,

Bluetooth headset also support a feature of three-way calling, and we'll also notify dialer by system message. It is implemented in bug 805708.

The topic of system message is "bluetooth-dialer-command", and the message will be like {"command":"XXX"}.
- ATA: Accept an incoming call
- CHUP: Terminate a call
- BLDN: Place a call to the last number dialed
- CHUP+ATA: Terminate the ongoing call and accept an incoming call
- CHLD+ATA: Hold the ongoing call and accept an incoming call

The first three has been landed in bug 794005, and last two are going to reviewing. Please let me know if I can be help. Thanks.
Attachment #675496 - Flags: review?(francisco.jordano)
(In reply to Gina Yeh from comment #8)
> Hi Etienne,
> 
> Bluetooth headset also support a feature of three-way calling, and we'll
> also notify dialer by system message. It is implemented in bug 805708.
> 
> The topic of system message is "bluetooth-dialer-command", and the message
> will be like {"command":"XXX"}.
> - ATA: Accept an incoming call
> - CHUP: Terminate a call
> - BLDN: Place a call to the last number dialed
> - CHUP+ATA: Terminate the ongoing call and accept an incoming call
> - CHLD+ATA: Hold the ongoing call and accept an incoming call
> 
> The first three has been landed in bug 794005, and last two are going to
> reviewing. Please let me know if I can be help. Thanks.

Hey Gina,

I'm only getting ATA/CHUP messages, so those are the only ones implemented yet.
Not sure why I'm not getting any BLDN...

That said, the basic mechanism is in place so it should be straightforward to to implement the rest.

From a product stand point we now have pickup/hangup from the bluetooth headset, are the other functions still blocking-basecamp?
Attachment #675496 - Flags: review?(francisco.jordano) → review+
Blocks: 805762
Hi Etienne,

Did you try to double press your headset when there's no call? You should be able to get BLDN. If not, please let me know.
https://github.com/mozilla-b2g/gaia/pull/6016
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Removing needinfo since already fixed.
Flags: needinfo?(clee)
Tested a Motorola H730 headset on Unagi build 20130103070201.

The following commands worked:
- ATA: Accept an incoming call
- CHUP: Terminate a call
- BLDN: Place a call to the last number dialed
- CHLD+ATA: Hold the ongoing call and accept an incoming call

The following command was not testable since the H730 does NOT support this function:
- CHUP+ATA: Terminate the ongoing call and accept an incoming call
Verified issue resolved on Unagi Build ID 20130114073222

Unable to test on Otoro device.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: