Almost Successful Bluetooth Dongle

USB Bluetooth v4.0 mini adapter

This came in for me last week, so I hope to be able to use create a Node.js-based iBeacon in my house using Bleacon and some instructions using Estimote. So far I'm unable to install Bleacon because, I believe, I insist on using the latest available binary for Node.js for Raspberry Pi.

At least the hardware works. It's just the Node module failing to install. Getting software to work has always been easier than getting hardware to work, so I will persist.

Successful Wi-Fi Dongle Connection

After a few days rest and looking again at the open tab on my iPad, I decided to give the WiFi dongle another go. A more sober reading of Nathan Wittstock's instructions on getting WiFi on a headless Raspberry Pi led to moving some lines in /etc/network/interfaces around and commenting out some lines in /etc/wpa_supplicant/wpa_supplicant.conf. After a reboot, I connected to the internal IP address I associated with the WiFi dongle and voila! I'm connected. Taking out the Ethernet cable confirms it. That means being able to take the Raspberry Pi unit away from the bedroom (where the router lives) and into the office to hack away more efficiently on getting the Bluetooth dongle working.

Failed Dongle Connections

No luck tonight on getting my Bluetooth and Wi-Fi USB dongles working. Despite the excellent instructions by James Nebeker and David G. Young on getting the software setup, my dongle does not support Bluetooth LE to begin with. If you're getting

Can't set advertise mode on hci0: Connection timed out (110)

...after you've arrived at typing in

hciconfig hci0 leadv 3

...the best explanation I can offer is that your Bluetooth dongle doesn't support LE.

The end goal here is to make a beacon where stuff happens (the opening up of possibilities) based on my proximity to my Raspberry Pi, as determined by my iPhone 5. The following look useful once I get the proper dongle:

Once I get a dongle that's compatible with LE, that is. At least I won't have to do the Bluez software compilation again.

Connecting the Wi-Fi dongle was met with the same result: a failure to connect. On the plus side, some learning about how I can setup my network, and a apt-get update and a apt-get upgrade to get the latest and greatest of everything.

I found the following links helpful:

I'm grateful to my past self for properly setting up the Ethernet connection with a static IP address, an entry in ~/.ssh/config on my laptop, and SSH keys. This ensured that any mistakes made to my networking settings would be confined to the wlan0 section and not lock me out of my Pi.


Early this morning, unable to sleep, I finished reading Raspberry Pi Networking Cookbook. Late last week, I installed the Uncomplicated Firewall via the command line, doubly making sure that SSH was enabled. Otherwise making I wouldn't be able to access it through the network and would have to set up the thing again. I also installed whois to do quick checks if a domains is available from my phone if need be without having to resort to SSHing into my California-based VPS. The final recipe of the book has us making the Raspberry Pi a wireless access point, and lacking the hardware necessary, I'm putting that one off. The list of software installed is up to date, and I plan on adding a page listing the hardware connected to my unit.

Shared Folder

Finder Shared sidebar with my Raspberry Pi 'ix' listed

Reading the chapter on sharing folders from other computers from Raspberry Pi Networking Cookbook this morning, I decided to do the opposite: share my Raspberry Pi over my local network with my Mac. Henrik Jachobsen has some easy-to-follow instructions, and there it is, my Raspberry Pi! (I named it Ix as an homage to Ford Prefect of The Hitchhiker's Guide to the Galaxy.) I followed the instructions exactly, except that I used Emacs, of course, and added Samba to the list of software I've installed on my Raspberry Pi. Did I mention that I have a list of software I've installed on my Raspberry Pi?

Blinky Light

Along with my Arduino mission accomplishments, I wanted to dust off the Raspberry Pi that had been sitting unused for over a year. After much yak shaving to get the OS installed, I set it aside while trying to figure out a way to see anything. Recently, a friend tipped me off about a Raspberry Pi getting started night at the Vancouver Hack Space.

It was a fun atmosphere. In the introductory blog post for the event, the hackspacers recommended that we might need our own keyboard and mouse. Not having a USB keyboard, I secured one from Vancouver's Free Geek (as well as a composite wire), then proceeded to the hackspace (with a detour to Hawker's Delight for dinner) to get setup. I did not need the keyboard, as there was a keyboard at the station to get the Raspberry Pi's OS initially setup and to determine the IP address assigned to it on the network.

Raspberry Pi OS welcome screen

Raspberry Pi

Once hooked back up to the network and headless (not hooked up to a monitor), I was able to SSH through the Vancouver Hack Space's network to the Pi in and download the WebIDE software. Borrowing some lead wires and an LED, and after some initial confusion about where I was to get the Python code responsible, I was able to successfully blink an LED light.

The next day, I hooked the Raspberry Pi to my TV at home (with the aforementioned composite wire). And it booted!

Raspberry Pi booted on my TV

With a long ethernet cable, I hooked the Pi to my local network (which is nothing more than an Airport Extreme router). After using the same method as at the hackspace to determine the IP address on the local network, I unhooked the TV and the long wire, and hooked up a shorter Ethernet cable to the router. Following that, I was able to SSH into the Pi via my laptop as well as my iPad. Copying over some SSH keys and adding a section in ~/.ssh/config I'm able to login without a password.

Ideas for what's next:

  • Punch a hole in the firewall so that the Pi can accept inbound connections from the Internet, or probably just my VPS located in California
  • Create a daemon that responds to pings from my VPS every time a specified action occurs.
    • My first idea for the "specified action" is a unique visit to my website. (I get few enough visits that there should be measurable time between the action.)
  • Write code on the Pi to light up an LED when that action occurs. Bonus points for fade in/fade out.
  • Have the Raspberry Pi interact wirelessly, either with my home network or directly to my iPhone. Products like a combo Bluetooth/Wi-fi adatpter look interesting.

I have two short books that should also dislodge some ideas from my brain: Raspberry Pi Networking Cookbook by Rick Golden and the Getting Started with Raspberry Pi by Matt Richardson and Shawn Wallace. Like with my Arduino missions, I'll stick closely to the book at first, jotting down plans for more adventurous configurations as I go along.

Richard Eriksson's Gravatar

Richard Eriksson

Weekly Raspberry Pi experiments, endeavours, and excitement!

Twitter: @sillygwailo