MikelC
Posts: 2
Joined: Thu Jul 18, 2013 7:08 pm

WiFi data encryption AES and WAP2

Thu Jul 18, 2013 7:51 pm

I am trying to setup my WiPi dongle without success with data encryption for AES and WPA2-PSK which is supported by the h/w (according to its data sheets), but does not seem to be supported by the driver s/w. My SSID is captured OK, though.

When trying to configure with the GUI WiFi Configuration program, there was no selection for AES or WPA2-PSK. I have tried writing the wipi configuration file (the GUI setup: wpa_supplicant.conf) with the following code:
Network={
Ssid="MIC" my ssid
Key_mgmt=WPA2-PSK
group=CCMP
pairwise=AES
proto=WPA2
psk="encryptionkey"
}
But still does not connect to my home wif (home IP Address is Dynamic (WAN)
Mike

klricks
Posts: 4705
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: WiFi data encryption AES and WAP2

Fri Jul 19, 2013 1:15 am

If you router encryption is set to AES then set the encryption on the RPi to CCMP.

The Config GUI really should show something like CCMP(AES) in the menu choices. Confusing to many people the way it is as there is no reference to AES at all. I figured it out by Googling AES and it came up many times the 2 terms used together or synonymously.

This is my conf file as written by the WIFI Config GUI....

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="myssid"
        psk="mypasskey"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: WiFi data encryption AES and WAP2

Fri Jul 19, 2013 3:08 am

Alternatively don't use the wpa conf file at all, and place the SSID and PSK straight into /etc/network/interfaces (assuming you're using Raspbian)

Code: Select all

auto wlan0
iface wlan0 inet dhcp
wpa_ssid SSID
wpa_psk PSK
Last edited by SirLagz on Thu Aug 08, 2013 4:52 pm, edited 1 time in total.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

MikelC
Posts: 2
Joined: Thu Jul 18, 2013 7:08 pm

Re: WiFi data encryption AES and WAP2

Sat Jul 20, 2013 7:52 pm

My USB WiPi is now up and running.

Thanks for your help!
MikeC
klricks wrote:If you router encryption is set to AES then set the encryption on the RPi to CCMP.

The Config GUI really should show something like CCMP(AES) in the menu choices. Confusing to many people the way it is as there is no reference to AES at all. I figured it out by Googling AES and it came up many times the 2 terms used together or synonymously.

This is my conf file as written by the WIFI Config GUI....

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="myssid"
        psk="mypasskey"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}

paddypower
Posts: 1
Joined: Thu Aug 08, 2013 9:53 am

Re: WiFi data encryption AES and WAP2

Thu Aug 08, 2013 11:27 am

Been hunting for this for ages.. Finally got exactly the right setup, thankyou for your guidance.
My problem was the wifi connecting fine to WPA access points, but failing when accessing a WPA2 & AES encryption point.

I'm running Squeezeplug, which has a walkthru interface to set this up, but it wouldn't work on this setup. So into /etc/wpa_supplicant/wpa_supplicant.conf I went.. and fiddled..

Seems like the key is to change pairwise and group to "CCMP",

trl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="network name"
psk="password"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
auth_alg=OPEN
}

Logged in and works a treat now!

D

pilukas
Posts: 9
Joined: Tue Sep 03, 2013 6:06 pm

Re: WiFi data encryption AES and WAP2

Tue Sep 03, 2013 6:25 pm

Hi!
I'm in the very same situation here. I tried through the GUI and through etc/network/interfaces and neither options worked :( I reset to (what I think is) default so now it looks like this:

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp
I tried the wpa_supplicant, it shows installed and in the newest version, but there is no /etc/wpa_supplicant/wpa_supplicant.conf file (or folder) to modify :(

The moment I drop all the security the device works properly (and the device appears active in wlan0)

Thanks for any input and help :)

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: WiFi data encryption AES and WAP2

Wed Sep 04, 2013 1:30 am

Use the following stanza for wlan0

Code: Select all

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid <ssid here>
wpa-psk <psk here>
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

pilukas
Posts: 9
Joined: Tue Sep 03, 2013 6:06 pm

Re: WiFi data encryption AES and WAP2

Wed Sep 04, 2013 5:12 pm

SirLagz wrote:Use the following stanza for wlan0

Code: Select all

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid <ssid here>
wpa-psk <psk here>
Should I add some code for the AES encryption? I think I added all, but something could be missing as it's not working :(

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: WiFi data encryption AES and WAP2

Thu Sep 05, 2013 1:04 am

pilukas wrote:
SirLagz wrote:Use the following stanza for wlan0

Code: Select all

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid <ssid here>
wpa-psk <psk here>
Should I add some code for the AES encryption? I think I added all, but something could be missing as it's not working :(
Nope, the wifi stick will automagically figure out how to connect.
Are you sure ssid and psk is correct ?
Is the network a 2.4ghz network or 5ghz network ?
What USB stick do you have ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

pilukas
Posts: 9
Joined: Tue Sep 03, 2013 6:06 pm

Re: WiFi data encryption AES and WAP2

Thu Sep 05, 2013 10:05 am

Nope, the wifi stick will automagically figure out how to connect.
Are you sure ssid and psk is correct ?
Is the network a 2.4ghz network or 5ghz network ?
What USB stick do you have ?
I'm sure about the ssid and psk, I tried both within quotation marks and without (which one is the standard way? I don't know)
The network is a standard 2.4ghz
My USB stick is the "official" Wi-Pi and works ok when I drop the security, so it has something to do with the config file :/
I tried through the GUI too, pointless. The thing is the GUI fill my PSK pass with more * than it should have :/

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: WiFi data encryption AES and WAP2

Thu Sep 05, 2013 12:53 pm

pilukas wrote:
Nope, the wifi stick will automagically figure out how to connect.
Are you sure ssid and psk is correct ?
Is the network a 2.4ghz network or 5ghz network ?
What USB stick do you have ?
I'm sure about the ssid and psk, I tried both within quotation marks and without (which one is the standard way? I don't know)
The network is a standard 2.4ghz
My USB stick is the "official" Wi-Pi and works ok when I drop the security, so it has something to do with the config file :/
I tried through the GUI too, pointless. The thing is the GUI fill my PSK pass with more * than it should have :/
Can you paste the /etc/network/interfaces file after you've obfuscated the psk ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

pilukas
Posts: 9
Joined: Tue Sep 03, 2013 6:06 pm

Re: WiFi data encryption AES and WAP2

Thu Sep 05, 2013 6:59 pm

My interfaces file looks like this

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid ******
wpa-psk ******

iface default inet dhcp
I tried several combinations though, even deleting everything not wlan0 related :/ The ssid setup is hidden, by the way (if it helps in any way)

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: WiFi data encryption AES and WAP2

Fri Sep 06, 2013 1:08 am

Hidden SSID causes issues.
Don't use hidden SSIDs.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

pilukas
Posts: 9
Joined: Tue Sep 03, 2013 6:06 pm

Re: WiFi data encryption AES and WAP2

Fri Sep 06, 2013 8:24 am

Oh, thank you
It's not in my power to change that status though :(

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: WiFi data encryption AES and WAP2

Fri Sep 06, 2013 8:29 am

pilukas wrote:Oh, thank you
It's not in my power to change that status though :(
Bugger.
In that case, change the configuration to use a configuration file
Similar to how this is set up - http://ubuntuforums.org/showthread.php?t=1659866
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

pilukas
Posts: 9
Joined: Tue Sep 03, 2013 6:06 pm

Re: WiFi data encryption AES and WAP2

Fri Sep 06, 2013 8:37 am

Thank you, I'll look into that and try the wifi manager to set it up to non-hidden :?

pilukas
Posts: 9
Joined: Tue Sep 03, 2013 6:06 pm

Re: WiFi data encryption AES and WAP2

Fri Sep 06, 2013 8:48 am

I got the manager to show the ssid and I got it work smoothly, thank again ;)

skyte
Posts: 1
Joined: Fri Jan 10, 2014 9:42 pm

Re: WiFi data encryption AES and WAP2

Fri Jan 10, 2014 9:51 pm

Hi, I've just got a Raspberry Pi from Maplins.
All is seems to be fine apart form the wifi... I'm trying to connect to a BT Home Hub.
WPA & WPA2 with AEP encryption.
Unfortunately there is no option for AEP on the Pi wifi GUI but I read in this post that CCMP is fine.
The GUI didn't seem to be able to connect at all and would crash, losing all ability to even scan for networks.
I then edited \etc\wpa_supplicant\wpa_supplicant.conf as per the post above. Now the wifi GUI current status is showing...
status: Completed (station)
Last Message: - Connection to [some letters and numbers] comple
Authentication: WPA2-PSK
Encription: CCMP + TKIP
SSID: BTHubxxx
BSSID: [some letters and numbers]
IP Address: [BLANK] although one did flash up for about a second!

This all goes blank then status goes to scanning >> Associating >> completed

My home hub shows that the Pi has connected but it seems like the connection doesn't last for long.

I can't get any internet access :(

Has anyone had any luck connecting a Pi to a BT Home Hub?

aceuser
Posts: 1
Joined: Sun Jun 29, 2014 9:41 pm

Re: WiFi data encryption AES and WAP2

Sun Jun 29, 2014 9:49 pm

The followings work for my TP-LINK wifi dongle. I think the theory should work for all wifi adaptors.

From the troubleshooting, I found that...
* wpa_supplicant does not work with dhcp.
So there is no point to setting wlan0 to "iface wlan0 inet dhcp" in /etc/network/interfaces.
It will not work. You see the error message in the boot up.
* Because of that, all the settings are fine. But because there is no dhcp, wlan0 is running but no IP address.
This is confusing. We thought wlan0 was not working completely.
* If you use "ifup wlan0", there are some problems caused by the fact that wlan0 is already up and running.
You need to do "ifdown" and then "ifup". But this down-up is causing other problems, which makes it impossible
to do "ifdown-ifup" in the "/etc/rc.local" auto start script.
* The way you really want is not to start wlan0 automatically.
That is, we need to comment out "auto wlan0" in the /etc/network/interface.
The command "wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf" in the "/etc/network/interface" will start wlan0 for you.
* Now that we only have one wlan0 (wpa_supplicant) running. We can then run "dhclient" command in the "/etc/rc.local" startup script,
because "wpa-roam" does not support dhcp, so we need to do it in the startup script with "dhclient wlan0" command.
* When it all works, the bootup will take longer.

anAgent
Posts: 1
Joined: Sun Mar 15, 2015 5:59 pm

Re: WiFi data encryption AES and WAP2

Sun Mar 15, 2015 6:04 pm

My network is setup with WAP2-Personal with AES:

How I solved this was by using was by using the command "wpa_passphrase". I then used the generated psk key to configure my /etc/wpa_supplicant/wpa_supplicant.conf file. The wpa_supplicant.conf file looks like the following:

network={
ssid="ZION"
psk=cThisIsTheGeneratedKey
proto=RSN
key_mgmt=WPA-PSK
pairwize=CCMP
auth_alg=OPEN
}

I hope that helps someone as it took me a few hours of all the different forms just to get this to work. :cry:

Asdfgh1995
Posts: 4
Joined: Thu Apr 21, 2016 2:32 pm

Re: WiFi data encryption AES and WAP2

Thu Apr 28, 2016 4:21 pm

klricks wrote:If you router encryption is set to AES then set the encryption on the RPi to CCMP.

The Config GUI really should show something like CCMP(AES) in the menu choices. Confusing to many people the way it is as there is no reference to AES at all. I figured it out by Googling AES and it came up many times the 2 terms used together or synonymously.

This is my conf file as written by the WIFI Config GUI....

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="myssid"
        psk="mypasskey"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}
So I see some of this code on my own pi finally but it is a model 3 B so i dont need to fight with an adapter but I am still having issues. Should I copy all of this into my own file word for word because some of the lines I dont know and I am not sure if I have to put it in for my particular network. For example my key management according to my router now is WPA2-PSK(AES) and that AES on a pi becomes CCMP and I am not even seeing the pairwise line on my pi yet.

So how closely should I follow these codes and should I tweak the WPA-PSK to WPA2-PSK?

Return to “Troubleshooting”

Who is online

Users browsing this forum: codybrix, Yahoo [Bot] and 85 guests