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

RESOLVED FIXED

Status

Firefox OS
Gaia
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: GH to BZ, Assigned: etienne)

Tracking

({feature})

unspecified
feature

Firefox Tracking Flags

(blocking-basecamp:+)

Details

(Whiteboard: [label:bluetooth][LOE:S])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
[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. : )
(Reporter)

Comment 1

6 years ago
[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
(Reporter)

Comment 2

6 years ago
[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.
(Reporter)

Comment 3

6 years ago
[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!
(Reporter)

Comment 4

6 years ago
[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

Updated

6 years ago
Assignee: nobody → etienne
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Comment 5

5 years ago
clee - can you help with prioritization here?
Flags: needinfo?(clee)

Comment 6

5 years ago
Etienne, could you help?
Keywords: feature
(Assignee)

Comment 7

5 years ago
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.
(Assignee)

Comment 9

5 years ago
Created attachment 675496 [details]
Pointer to gaia pull request
Attachment #675496 - Flags: review?(francisco.jordano)
(Assignee)

Comment 10

5 years ago
(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+
(Assignee)

Updated

5 years ago
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.
(Assignee)

Comment 12

5 years ago
https://github.com/mozilla-b2g/gaia/pull/6016
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Removing needinfo since already fixed.
Flags: needinfo?(clee)

Comment 14

5 years ago
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

Comment 15

5 years ago
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.