Don’t call me DOM

25 January 2013

Setting up bluetooth network hub for connected devices

Filed under:

At the end of next month (February 2013), W3C will once again have a booth at Mobile World Congress to share with the congress participants news from all the mobile-relevant work happening in W3C, and our views on the importance of the Web as platform that connects devices together.

To illustrate this, we are working on a demonstration that illustrates the ability of the Web on various connected devices: laptop, tablet, phone and TV.

Anyone who has had to work on setting up a network at Mobile World Congress has probably experienced the same as I have: setting up a reliable WiFi network in the midst of many other booths with WiFi networks and the unavoidable overlap of WiFi frequencies is at best a challenge, at worse impossible.

So this year, I’ll be trying an alternative set up, using bluetooth as a way to connect devices to the network, instead of (or in addition to) WiFi. It is to early too tell whether that alternative will work or if it will be necessary at all — the congress organizers have made (unclear to me at least) claims that the WiFi situation should be better this year. But I thought I would document what I’ve managed to set up so far, in case this can help others, and, more likely, in case I need a similar set up in the future.

I had originally thought of buying a bluetooth network hub, but they were rather expensive, and it didn’t seem that there was a lot of choice in this space. I then realized a simple and cheaper alternative: a laptop with bluetooth should be able to act as networking hub via bluetooth.

To set up an ubuntu laptop in that way, I’ve used the blueman package to provide a network service from bluetooth, installing along the bluez-compat package that provides the necessary pand and dund utilities.

To route the network from bluetooth to the laptop active network interface, I’ve bridged the created pan1 network interface to the ethernet one.

For the demonstration, I will need to expose locally-defined (in /etc/hosts) domain names to the bluetooth interface. blueman relies on NetworkManager to create that interface, and since Ubuntu 12.04, NetworkManager uses dnsmasq as a DNS cache (apparently to deal with better access to VpN, although with mixed results).

But NetworkManager starts dnsmasq with the --no-hosts parameter, which makes it ignore my locally defined domain names (see why).

So the easiest way to avoid that problem was to stop NetworkManager to use this dnsmasq plugin by commenting out dns = dnsmasq in the /etc/NetworkManager/NetworkManager.conf file.

With this done, I have been able to connect an Android phone running Android 4.2, an Android tablet running Android 3.2, and an iPad running iOS 4.3. For Android, once the two devices are paired (and assuming to above set up has been correctly done), one of the services one can pick from the laptop is internet access, and once selected, the connection works. For the iPad, no additional service selection is needed (presumably, it uses all the available services).

I have not been able to connect an iPhone that way; although I have not found a reliable confirmation of this, I think it is not possible to do.

One problem that I hit with the iPad is that it would not resolve the locally-defined names I was using with the pseudo .local TLD; because iOS reserves .local for mDNS resolution, I had to use a different TLD (e.g. .lan) to make it work.

I will likely have more mobile devices to test in that connection set up; I think there is a limit of the number of devices that can be simultaneously connected that way (7?), but I haven’t confirmed it yet.

One Response to “Setting up bluetooth network hub for connected devices”

  1. Sashidhar Says:

    Hello Dominique,
    The topic you have shared is interesting. I am looking at a solution for my store where, I want people of my store to access my website on their mobiles with bluetooth, but not having WiFi connectivity. I am wondering what kind of solution are available. Please let me know if you are aware of any solutions.

Picture of Dominique Hazael-MassieuxDominique Hazaël-Massieux ( is part of the World Wide Web Consortium (W3C) Staff; his interests cover a number of Web technologies, as well as the usage of open source software in a distributed work environment.