Solving WiFi encrypted access with RT2860sta linux driver

March 25, 2010

I upgraded my Ubuntu to a beta release of Ubuntu 10.04 (Lucid). I have a MSI u100 wind netbook so I have downloaded the remix version.

The most troubles I had with making my Wifi adapter (with Ralink RT2860 chip) to work in encrypted mode (I use WPA2). Apparently the adapter and driver worked with non-encrypted (public) access points but not with my home (and else where) encrypted access points. I took me a while to solve this problem, so I share what I have found to prevent that you will loose so much time too. My solution is based on an older post on ubuntuforums.

Here is how I did it:

1. you must install build-essential (apt-get install build-essential).
2. Run “apt-get update”.
3. And run “apt-get install build-essential”.
4. Downloading the latest drivers…ort/Linux.html

5. Extract the archive you downloaded.
6. Open a terminal.
7. Go into the folder you extracted (For me: 2010_01_29_RT2860_Linux_STA_v2.3.0.0 )
8. Use gedit/nano/nedit (the editor of your liking) and open Makefile (“gedit Makefile”)
9. Watch where the MODE is set to STA (“RT28xx_MODE = STA”) and TARGET is set to LINUX (TARGET = LINUX) save and close.
10. go to directory the os/linux (“cd os/linux”)
11. Open (“gedit”)
12. Change following lines
# Support wpa_supplicant

# Support for Native WpaSupplicant Network Maganger


# Support wpa_supplicant

# Support for Native WpaSupplicant Network Maganger

13. Save and Close
14. Return to directory 2010_01_29_RT2860_Linux_STA_v2.3.0.0 (“cd ../..”)
15. Run make. (“make”).
16. If you have (a faulty) driver module for your Wifi running then
stop the wireless (“sudo ifconfig wlan0 down” or “sudo ifconfig ra0 down”). BTW, you can see all your network adapter by typing “ifconfig”
17. Remove the module (“sudo rmmod rt2860sta”)
18. Run make install as root (“sudo make install”)
19. Visit the os/linux (“cd os/linux”)
20. Run insmod rt2860sta.ko
21. Connect to wireless access point: “sudo ifconfig wlan0 netmask broadcast up”
22. If you want the Wifi to work next time you boot cp the new module to the location its loaded from: “sudo cp rt2860sta.ko /lib/modules/2.6.32-17-generic/kernel/drivers/staging/rt2860/.”
23. Check if you have the new module “modinfo rt2860sta” it should give back the right version nr you compiled. In my case:

filename:       /lib/modules/2.6.32-17-generic/kernel/drivers/staging/rt2860/rt2860sta.ko
license:        GPL
srcversion:     73F7AA771D91BB10E13F38D
alias:          pci:v00001432d00007768sv*sd*bc*sc*i*
alias:          pci:v00001432d00007748sv*sd*bc*sc*i*
alias:          pci:v00001432d00007738sv*sd*bc*sc*i*
alias:          pci:v00001432d00007727sv*sd*bc*sc*i*
alias:          pci:v00001432d00007758sv*sd*bc*sc*i*
alias:          pci:v00001432d00007728sv*sd*bc*sc*i*
alias:          pci:v00001432d00007708sv*sd*bc*sc*i*
alias:          pci:v00001A3Bd00001059sv*sd*bc*sc*i*
alias:          pci:v00001814d00000781sv*sd*bc*sc*i*
alias:          pci:v00001814d00000701sv*sd*bc*sc*i*
alias:          pci:v00001814d00000681sv*sd*bc*sc*i*
alias:          pci:v00001814d00000601sv*sd*bc*sc*i*
vermagic:       2.6.32-17-generic SMP mod_unload modversions 586
parm:           mac:rt28xx: wireless mac addr (charp)

I hope this worked for you too!


Sensors, Actuators, and Displays

March 12, 2010

The goal of this class (nr.10) assignment is to “interface an input device with an output device”.

For this Fab Academy assignment about “Sensors, Actuators and Displays”, I am building a model of a Segway vehicle. Segway model will contain a tilt sensor that can mesure the angle of the vehicle from the vertical. The mode of operation should be that the segway should stay straight up. If the Segway is falling forward, the motors should drive it forward such that it remains straight up. Like wise, if the Segway should fall to the back: the motors should drive the vehicle backward. All in all it is a control operation that should balance the Segway vehicle. If one should push the Segway such that it inclines forward or backward continuously, the vehicle will continue to drive forward or in reverse. This is the main operation of the Segway.

I was so inspired by Neil Gershenfeld talk about the stepresponse sensors that I intend to build such a sensor. In order to fullfil this assignment I thus have to make the angle detection sensor, and would like to build the Segway model out of Plexiglass. This can easily be done with the laser cutter.

I have started to model the the Segway model in Blender. Below an impressions of the work in progress.

The mechanical design in plexiglass also contains a stand where the vehicle can be store in rest, and that is also suitable to calibrate the angle sensor.

The angle sensor is constructed as free hanging half circle (in 3mm plexiglass) that will naturaly be hanging down as the earths gravity pulls it down. It’s sides will be covered with thin coper surface. The free hanging half circle is suspended in a circular cage of plexiglass that is constructed from 4mm plexiglass plates. The sides of the cage will be covered with thin coper plates as well. There are two options for the variable capacitor, and hence the stepresponse, to work:

1). The half circle plate in the middle is disturbing the field of the two outer plates suficiently to detect an angle change. This is the prefered solution as it does not require any electrical connections to the middle moving part.
2). The half cicle plate is an active connected conductor of the capacitor and should be connected electically.

Besides the angular sensor, I intend to experiment a bit with another type of stepresonse sensor: a accelormeter. This sensor will be build in the front of the vegicle. It will also consist of 3 condensator plates. Those plates will all be active and together these 3 condensator plates will form 2 condensators. The middle plate will be a free hanging plate constructed from thin copper and will move to the front and the back as the vehicle moves. This sensor is experimental and probably not directly necessary for the operation of the Segway model.

The mechanical and sensor construction has been drawn completely in Blender. The laser cutter files have been made by exporting 2D files from blender in DXF format and importing them in Inkscape. In Inkscape the DXF files had to be adjusted in size (scale to blender dimensions), made a path and be combined, and the line width (stroke style) set to 0,001mm. When cutting the plexiglass this SVG file will be imported in Adobe Illustrator. Below you can find the 2D images used for the laser cutter and the vinyl cutter (to cut the copper sheets for the condensator sensor plates).

mechanical parts of Segway model

moving parts of angle sensor

copper sheet parts (to be cut out with vinyl cutter)

For the electronics I would like to implement this design with the following materials and constraints:
– 2 DC motors: they should be able to turn independly (for perhaps later to add functionality) and run forward and reverse.
– A ATtiny44 microcontroller
– The angular sensor based on step response (requires 2 ADC inputs and 2 “type?” outputs (or can they both be driven with the same output step signal?))
– USB communication for calibration of the sensors (can the ATtiny44 provide for USB communication and do the Segway control simultaniously?)
– 1 or 2 buttons for switching between on/of and calibration mode and operation mode
– a 5 volt regulator and a 9 volt battery
– H-bridge needed for the control of the DC motor in forward and reverse direction

Next step: design of electronic circuitry based on the above requirements and development of (assembly) code for the microcontroller.

To be continued…


December 3, 2009

Welcome dear visitor!

I just opened this blog website today. Today is December 3rd 2009!

This Blog will present my experiences with the Fab Academy. The Fab Academy teaches the MIT’s rapid-prototyping course “How To Make (almost) Anything” of Professor Neil Gershenfeld in “Fab Labs”. Fab labs began as an outreach project from MIT’s Center for Bits and Atoms (CBA), and spread around the world (see list of Fab Labs: List of Fab Labs). If you want to know more about the Fab Academy, read here further.

Stay tuned for my assignment reports and my experiences.