When a web developer decides to play with hardware. Playing around with the Intel Galileo part 1: connecting the Galileo to a wifi

As web and occasional android developer I do not get to play a lot with hardware boards and such, but two weeks ago someone gave me and arduino uno and showed me some of the examples. I have imagined that even the basic stuff was harder and a newfound curiosity for learning how to use this kind of thing was born on me. So when I heard at MWC that Intel was showing its new Internet of things platforms, Galileo and having a workshop where I may be able to get one I jumped (quite literally) at the opportunity.

The galileo is a little marvel that runs an x86 intel quark processor and that is cable of booting full linux and running node.js, meaning that I can play with the hardware without the needed of dusting off my C skills and do some other network-related things with it.

Thankfully, the good guys at intel included an Intel Centrino Wireless-n 135 wifi card that connects to the mini PCI Express port under the board, so the first challenge was too make it connect to a wifi network, which after reading dozens of blog posts, forum threads and linux guides was harder than I expected. Here is a dumb step by step guide of how I ended making it work:

Note: I am using the galileo with full linux running from the sd card.

But first, a short guide about communicating with the Galileo

The galileo has many ports that could be used to control it from your computer, but the simplest one to start with is the serial port that looks like a headphone 3.5 mm input. Since many people do not have a serial port now a days you will need a pair of cables to connect to it which you can buy or make (as this forum thread explains).

Once you have the usb to serial and serial to 3.5 mm connected you can use minicom to connect to the galileo trough terminal and play around with it. For reference, here is the minicom configuration file I use for it. All you need to do is put this file into /etc/minicom and run minicom as root or superuser and you should connect without problem. After establishing a connection I recommend you play with the network configuration so you can ssh into the galileo. In my experience the serial connection is good for simple things but it has… complications with several programs.

In order to give the ethernet port a static ip edit the /etc/network/interface, where the configuration for all your network interfaces is. Make sure the eth0 configuration says something like:

auto eth0
iface eth0 inet
static address

This will assure us that eth0 will have the address every time the galileo boots up. You could try restarting the networking service but the new address will not stick until we get rid of connman. More on that later. For now set it manually with:

ifconfig eth0 netmask

Make sure you configure the Ethernet interface in your computer to an address like, then you can ssh to the galileo and we do not need the minicom connection any more.

Connecting to wifi

If you use WPA encryption in your network, like I do, we are going to need to use wpa_supplicant. On the galileo, run:

root@clanton:~# wpa_passphrase WIFINAME << EOF > /etc/wpa_supplicant.conf

Substitute WIFINAME with the name of your… err, wifi, and YOURPASSWORD with the password. I am remaining you just in case.

Before we can make the connection, it turns out connman has a bug which causes the galileo to authenticate and deautenticate from the wifi in an infinite loop. The solution, according to this thread, is to kill it. So go ahead and run:

killall connman

and just to be sure, lets remove the init script

rm /etc/init.d/connman

With that out of the way, lets connect:

wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf

If you have configured everything properly the wifi should be autenticated by now. All you ned is to trigger the dhcp. Run

ifup wlan0

Check with ifconfig, but you should be connected at this point.

Here is a list of links that I went trough in my search for answers:


An upcoming web developer and android app-maker with an interest on using reliable tech in creative ways, open source projects and start-ups.

Tagged with: , ,
Posted in developer tips

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: