Raspberry Pi & WLAN

When working with the Nikon D90 last night, and using my Raspberry Pi as the time-lapse controller, one thing I was dearly missing was SSH Access to the Raspberry Pi on my balcony… but the WLAN Stick that I had at hand would not work with the box… so I ordered a new one quickly: en EDIMAX nano USB Adapter (which is supposed to work right with the Raspbian installation without any need for additional drivers or firmware). Plugged it in, started the box, and logged in (via regular LAN).

Once connected, you can check if the stick has been recognized – the command is

dmesg

And here is the result:

Image 01 - USB Stick recognized

So that worked… next, we need to check the network devices:

ifconfig

And yes, the Raspberry shows the new network device, wlan0:

Image 02 - ifconfig with new wlan0

As you can see, the wlan0 interface does not have an IP Address (yet) – in order for that to work, we need to tell the system to which WLAN to connect – as superuser, edit /etc/network/interfaces.

sudo nano /etc/network/interfaces

There, you can enter (the quick & dirty way!) your SSID and Password (but be careful, it is clear-text and can be read by anyone gaining access to the Raspberry Pi!)

Image 03 - Configure WLAN

Last but not least, we would like to disable the power-savings of the WLAN Adapter – otherwise, it would be a bit hard to get a connection once it has gone to sleep…

sudo nano /etc/modprobe.d/8192cu.conf

There, you can specify the adapter options:

Image 04 - Adapter Configuration FilePlease keep in mind that the described approach is “quick & dirty” and that there are better ways of working with an encrypted pass phrase for the WLAN… but for now, this works and allows me wireless access to the device.

One final comment: when starting the Raspberry Pi now, it can take a little while till the WLAN connection is established – just allow it some time (about a minute) before thinking that something went wrong!

This entry was posted in Raspberry Pi. Bookmark the permalink.

Leave a Reply

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