B2G/Bluetooth

From MozillaWiki
< B2G
Revision as of 02:21, 24 September 2013 by Eric30 (talk | contribs) (→‎FAQ)
Jump to navigation Jump to search

This wiki page will be updated irregularly.

Overview

Bluetooth of Firefox OS 1.0 has basic functionalities. It allows users to:

  • Discover visible Bluetooth devices nearby
  • Pair with found devices
  • Send files to/Receive files from remote Bluetooth devices
  • Connect with Bluetooth headsets, then headset can be used for basic call controls, such as Answer/Hang up/Redial

For Firefox OS 1.0, the Bluetooth Web API is considered a Certified API, which means that only certified applications (applications that ship with the OS itself) may use bluetooth. Applications retreived from Firefox Marketplace or elsewhere on the web are not able to use the Bluetooth API at this time.

The Bluetooth version in Firefox OS is 3.0.

New Features and Enhancements

Firefox OS v1.1

  • Users can select and send multiple pictures via Bluetooth at a time in Gallery app. (bug 869287)

Firefox OS v1.2

  • Support A2DP 1.2. Users can listen to music via Bluetooth. (bug 892162)
  • Support AVRCP 1.3. Users can control media playing and get playing status via Bluetooth. (bug 892164) (bug 892165)
  • Make HFP compatible with CDMA network (bug 873006)

Supported Bluetooth Profiles

Currently our developers are working on several Bluetooth profiles which are relatively more popular for a mobile device, such as HFP/HSP/A2DP/AVRCP/OPP. To support these profiles, implementions in both Gecko (for protocol layer) and Gaia (for applications like Settings and Dialer) are needed. Below is a list indicating the relation of supported Bluetooth profiles and the mapping version of Firefox OS.

Firefox OS v1.0.1

  • HFP (Handsfree Profile) 1.5
  • HSP (Headset Profile) 1.2
  • OPP (Object Push Profile) 1.2

Firefox OS v1.2

Unsupported Bluetooth Profiles

  • HFP Wideband Speech (HD Voice) (bug 911635)
  • HID (Human Interface Device Profile) (bug 880759)
  • FTP (File Transfer Profile)
  • PBAP (Phone Book Access Profile)
  • PAN (Personal Area Network Profile)
  • GATT (Generic Attribute Profile)

Meta Bugs

In-house Monthly PTS(Profile Tuning Suite) Test

What is PTS?

FAQ

1. Why can't I hear music from connected Bluetooth headset even when a song is playing?
That's because A2DP was not implemented in your OS version. Before Firefox OS 1.2, only voice stream of phone calls can be heard from Bluetooth headset. A2DP and AVRCP have been supported in Firefox OS 1.2. For more information, please see the meta bug above.
2. I would like to share a song via Bluetooth, but I can't find the share button.
Please press and hold on a song, then you should be able to see the Bluetooth paired device list.
Please see Bug 830040 comment 1 for more information.
3. I just successfully received a photo from another Bluetooth device (e.g. Android phone, laptop ...), but I could neither find that photo in Gallery app, nor open that photo by pressing the successful-transfer notofication. What happened?
For Firefox OS 1.0, Gallery app would ignore images that have a file size of > 3 megabytes or a resolution of more than 5 megapixels.
Please see Bug 815079 comment 4 for more information.
4. Why can't I send a file to my iPhone/iPad?
It's because iOS doesn't support file-transfer profiles.
Please see http://support.apple.com/kb/HT3647 for more information about iOS supported profiles.
5. Why can't I send a file to or receive a file from my Mac?
If you would like to share files to Mac, the file-transfer function should be enabled beforehand.
1. Click the Bluetooth icon at the top-right corner of the screen
2. Select "Open Bluetooth Preferences" from the drop down menu, then click the "Sharing Setup..." button at the bottom right of the dialog that opens
3. Make sure the "Bluetooth Sharing" checkbox is enabled.
Please see http://support.apple.com/kb/PH10786 for more information.
If your Firefox OS version is older than v1.1, once you have done the above steps, please go to the Bluetooth settings page in your phone, and unpair/pair your Mac. Then it should work normally.
6. Why can't I receive a file from my Ubuntu laptop/desktop?
On Ubuntu 12.04/12.10, the function of receiving a file from remote Bluetooth devices is disabled by default. Therefore you have to turn it on then try again.
1. Go to "Personal File Saring"
2. Check the item "Receive files in Downloads folder over Bluetooth"
If your Firefox OS version is before v1.1, once you have done the above steps, please go to Bluetooth page and unpair/pair your Ubuntu device then it should work normally.
7. Why can't my bluetooth car kit work well with my phone?
There are so many cars installed difference Bluetooth modules, we cannot test them one by one.
We have a meta bug on bugzilla tracking interoperability issues for bluetooth car kit .

File a Bug

If you have read the FAQ and still have problems. Please file a bug to Bugzilla. To help developers finding bugs more easily, please make sure the component is set to any of these three:

  • Boot2Gecko::Bluetooth
  • Gaia::Settings
  • Gaia::Bluetooth File Transfer

Helpful Debugging Information

When filing a bug related to Bluetooth, please provide information about your test environment as much as possible, such as:

  • Device (Otoro, Unagi ...)
  • Software information
    • Build Identifier (Go to "Settings" > "Device information" > "More Information")
    • Git commit info
    • Gecko version
    • Gaia version
  • STR (Step to Reproduce)
  • Actual result/Expected result
  • Occurence
  • GDB backtrace
  • adb logcat,
    • In newer release, you can enable Bluetooth log (Go to "Settings" > "Device information" > "More Information" > "Developer")
  • hcidump log
    • hcidump is a tool for Bluetooth protocol analysis.
    • If you're using release build, hcidump would not be included. Please refer to Bug 828810 comment 7 for the step-by-step about how to get hcidump from release build.
    • Take the following steps to get hcidump log:
      • 1. Turn on Bluetooth
      • 2 - 1. For headset/car kit issues, please enter adb shell hcidump --ascii -t > hcidump.txt
      • 2 - 2. For file transferring and other issues, please enter adb shell hcidump --hex -t > hcidump.txt
      • 3. Do the test
      • 4. Attach hcidump.txt to the bug
  • hcidump snoop log
    • It will be easier to debug A2DP/AVRCP profiles using snoop format log.
      • To enable it, please enter adb shell hcidump -R -w/data/whatever.cfa , this will dump log into /data/whatever.cfa

Links