Building a Rover project day 3-4 – wifi

Important note: This steps were validated on the following Angström version:

Angstrom-Cloud9-IDE-eglibc-ipk-v2012.01-core-beaglebone-2012.01.11.img.gz

For later versions the classic Linux utilities are controlled by connman so this tutorial will fail to work.

So we managed to set up the cheap wifi stick. I have no idea about it’s name,  the chipset is ZyDas1211.

If you are unsure what chipset your wifi stick has, open it up and check the chip.

Read this post for more on this topic.



Let’s install the necessary packages.

root@beaglebone:~# opkg install wireless-tools
root@beaglebone:~# opkg install dhcp-client
root@beaglebone:~# opkg install kernel-module-zd1211rw 
root@beaglebone:~# opkg install kernel-module-mac80211

So far so good but you are still missing the firmware files. There is a package for them in Angström(for some versions), which can be installed like this:

  • root@beaglebone:~# opkg install zd1211-firmware

OR if it says “unknown package”, we can do a bit of workaround.

You should download it from here and put the folder named zd1211 in your /lib/firmware/zd1211. 

To do so you can call something like this after decompressing the downloaded archive:

  • root@beaglebone:~# mkdir /lib/firmware/zd1211
  • me@laptop:~/unzip/zd1211-firmware$ scp * root@192.168.0.111:../../lib/firmware/zd1211

Now that you have the firmware you can try activating the device:

root@beaglebone:~# ifconfig wlan0 up

To scan the available networks:

root@beaglebone:~# iwlist wlan0 scan

And to connect:

root@beaglebone:~# iwconfig wlan0 essid NETWORK_ID key WIRELESS_KEY
You should replace NETWORK_ID with the name of the network (essid in the iwlist output) and WIRELESS_KEY with the password.
root@beaglebone:~# dhclient wlan0
For me this method failed sometimes so in case it’s not working out for you, try what’s written here:
You can be happy now, you have wifi on your BeagleBone!

For guys wandering around the internet trying to hack their own wifi stick onto the BeagleBone:

Considering you have the kernel module you can tell that you don’t have the firmware files by trying to launch the device like this:

root@beaglebone:~# ifconfig wlan0 up
ifconfig: SIOCGIFFLAGS: No such device

And to make sure that it has to do something with the firmware:

root@beaglebone:~# dmesg | tail
[24708.387603] usb 1-1: Could not load firmware file zd1211/zd1211_ub. Error number -2
[24708.395721] zd1211rw 1-1:1.0: couldn't load firmware. Error number -2

And of course, check the reference links I used to get the wifi up’n’running to get more ideas.

References:

http://roblg.com/blog/2012/02/Belkin-F5D7050-Beaglebone/

http://www.backtrack-linux.org/forums/showthread.php?t=40582

http://www.cyberciti.biz/faq/add-remove-list-linux-kernel-modules/

http://www.cyberciti.biz/faq/inux-kernel-where-to-find-modules/

http://www.ghacks.net/2009/04/14/connect-to-a-wireless-network-via-command-line/

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s