wireless usb ubuntu (annoying connection)

Hi, Im installing a usb D-LINK DWL G122 (rt73 chip) wireless dongle
on my beaglebone with ubuntu.
Just added in /etc/network/interfaces file the following

auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid my_ap_name
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk my_hex_key

After this a reboot or network restarting my wireless dongle has
connected automatically to AP (kind of miracle)
But not all things are good news.
The network is working nice but some in time(sometime hours other
minuts) it stops give access to that wlan0 IP, but the dongle is still
connected to the AP.
In some experiments I configured both interfaces eth0 and wlan0 to
have access to my bone ssh in case of the wireless is down.

After losing contact by wireless, i get in into my beagle ssh by eth0
interface IP, after doing a ifconfig the wla0 is still present with
IP, doing a iwlist wlan0 scan, it searchs for wireless networks with
success, but still have no access to ssh by IP of wlan0.

doing a ifconfig wlan0 down than ifconfig wlan0 up, the wireless is
working again fine, but for some time until losse access to its IP
again(sometimes houres other minutes)

This kind of more or less working drives anyone crazy

Any help or sugestions are welcome


Try to specify the BSSID MAC addresss for your network, this works for
me in my case.

Check out my issue here:

Hi, did not try it yet, but i found that the problem is related to key
renewal interval
There is a setting on all routers for wireless wpa, that the key is
renew, the default is 3600s after that time the connection still up
but no more access to wlan0 IP.
I ve changed that time for test 99999s and the connection was ok for
the 27hours (99999s)

Is there any one experiencing this situaion?
Or any way to solve this key renewal?