MY LOGIC Supply UWN200 HOW to! This fixes ANY intermittent WIFI issues with the BeagleBone!

Hi,

I purchased a beaglebone black because I thought it would make a really cool robotic controller. I picked up a UWN200 usb wifi adapter from logic supply and followed their howto to the letter.
IT will not work with WPA2 encryption. My wifi is encrypted. I live in a rural area but still… it’s better to protect yourself. When I configured the /etc/Wireless/RT2870STA.dat properly (according to my notes) I was still dissapointed by the rt_ioctl_gwiscan errors with the wifi occuring every two minutes. Note… this problem isn’t unique to the BeagleBone. It’s prevalent in many of the RTALINK drivers. You need the latest and greatest source tree to fix the mt7601 driver. So go here:
http://www.mediatek.com/_en/07_downloads/01_windows.php?sn=501

click on linux and download the latest source for the MT7601U USB driver. Copy the driver source archive your your BeagleBone. I used scp. on your beaglebone run opkg install kernel-dev.
untar the driver source in your home directory… or wherever you are building your source on your BeagleBone… make suure you set a symbolic link from /usr/src/kernel to /lib/modules/($uname -r)/build

run make -C /usr/src/kernel scripts

Now go to the directory you have the driver source in and run make

after you are done run make install

set your root password before you take your next step

NOW… before you reboot you MUST edit the /etc/Wireless/RT2870STA.dat file.

Here is what my config looks like:
beaglebone:/etc/Wireless/RT2870STA# cat *.dat
#The word of “Default” must not be removed
Default
CountryRegion=5
CountryRegionABand=7
CountryCode=USA
ChannelGeography=1
SSID=NFNWireless.SecG
NetworkType=Infra
WirelessMode=9
Channel=0
BeaconPeriod=100
TxPower=100
BGProtection=0
TxPreamble=0
RTSThreshold=2347
FragThreshold=2346
TxBurst=1
PktAggregate=0
WmmCapable=1
AckPolicy=0;0;0;0
AuthMode=WPA2
EncrypType=TKIP
WPAPSK=6cec0f005f18616e1ada0cd8a0ab117ad206bd74b4186b4e4d97aeedf530c9c4
DefaultKeyID=1
Key1Type=0
Key1Str=
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
PSMode=CAM
AutoRoaming=0
RoamThreshold=70
APSDCapable=0
APSDAC=0;0;0;0
HT_RDG=1
HT_EXTCHA=0
HT_OpMode=0
HT_MpduDensity=4
HT_BW=1
HT_BADecline=0
HT_AutoBA=1
HT_AMSDU=0
HT_BAWinSize=64
HT_GI=1
HT_MCS=33
HT_MIMOPSMode=3
HT_DisallowTKIP=1
HT_STBC=0
EthConvertMode=
EthCloneMac=
IEEE80211H=0
TGnWifiTest=0
WirelessEvent=0
MeshId=MESH
MeshAutoLink=1
MeshAuthMode=OPEN
MeshEncrypType=NONE
MeshWPAKEY=
MeshDefaultkey=1
MeshWEPKEY=
CarrierDetect=0
AntDiversity=0
BeaconLostTime=4
FtSupport=0
Wapiifname=ra0
WapiPsk=
WapiPskType=
WapiUserCertPath=
WapiAsCertPath=
PSP_XLINK_MODE=0
WscManufacturer=
WscModelName=
WscDeviceName=
WscModelNumber=
WscSerialNumber=
RadioOn=1
WIDIEnable=0
P2P_L2SD_SCAN_TOGGLE=8
Wsc4digitPinCode=0
P2P_WIDIEnable=0
PMFMFPC=0
PMFMFPR=0
PMFSHA256=0

Save it and reboot

NEXT … fire up a remote x11 session or connect a keyboard and terminal.

I use Xephyr on my mac

In an xterm window run:
Xephyr -ac -screen 1360x768 -query 192.168.0.232 :2

Log in as root. You may not see a configure network icon inthe top right panel on your X11 BeagleBone Desktop. I didn’t but what you want to do is left click in space between the clock panel app and the panel seperator… a network config screen will pop up. clickon your access point SSID… you will be prompted for the passphrase. enter it. Your beaglebone will associate and get an ip. After you get an ip you can check to see if you are getting out. (by the way I used DHCP and on my wifi router I set a dhcp reservation for my beaglebone)

remove your ethernet or usb network cable.

reboot

now… do you remember what you set the dhcp reservation for you beaglebone to ??? ssh to that address.

BTW… here’s my iwconfig and ifconfig info:
beaglebone:/etc/Wireless/RT2870STA# iwconfig ra0
ra0 Ralink STA ESSID:“NFNWireless.secG” Nickname:“MT7601STA”
Mode:Managed Frequency=2.417 GHz Access Point: E0:91:F5:01:7F:4B
Bit Rate=135 Mb/s
RTS thr:off Fragment thr:off
Encryption key:FD28-6047-143D-D262-22B7-AC5B-1000-351C [3] Security mode:restricted Security mode:open
Link Quality=86/100 Signal level:-52 dBm Noise level:-82 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
beaglebone:/etc/Wireless/RT2870STA# ifconfig ra0
ra0 Link encap:Ethernet HWaddr 00:0C:43:00:57:AD
inet addr:192.168.0.229 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:43ff:fe00:57ad/64 Scope:Link
inet6 addr: 2002:4c76:cf64:e472:20c:43ff:fe00:57ad/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30618 errors:0 dropped:0 overruns:0 frame:0
TX packets:858 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7271353 (6.9 MiB) TX bytes:86790 (84.7 KiB)

AND dmesg is clean! no gw_scan errors!

[ 2087.991441] TSSI = 0x52
[ 2087.991484] temperature = 0xFFFFFFFD
[ 2087.991508] PacketType = 0x8
[ 2087.991531] tx_11b_rate: 0
[ 2087.991557] Channel PWR + MCS PWR = 28000
[ 2088.001612] TargetPower: 0x26ccd(158925)
[ 2088.001651] tssi_m_dc: 81
[ 2088.001674] TssiLinear0: 82
[ 2088.001696] TssiDC0: 1
[ 2088.001720] tssi_offset: 0
[ 2088.001742] tssi_offset<<9: 0
[ 2088.001763] TssiSlope: 128
[ 2088.001785] tssi_db: 1220
[ 2088.001806] CurrentPower: 156160
[ 2088.001974] PowerDiff: 2765
[ 2088.002003] final PowerDiff: 0(0x0)
[ 2088.002413] MAC 13b4: 0xc954002a

Soon I hope to be posting my code. My hello worldapp is usingpwmto drive a full color rgb led. You can get them cheap at radio shack. this is a common anode device so that means anode to + supply (3.3v) and r,g,b each through a 220 ohm resistor to the pwm control lines. I disabled HDMI because my beagle bone will never be a desktop.

I’m really excited about this platform! I ordered by 3.3-5v bus line converter… soon I hope to have a 30A brushed motor controller designed with back emf, optical encoder, and accelerometer feedback. (I want solid dead reckoning)

I hope this posting helps all of you out there with wifi issues.

Your post is great. Before I found it, I did manage to get my UWN200 going by following the directions at the LogicSupply product page at http://www.logicsupply.com/components/networking/wireless/uwn200/

I followed all the directions EXCEPT for the “opkg upgrade” and it finally worked for me.
Interestingly, the adapter loses its IP address after a while (like overnight).
I want to use dhclient, but that command is apparently not in the Angstrom command set.
I’m trying to find another way to kick the adapter without rebooting the BBB.

Gary

If you’re on Angstrom the put this is your .profile to kick wifi:

(cd /var/lib/connman ; /usr/lib/connman/test/test-connman connect wifi_*)