This wiki page will be updated irregularly.
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)
Firefox OS v1.3
- Support a new protocol stack: Bluedroid. (bug 876583)
- Fully support multiple file transfer. (bug 921085)
- Make HFP be able to handle multi-SIM scenario. (bug 921991)
Firefox OS v1.4 (Backlog)
- Refining Bluetooth Web API (bug 674737)
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
- HFP 1.6 (bug 879196)
- Support command 'AT+BIA'
- A2DP 1.2 (Advanced Audio Distribution Profile) (bug 807758)
- AVRCP (Audio/Video Remote Control Profile) (bug 834553)
Unsupported Bluetooth Profiles
- HFP Wideband Speech (HD Voice) (bug 911635)
- HID (Human Interface Device Profile) (bug 880759, bug 943809)
- FTP (File Transfer Profile)
- PBAP (Phone Book Access Profile) (bug 892179)
- PAN (Personal Area Network Profile) (bug 947085)
- GATT (Generic Attribute Profile) (bug 872460)
In-house Scheduled PTS(Profile Tuning Suite) Test
The target version we used for PTS testing is aurora.
After v1.2, the PTS test was scheduled right after each branching out.
Before v1.2, the PTS test was scheduled monthly.
- 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 headset work well with my phone?
- Some bluetooth headsets have known interoperability issues with Firefox OS. A meta bug on bugzilla is tracking interoperability issues for bluetooth headsets.
- List these bluetooth headsets here:
- Rocketfish RF-QX4 (bug 923743)
- 8. Why can't my bluetooth car kit work well with my phone?
- Some bluetooth car kits have known interoperability issues with Firefox OS. A meta bug on bugzilla is tracking interoperability issues for bluetooth car kits.
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:
- 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
- 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
- It will be easier to debug A2DP/AVRCP profiles using snoop format log.
- To build b2g-desktop
- 1. Edit mozconfig , you might change -j if you have a powerful workstation
- 2. Install following packages: gtk+-2.0 libdbus-1-dev libdbus-glib-1-dev yasm libasound2-dev libgstreamer-plugins-base0.10-dev
- 3. Build ./mach build
- 4. Run "obj-debug/dist/bin/b2g -no-remote -profile [path-to-gaia]/profile" to launch
Example for .mozconfig
$./mach build with .mozconfig mk_add_options AUTOCLOBBER=1 mk_add_options MOZ_OBJDIR=obj-debug MOZ_B2G_BT_BLUEZ=1 mk_add_options MOZ_MAKE_FLAGS="-j4 -s --no-print-directory" ac_add_options --enable-application=b2g ac_add_options --enable-debug ac_add_options --enable-debug-symbols ac_add_options --enable-b2g-bt ac_add_options --with-ccache=/usr/bin/ccache ENABLE_MARIONETTE=1
Currently we have a small Gecko Bluetooth team which is responsible for:
- Dealing with bugs which are assigned to component "Bluetooth"
- Implementing new Bluetooth features
- Maintaining Gecko Bluetooth
- Implementing Bluetooth WebAPI test cases
You're more than welcome to contact us on IRC, on bugzilla or via sending an email. The following is a more detailed list about our job assignment:
- A2DP/AVRCP(Media playing and controlling): Shawn Huang (firstname.lastname@example.org)
- HFP/HSP(Phone call control) & OPP(File transfer): Ben Tian (email@example.com)
- DBus/BlueZ/Gecko Bluetooth integration: Thomas Zimmermann (firstname.lastname@example.org)
- Tests(Emulator/test case implementation, PTS test): Jamin Liu (email@example.com)
- Others: Eric Chou (firstname.lastname@example.org)
You can always contact Eric Chou once you're not sure who is the right person to contact with.