USB WiFi adapter and WPA2
Moderators: adafruit_support_bill, adafruit

USB WiFi adapter and WPA2

by zhiquan.yeo on Fri Jun 01, 2012 10:20 pm

I'm trying to configure my BeagleBone to connect to a WPA2-Personal secured network. I tried setting the 'Security = ' line to 'wpa2', 'wpa2-psk', 'psk' and 'wpa2-personal' but i can't seem to establish a connection. Any thoughts?'
zhiquan.yeo
 
Posts: 1
Joined: Fri Jun 01, 2012 10:17 pm

Re: USB WiFi adapter and WPA2

by sbma44 on Wed Jun 06, 2012 10:25 pm

bumping this. add 'rsn' to the list of things tried -- no luck so far.
sbma44
 
Posts: 2
Joined: Wed Jun 06, 2012 10:23 pm

Re: USB WiFi adapter and WPA2

by adafruit on Thu Jun 07, 2012 6:32 pm

if WPA works but WPA2 does not, you should put in an issue with the beaglebone team - this is a problem with the underlying driver/core not the wifi adapter itself
User avatar
adafruit
 
Posts: 11742
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: USB WiFi adapter and WPA2

by sbma44 on Sun Jun 17, 2012 12:29 pm

OK, but can you confirm what the a working config file *should* look like? AFAICT connman is just about the worst-documented project in existence. I have no idea if "wpa2" should work or not (or if just "wpa" should be sufficient).
sbma44
 
Posts: 2
Joined: Wed Jun 06, 2012 10:23 pm

Re: USB WiFi adapter and WPA2

by adafruit on Sun Jun 17, 2012 3:02 pm

we're not sure - we didnt write connman or support it, there might be other linux packages that can manage a wifi link but thats the only one we know of. we do know that our tutorial example works. we'd suggest testing it with WPA first and seeing if that works, then change settings around
User avatar
adafruit
 
Posts: 11742
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: USB WiFi adapter and WPA2

by nullop on Thu Jun 21, 2012 3:39 pm

Not sure about wpa2, but I can confirm if you're connecting to an open SSID you don't put anything at all for security (I only mention because I couldn't find a document on this either), ie:

root@beaglebone:/sys/class/gpio# cat /var/lib/connman/wifi.config
[service_home]
Type = wifi
Name = guest
root@beaglebone:/sys/class/gpio#

I would assume your attempt at 'rsn' is correct.. Looking at the latest sourc code, these appear to be the valid options:


static enum connman_service_security convert_wifi_security(const char *security)
{
if (security == NULL)
return CONNMAN_SERVICE_SECURITY_UNKNOWN;
else if (g_str_equal(security, "none") == TRUE)
return CONNMAN_SERVICE_SECURITY_NONE;
else if (g_str_equal(security, "wep") == TRUE)
return CONNMAN_SERVICE_SECURITY_WEP;
else if (g_str_equal(security, "psk") == TRUE)
return CONNMAN_SERVICE_SECURITY_PSK;
else if (g_str_equal(security, "ieee8021x") == TRUE)
return CONNMAN_SERVICE_SECURITY_8021X;
else if (g_str_equal(security, "wpa") == TRUE)
return CONNMAN_SERVICE_SECURITY_WPA;
else if (g_str_equal(security, "rsn") == TRUE)
return CONNMAN_SERVICE_SECURITY_RSN;
else
return CONNMAN_SERVICE_SECURITY_UNKNOWN;
}


It's unclear to me that if you use RSN if it wants the ascii pass phrase you've specified or the hexadecimal conversion that's salted with the ssid.
nullop
 
Posts: 22
Joined: Tue Feb 09, 2010 2:38 am

Re: USB WiFi adapter and WPA2

by ow3n on Fri Jul 06, 2012 12:57 am

Here is my connman config:

Code: Select all | TOGGLE FULL SIZE
#cat /var/lib/connman/wifi.config
[service_home]
Type = wifi
Name = <router-name>
Security = wpa2
Passphrase = PASSWORD


But I also have a wpa_supplicant.conf which I think conman is using instead, and which uses: "WPA-PSK"

Code: Select all | TOGGLE FULL SIZE
# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
network={
        ssid="<router-name>"
        scan_ssid=1
        proto=RSN
        pairwise=CCMP TKIP
        key_mgmt=WPA-PSK
        psk=d8cddca582e46e1f27b4123eb519ab9a36b068e71d3861fcab4f1bb3699f9062
}
ow3n
 
Posts: 2
Joined: Wed Jun 20, 2012 9:04 pm

Re: USB WiFi adapter and WPA2

by JakeJake on Mon Jul 09, 2012 3:49 pm

I had WiFi working on my BBone last weekend. I set "security = wpa" and though my Apple Airport Extreme (AE) is set for WPA2, once I disabled access control in the AE (it was locked down by MAC address) the BBone connected fine, provided I stayed close to the AE.

If I enabled Access Control and added the BBone's MAC, it would not connect.

I was not trying to use any keys. Only the router SSID and Password. As stated earlier, I don't think the BBone supports WPA2.
JakeJake
 
Posts: 8
Joined: Mon Jul 09, 2012 9:53 am