How to set up a Bluetooth connection in Ubuntu (12.04)?

If you’re someone new to Ubuntu and looking for a way to connect a Bluetooth powered mobile phone, headset or a printer etc with Ubuntu (I’m using 12.04 version here), then this post is for you …

Unlike with MS Windows with GNU/Linux operating system you don’t really have to manually install hardware drivers as most of them are automatically recognized and configured by the operating system (sometimes except for the ATI and Nvidia GPU drivers).

So before we begin, I’m assuming that your wireless networking hardware device is detected by the Ubuntu OS. And the easiest way that you can make sure it’s recognized by the OS is by looking at the top panel of your desktop and if you see a small icon that resembles the standard Bluetooth logo near the clock (to the right edge of the top panel) as shown below. If you see this, then you’re good to go :D.

If Bluetooth is temporarily disabled, then this icon should be less bright …

Let’s do it …

Step 1: First of all, make sure you’ve enabled Bluetooth on your device. If it’s a mobile phone, then you’ll have to manually enable it and also make sure it’s ‘visible’ (discover mode) to other devices. Because even if your device (phone) has Bluetooth enabled yet its ‘visibility’ is disabled, then Ubuntu won’t be able to detect it.

Step 2: Then locate that small Bluetooth icon on the top panel and click on it. Then from the menu that you get, click on that which says ‘Bluetooth Settings…’ (at the bottom).

This should open the default configuration window and you’ll see a button that lets you turn on/off Bluetooth as shown below. Now simply click and drag it to the right-side until it says ‘ON’ to turn it on.

There could be occasions that this button doesn’t stick to the right side and you can’t enable Bluetooth. This happens to me here and there (I guess it’s a bug) and a trick that I usually use is to manually press the keyboard button on my notebook computer to turn Bluetooth off and then re-press it to turn it on. And then I try to enable it and it does the trick.

If you have a USB Bluetooth adapter (if you’re using a desktop PC) then you can try removing and reinserting it.

Step 3: If you want your computer to be ‘visible’ to other devices, then you can use the button to the right side under the option that says ‘visibility of …’ (shown in above screenshot) for that.

Step 4: Then click on the ‘+’ sign at the bottom of the ‘Bluetooth Settings’ window to add the device (shown in the above screenshot).

Step 5: It’s an extremely user friendly tool and will guide you through the whole process. Anyhow, click ‘Continue’ button and then Ubuntu will scan and connect any ‘visible’ Bluetooth device.

As you can see in below screenshots, it detected my Samsung mobile phone and if you have more than one, then they’ll be listed, one by one.

Optional …

If you have a lot of Bluetooth devices listed (say that you searched it in your workplace) then you can use the ‘Device type’ button and make it only show categorized devices as well (only mobile phones or printers for example).

Step 6: Now when you’re ready, click on the device that you want a connection to be established and click ‘Continue’.

If your device is supported then Ubuntu will display a PIN (numbers) at the next step which is the passphrase that will be used for adding encryption to the Bluetooth connection.

This PIN number is only displayed for a few seconds so you should better hurry up ;-). If it’s a phone, then your phone will ask for this PIN code automatically.

If you successfully entered the PIN number then you should see a message saying that the set up was successful as shown below.

If you want to disable the encryption or manually enter a PIN number

It’s strongly recommended that you use encryption but if you don’t like it, then you can disable by simply clicking on the ‘Restart Setup’ button and then click on the ‘PIN options…’ button and then choose ‘Do not pair’ option. Here if you have a common PIN assigned for your Bluetooth devices, you can enter that by using the ‘Custom PIN’ option too.

Step 7: Now you can use the your device with Ubuntu using Bluetooth and if you’ve connected a mobile phone then you can use ‘Bluetooth Settings’ window or can click on the Bluetooth icon on the top panel for sending or browsing files etc as shown below.

Well, that’s it. I hope this was useful for all of those who are new to Ubuntu. Good luck.

15 thoughts on “How to set up a Bluetooth connection in Ubuntu (12.04)?

  1. John

    I’m running a Mythbuntu 12.04.1 machine from a clean install. I have plugged in a USB bluetooth adaptor and I don’t get any icon?! Using the terminal and running the lsusb command I can see the adaptor there.

    1. Gayan Post author

      Hi ‘John’,

      Now I’m assuming that you still can setup your Bluetooth adapter through the ‘System Settings’ window or by searching in ‘Dash’ and opening the Bluetooth setup wizard that comes with Ubuntu, but just can’t see the icon on the top panel in Unity.

      In that case, try putting the below command in your Terminal.

      gsettings set com.canonical.indicator.bluetooth visible true

      This will only work if you use the ‘Unity’ flavor though …

  2. Ajay Singh

    My bluetooth option is only keep on searching the device for hours but unable to discover. I have my mobile phone discoverable. Even my laptop bluetooth is discoverable but I am unable to discover it on my phones. Please help me regarding it

  3. Alex

    I have ubuntu 13.04 rariring ringtail . I cant swich on bluetooth on hp pavilion g7 2210sm model but it supports bluetooth.. I heard.that you must type something into a terminal but I dont know how to enter it and changing the code cause i am new to ubuntu and i dont know coding

    1. Gayan Post author

      Hi Alex,

      It’s strange why the indicator button can’t turn it ON. Nevertheless, the command is the following.

      rfkill unblock bluetooth

      This will turn it ON. To turn it OFF, use the below one.

      rfkill block bluetooth

      Hope it helps.

  4. Rahul

    hello,
    I did the steps that u mentioned above but my bluetooth starts in the tray above but when i go to bluetooth settings it is not on and also not visible i have Dell inspiron N5110

    1. Gayan Post author

      Hi Rahul,

      I’m not sure what the issue really is, it could be due to a drive issue. Anyhow, you can try entering the below command into the terminal (it’ll turn ON Bluetooth, if the OS has recognized it), then re-open the Bluetooth indicator icon, see if it fixes the issue.

      sudo rfkill unblock bluetooth

  5. chizoba

    i try the first step to drag it to the right but it refuse to stick on the right even i use the keyboard button still it refuse. is there any other way. i m using ubuntu 12.04 thinkpad laptop

    1. Gayan Post author

      If you can’t drag it & that it’s grayed out, then it’s probably an indication that your Bluetooth adapter isn’t recognized by Ubuntu. However, also make sure that the Bluetooth service is running and that it’s not blocked (turned OFF). For that use the below command:

      sudo service bluetooth status

      If it says something like ‘bluetooth start/running,…’ then that’s not the issue. You can make sure that it’s not blocked by issuing the below command and see if it fixes the issue…:

      rfkill unblock bluetooth

  6. jatinder

    Using Ubuntu 12.04, i can send files from laptop to phone but not able to send files of phone to laptop despite several efforts. Is it a fault due to Ill installation as I didn’t insert any DVD during first installation, please suggest resolution

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>