Hi guys, how do you configure this kind of adapter?

I myself use this:
Code:
iwconfig wlan0 essid MY_ESSID
iwconfig wlan0 mode managed
iwpriv set Channel=1
ifconfig wlan0 192.168.xxx.2 netmask 255.255.255.0 up
route add default gw 192.168.xxx.3
echo "nameserver 192.168.y.y" > /etc/resolv.conf
echo "nameserver 4.y.y.3" >> /etc/resolv.conf
but it might be wrong. that's the reason i open this topic, make us discover the better way.