Pinterest Stumbleupon Whatsapp
Ads by Google

One of the problems with the early Raspberry Pi models was the lack of on-board connectivity. Ethernet aside, if you wanted to connect to a wireless network, you needed to use one of the USB ports, and in hub-less situations, this was a port you could be using for other purposes. The same was true for Bluetooth.

While the Raspberry Pi Model B+ The Raspberry Pi B+ Is Here. What's Changed? The Raspberry Pi B+ Is Here. What's Changed? Read More and Raspberry Pi 2 5 Things Only a Raspberry Pi 2 Can Do 5 Things Only a Raspberry Pi 2 Can Do The latest edition of the pint-sized computer is awesome. So awesome, in fact, that there's 5 things you can only do on a Raspberry Pi 2. Read More brought extra USB ports, the best solution could only be built-in Bluetooth and Wi-Fi, something we finally got with the Raspberry Pi 3, released in early 2016.

But how do you set up wireless networking and Bluetooth on the Raspberry Pi 3?

Wireless and Bluetooth on the Raspberry Pi 3

The Raspberry Pi 3 The Raspberry Pi 3: Faster, Better, with Wi-Fi and Bluetooth The Raspberry Pi 3: Faster, Better, with Wi-Fi and Bluetooth Today, the Raspberry Pi foundation announced the release of the Raspberry Pi 3. It's the most significant update to the popular line of low-cost computers yet. Read More comes with some nice new features, and the new wireless and Bluetooth component is arguably the most impressive. Have you spotted it yet?

You’ll find it along the short edge of the Pi where the microSD card is inserted. This small, white oblong chip antenna will connect you to your wireless router, as well as enable you to connect a Bluetooth keyboard or other device to the Pi.

muo-diy-raspi3-bluetooth-chip

Ads by Google

However, this component is delicate. Take care when installing the Raspberry Pi 3 into a case, as the position of the chip antenna can result in it being caught. Also, thick, darker plastic (and denser) cases can block the signal to and from the chip antenna, making the device useless.

Time to set it up!

Configure Wireless Networking on the Raspberry Pi 3

To get started with the Raspberry Pi 3, you’ll need to connect it to your router with an Ethernet cable to get updates and configure Wi-Fi. Once hooked up and booted, you can plug in a keyboard or connect via SSH or VNC VNC, SSH and HDMI: Three Options for Viewing Your Raspberry Pi VNC, SSH and HDMI: Three Options for Viewing Your Raspberry Pi The Raspberry Pi is a remarkable little computer, but it can be time consuming to set it up and connect it to your monitor. Read More to run an update in the terminal.

sudo apt-get update
sudo apt-get upgrade

You’ve then got two options for setting up a wireless connection. It might seem easier to boot into the GUI, but really it’s more straightforward to do it in the command line. You should already have your SSID name, but if not, use

sudo iwlist wlan0 scan

This will reveal the SSID in the line “ESSID”. Next, open wpa_supplicant.conf:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

You’ll need to add or edit the following:

network={
ssid="SSID"
psk="WIFI PASSWORD"
}

Press CTRL+X to exit and save, pressing Y and Enter to confirm. Wireless connectivity should start immediately; if not, use

sudo ifdown wlan0
sudo ifup wlan0

…to restart wireless. You could also simply enter sudo reboot.

If you prefer to use the GUI, right-click the Ethernet icon in the panel (two computer monitors) and select the wireless networking option. Then all you need to do is select the correct SSID and add the password. You should now be online, and be able to disconnect the Ethernet cable!

Configure Bluetooth on the Raspberry Pi 3

To configure Bluetooth, you’ll need to begin with the update and upgrade commands, as above. Next, install the Bluetooth package:

sudo apt-get install bluetooth-pi

If you prefer, you can install bluez instead, which bluetooth-pi installs along with other tools.

sudo apt-get install bluez bluez-firmware

At this stage, everything is installed for activating Bluetooth from the command line

To get started configuring your Pi’s Bluetooth, run

bluetoothctl

A host of options are available with this. Type help to see them.

muo-diy-raspi3-bluetooth-help

For Bluetooth to work, it needs to be enabled, discoverable and capable of discovering devices.

We use three commands to do this:

power on
agent on
scan on

muo-diy-raspi3-bluetooth-on

In this screen, you can see the Raspberry Pi has detected my Ubuntu phone. A connection can be made by entering connect, followed by the MAC address. You don’t need to connect though – you can use Bluetooth scanning as a presence detection for DIY smart home systems Make An Auto-Locking Office Door with Smartphone Proximity Sensor Make An Auto-Locking Office Door with Smartphone Proximity Sensor We'll be setting up a Raspberry Pi with a Bluetooth adapter to be on the lookout for when your smartphone is out of range, and snap a relay into action to lock the door. Read More .

Connect to Bluetooth in the GUI

If you prefer to setup your Raspberry Pi Bluetooth connections in X, you can, as long as the blueman software is installed.

sudo apt-get install blueman

You’ll need to restart the Pi:

sudo reboot

Notice how we can now be more verbal with the Pi; previously this command would have been sudo shutdown -r (which still works).

muo-diy-raspi3-bluetooth-X

With the Pi now rebooted and the X desktop environment loaded, open Menu > Preferences > Bluetooth Manager. Nearby discoverable devices will be listed, so right-click and select Connect to begin the pairing/trust process.

Bluetooth is up and running!

When Bluetooth Fails

Although the setup is straightforward, should your hardware not be working correctly, it won’t be immediately apparent. I’ve been, um, blessed with a Raspberry Pi 3 that was defective (either due to a manufacturing fault, which is unlikely, or a fault that occurred when the device was installed in the case, again, pretty unlikely), and found that while setting up wireless networking is a complete no-go if the chip antenna is damaged, Bluetooth appears to be working.

muo-diy-raspi3-bluetooth-fail

I can’t tell you how bizarre and frustrating it is to run sudo service bluetooth status (see above) and find that all seems well with Bluetooth, only to find a couple of commands later the whole thing is pretty much out of order. With wireless and Bluetooth failing to work correctly, I’ve essentially got a very hi spec Raspberry Pi 2! Still, it’s ideal for running OSMC 3 Ways to Set Up Your Raspberry Pi as a Media Server 3 Ways to Set Up Your Raspberry Pi as a Media Server Which media center application should you install on your Raspberry Pi? Several options are on offer, and we're going to walk you through them now, looking at the features, advantages, and disadvantages of each. Read More

Do you have a Raspberry Pi 3? Have you run into any problems with Wi-Fi or Bluetooth, or did it all go well? Tell us in the comments.

  1. Gary
    November 29, 2016 at 6:00 pm

    I just went through the process for setting up the Wi-Fi and all went well. It took a few seconds for the Wi-Fi connection to show up but then I was immediately able to disconnect the ethernet cable. I didn't try the Bluetooth set up because I don't have a Bluetooth device but will bookmark this for later.
    Thank you for the easy to follow instructions!
    Gary

    • Christian Cawley
      November 30, 2016 at 10:42 am

      Happy to help Gary, thanks!

  2. phoenix
    September 2, 2016 at 1:17 am

    Every time I try to connect my phone, the terminal says "Failed to connect: org.bluez.Error.Failed" and on my pi is says that I have "no usable services" on my device

    • TIAGO PALUDO
      November 3, 2016 at 10:35 pm

      I cant connect to any wifi on rpi3b using ubuntu mate. Simply the SOs dont detect any wifi networks, while my cellphone detects 18.

      • Christian Cawley
        November 4, 2016 at 8:59 am

        How does it fair with Raspbian? Checking that will determine whether you've got a suspect wireless radio.

    • Christian Cawley
      November 4, 2016 at 9:01 am

      That sounds like a BT driver issue, *or* the BT hardware has failed. My first Pi3 had working BT and Wi-Fi for about a day before it stopped working. You should probably contact the vendor to arrange a replacement.

Leave a Reply

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