Hi Fabrice,
Trying to give you a quick overview of the state of Bluetooth on
desktops. Let me know if you need specific information on any topic.
Bluetooth support means
a) supporting Bluetooth adapter and device management, and
b) supporting individual Bluetooth profiles (services).
There's an individual API for each operating system and different
devices will support different profiles. I think it's fair to assume
that a system fully supports a) and at least file transfers (Object Push
Profile 'OPP') for b). For a) there's also the question if we'd want to
setup device pairings from within the browser, or leave this to external
tools.
** Linux **
Linux uses BlueZ [1] to provide Bluetooth support. The official version
is now at 5.*. It supports recent releases of the Bluetooth spec (4.*)
and modern features (Bluetooth LE). We already have some support for
BlueZ in our source code, but that's only compatible with Bluez 4 on
ICS. The interfaces changed considerably, thus we can't use it as it is
on current Linux systems.
** Windows **
AFAIK Windows didn't have much Bluetooth support before Vista SP2. There
are a number of Bluetooth stacks from 3rd parties, but supporting them
seems not feasible. For Windows 7 and later there is at least built-in
support for Bluetooth 2.1. [2] That should be enough to do file transfers.
** MacOS X **
I don't know much about Macs, but the developer web site [3] looks like
they'd at least support file transfers. So that should be fine for an
initial version.
** Supporting new systems in Gecko **
We recently introduced an internal API for backends. Supporting a new
system will require implementing the backend API for the system's
Bluetooth API. This isn't too complicated. It's mostly about wrapping
system interfaces behind the backend's interface.
Most of the Gecko code still leans towards Android support. So right
now, there's unfortunately no quick way of supporting Bluetooth on any
desktop. We are currently going though a lot of refactoring in the
Bluetooth code and we are still in a transition phase. I wrote an
experimental backend for BlueZ 4, [4] but saw a number of problems that
need to get solved first.
Best regards
Thomas
[1]
http://www.bluez.org/
[2]
https://msdn.microsoft.com/en-us/library/windows/desktop/aa362932%28v=vs.85%29.aspx
[3]
https://developer.apple.com/bluetooth/
[4]
https://bugzilla.mozilla.org/show_bug.cgi?id=1088574