Edimax EW-7811UN using WPA_GUI in Raspbian 2012-09-18


16 posts
by MrRicheyRich » Tue Sep 25, 2012 9:49 pm
Hi all,
Although it seems like most people are able to connect wirelessly using the Edimax EW-7811UN, I seem to be having some troubles.

My set up:
Raspberry Pi with Raspbian 2012-09-18 edition
1A power adapter
Logitech wireless keyboard and mouse on USB 1
Edimax EW-7811UN on USB 2
HDMI out

The wireless nano dongle is winking blue so I know it has power, only the WPA_GUI (WiFi Config tool on the desktop) alternates its status between: "Could not get status from wpa_suplicant"; "Disconnected"; and "Inactive". The last message is always, "-signal 15 received".

What is going on? Is there some power interuption or do I have to pre-configure it before I use the config tool?

Thanks,
Rich
Posts: 10
Joined: Fri Sep 21, 2012 3:39 pm
by thogue » Sat Sep 29, 2012 4:00 am
Code: Select all
iwlist wlan0 scan


what are the results of that?

I have had my mini usb power up but just fail to work. in that case it has seen nothing when I scan.

wpa_supplicant not being started is another issue. Try
ifdown --force wlan0;ifup wlan0
should get wpa_suppicant going if you have it configured in /etc/network/interfaces


great way to tell if your pi is having power problems is to hook a multimeter between T1 , T2... I was able to troubleshoot my power issues this way.


replugging my usb mini adapter reboots my pi, but it performs great plugged in from boot
Posts: 131
Joined: Wed Sep 19, 2012 2:16 am
by MrRicheyRich » Thu Oct 11, 2012 5:26 pm
Thanks for the reply, Thogue,
When I type in >iwlist wlan0 scan it says:
"wlan0 No scan results"

When I type the ifdown and up commands it says:
DHCP client .... etc.,
...
Bind socket to interface: No such device
ifup: failed to open statefile /run/network/ifstate: Permission denied

Unfortunately I don't have a multimeter, otherwise I would check the power delivery. Does the above mean that the wifi dongle doesn't have enough power to operate? I heard that most people can operate the Edimax dongle straight from the onboard usb ports...
Thanks,
Rich
Posts: 10
Joined: Fri Sep 21, 2012 3:39 pm
by Humble_Pi » Thu Oct 11, 2012 9:25 pm
I have the exact same setup as you Rich

Raspberry Pi with Raspbian 2012-09-18 edition
1A power adapter
Logitech MK250 wireless keyboard and mouse on USB 1
Edimax EW-7811UN on USB 2
HDMI out
integral Ultima pro 8Gb SD card

Using the wpa_gui I can only get the Edimax's blue light to flash occasionally, sometimes it even sees next door's Sky router in the scan results.

I have another Integral SD card with wheezy on it that does work correctly after applying Mr Engman's script. However i cannot get the ssh to work on that system hence wanting to run the latest Raspbian.
Posts: 3
Joined: Wed Jun 13, 2012 10:25 pm
by MattHawkinsUK » Thu Oct 11, 2012 10:31 pm
Has your power adapter got a moulded lead or is it USB style?

I did some tests tonight with my 7811 and I found my Blackberry 700mA adapter with moulded cable was much better than either of my 1A USB lead power adapters (both original branded). I measured the resistance of some USB cables and was shocked at the high resistance they had.1 lead was 2 ohms. At 500mA that is 0.5V lost straight away.

I'm getting the impression that USB style power adapters are very rough and ready and only suited to charging devices where the accuracy of the 5V is not important. It looks as if my Blackberry charger delivers 5V to the other end whereas the others lose a chunk of voltage before it even hits the Pi.

In some cases this seemed to stop my 7811 working completely.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)
User avatar
Posts: 491
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
by SiriusHardware » Thu Oct 18, 2012 11:56 pm
For the record, I use one of these adaptors as well and have never had a problem with it: But, from the beginning, I have used the PI with a home-made powered hub (home made in the sense that it is a cheap unpowered hub converted to a powered one). The wifi adaptor has always been plugged into and powered from the powered hub.

A good 2.5A regulated supply powers the 5V rails on the hub, and from that point I also take a suitable power lead out to the Pi: The original +5v power feed through which the hub took power from its host is cut. (This arrangement was to prevent the hub from trying to draw power from the Pi through the USB polyfuses, although by the time my first Pi arrived it didn't have polyfuses fitted.

I've never had a problem with the 7811, initially getting it to work with Mr. Engman's famous script, but I have used it with the wireless config programme provided on the desktop of Raspbian since the September 2012 update and it 'just works' with that, without any problem.
Posts: 438
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK
by yaffle » Sat Oct 20, 2012 10:05 pm
I had exactly the same problem, only the briefest blue flash from the Edimax EW-7881Un wifi adapter then nothing. The WiFi Config tool on the desktop said "Could not get status from wpa_suplicant".

Being new to Linux I went through various steps from other posts but to no avail.
Eventually I reflashed the SD card with the 2012-09-18-wheezy-raspbian image again to start from scratch.

This time I did not have the Edimax wifi adapter plugged in when I started, nor the LAN cable from my router. Nor did I do apt-get update or any other installs.

I went straight to LXDE and ran the Wifi config tool. Then I plugged the Edimax adapter into the Pi's USB port. It didn't work the first time. I unplugged my Logitech wireless keyboard receiver then plugged it back again and did the same with the Edimax.

At last it did actually work. Scan found wifi networks and I could even connect to my router using WPS. It still works after rebooting.

I have no idea why it was not working before and is working now. Just releived it does.
My set up is:
Mk1 Pi
Maplin USB power supply rated 2A
iFlash 16GB SD card
Logitech K400 wireless keyboard
Logitech M305 wireless mouse
Logitech 'Unifying' wireless receiver plugged into one of Pi's USB port
No USB hub
Edimax EW-7811Un USB wifi adapter plugged into the other Pi's USB port
HDMI to Sony Bravia TV
2012-09-18-wheezy-raspbian
Posts: 1
Joined: Sat Oct 20, 2012 9:29 pm
by Humble_Pi » Fri Nov 09, 2012 12:21 am
I eventually got to the bottom of my problem, it was the channel on my Wireless Router (a Huawei Echo Life HG521 supplied by TalkTalk) . It was set to channel 12. I changed the channel to 6 and the Edimax sprang into life.
Posts: 3
Joined: Wed Jun 13, 2012 10:25 pm
by MrRicheyRich » Thu Nov 15, 2012 7:55 pm
Hey guys,
I've just solved the problem! I soldered a 10-ohm resistor across each polyfuse (labelled F1 and F2) next to the USB ports. This means I can now get more current to each USB port and the Edimax dongle runs first time using WPA gui in Raspbian.

I believe version 2 and above have removed the polyfuses???

Let me know if anyone else's problems get solved that way.

Rich
Posts: 10
Joined: Fri Sep 21, 2012 3:39 pm
by bgirardot » Thu Nov 15, 2012 8:13 pm
MrRicheyRich wrote:Hey guys,
I've just solved the problem! I soldered a 10-ohm resistor across each polyfuse (labelled F1 and F2) next to the USB ports. This means I can now get more current to each USB port and the Edimax dongle runs first time using WPA gui in Raspbian.

I believe version 2 and above have removed the polyfuses???

Let me know if anyone else's problems get solved that way.

Rich


For what it is worth, mine in a Rev 1 board with unmodified polyfuses and it works just fine with the edimax wifi dongle.

I also happen to use a blackberry 700ma charger to power my RPi.
Posts: 517
Joined: Wed Oct 10, 2012 6:20 am
Location: Switzerland
by Shawn333 » Thu Jan 17, 2013 10:42 pm
Have installed the latest Raspian distribution (Raspbian “wheezy” 2012-09-18) which already includes the drivers for the Edimax EW-7811Un adapter pre-installed (the device I am using).

After inserting the Edimax USB adapter I ran the following checks:

lsusb – to check that the Edimax EW-7811Un device adapter was listed in the output. (it was)
lsmod - to check that the Edimax kernel driver was loaded. Should see "8192cu" kernel module loaded. (it was)

iwconfig to display a listing of the current wireless network configurations. Was looking for the "wlan0" adapter to be present. (again it was).

Now went into the two files that control Wi-Fi functionality
/etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf

I used sudo nano to open the the interfaces file which contains the following lines
auto lo

iface lo inet loopback
Iface etho0 inet dhcp

auto wlan0 added by me

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


then opened the second file in same way which contains the following
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

all below added by me
network={
ssid="My_SSID Name"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="My password"
}

After editing the above files and rebooting I noticed that in the GUI wpa-gui icon appears. When opened it identifies my connection as set up above, but if I scan for another connection, nothing appears (although I know others are present, based on my laptops returned results). I wish to be able to scan for other connections when I am away from home just using the wpa-gui (without having to modify the above files). I have tried disconnecting the existing local setup and then scanning for another but this has not worked. Removing the existing connection and rescanning had again only shown the current Wi-Fi access point.
I am wondering whether this is due to the way the two above files are configured, as I have noted that there are alternative entries in the content depending on where you look on the web.
· In the network/interfaces file I have seen the word manual replaced by dhcp in the iface wlan0 inet manual line
· The word wpa-roam has also been replaced by wpa-conf in the network/interfaces file

In the supplicant file I have seen these other differences:
· The line ap_scan=2 being added before network={
· An additional line after the ssid line that reads scan_ssid=1
· Changed first line ctrl_interface=/var/run/wpa_supplicant
· Additional Ctrl_interface_group=0
· And finally the following lines preceding the above network={
network={
ssid="any"
key_mgmt=NONE
priority=2
}
As regards using wpa-gui guidance I have seen relates to opening this app, ‘Disconnecting’ from present connection and then scanning (Scan to open scan results window and then scan to bring up a list of available connections). An identified connection can then apparently be selected and linked to.
PS: I have looked around for a simple comprehensive guide to wpa-gui in terms of how to use, but have not had much success. I would be grateful for any pointers to where one exists.
Posts: 17
Joined: Tue Jan 01, 2013 2:03 pm
by pjc123 » Sat Jan 19, 2013 12:59 pm
Shawn333 wrote:



· In the network/interfaces file I have seen the word manual replaced by dhcp in the iface wlan0 inet manual line

When using roaming, which is what you are doing, "manual" is correct.

· The word wpa-roam has also been replaced by wpa-conf in the network/interfaces file

wpa_roam is correct when using roaming.

In the supplicant file I have seen these other differences:
· The line ap_scan=2 being added before network={

I have that in my config, but I do not think it is necessary; just haven't had a chance to remove it and retry. It has to do with how ap scanning is implemented. It also requires you to add more parameters, thus adding complication to the file.

· An additional line after the ssid line that reads scan_ssid=1

If your router is not broadcasting your "SSID", ie it is hidden, then you need to add this line.

· Changed first line ctrl_interface=/var/run/wpa_supplicant

Your first line is correct.

· Additional Ctrl_interface_group=0

This has to do with permissions to run the control interface. Not necessary to change this under normal instances.

· And finally the following lines preceding the above network={
network={
ssid="any"
key_mgmt=NONE
priority=2
}

This allows you to connect to any open network (Like McDonalds, Starbucks,etc). I believe this is what you are trying to do. I have also seen it written as follows but have not tried either one:

network={
ssid=""
key_mgmt=NONE
}
Posts: 910
Joined: Thu Mar 29, 2012 3:37 pm
by Shawn333 » Sat Jan 19, 2013 9:52 pm
Thanks PJC123

This has given some confidence that what I am doing is nearly right.
Will try the last bit (to do with connecting to McDonalds etc) and report back. As you commented this might well be what provides the solution I have been looking for.
Posts: 17
Joined: Tue Jan 01, 2013 2:03 pm
by pjc123 » Sun Jan 20, 2013 12:33 pm
Shawn333 wrote:Thanks PJC123

This has given some confidence that what I am doing is nearly right.
Will try the last bit (to do with connecting to McDonalds etc) and report back. As you commented this might well be what provides the solution I have been looking for.


I am interested if (and which) of those examples for open connections work or don't work, so do report back. After thinking about it, one other thing that you might want to add is the "priority" for each of the network connections. Normally the wpa_supplicant file is read from top to bottom and the first working network connection is used. This can be changed by adding the priority parameter. The larger the number, the sooner the network is matched and used. Your post shows an example of its usage. If you use the same priority number for multiple networks, they are then prioritized based on security policy, signal strength, etc. One caveat to all of this is if scan_ssid=1 is used; in that case the priority is ignored and the file is read from top to bottom.

I have never used a network gui, so I don't know how it handles listing multiple encrypted routers / access points (as opposed to open connections) and the relation to the wpa_supplicant file, so I can't speak for how to set that up, if indeed that is even necessary.
Posts: 910
Joined: Thu Mar 29, 2012 3:37 pm
by Shawn333 » Sun Jan 20, 2013 8:09 pm
Hi
Thanks again for the comments, especially the additional bit about priorities (which I will try out). I have had a play with the former suggested settings with the following results:

After adding the following lines to the supplicant.conf file wpa-gui still shows wlan0 as the only option in the drop down selection for Adapter

network={
ssid="Any"
key_mgmt=NONE
}

However Network options now includes :0 as ‘Any’ (being the first named SSID in supplicant.conf - see above lines), :1- my original local SSID name, – and a third option (no assigned number) being ‘Select any network’:

Also in the ‘Manage Networks’ tab there is an additional option of 0:Any. However if I select ‘Any’ and then scan I get no response and wlano disappears also from the adapter box (such that there are no options to choose from. I will try again at another time as other available connections were a bit scarce when I tried this. I did think that going into manage networks selecting 0: and then the Edit button might work for adding another connection, as you then get a window where you can add an SSID and PSK.

NB: I presume I could change round the order of the network { …} sections in the conf file to alter the order in which they appear in the gui drop down.
Posts: 17
Joined: Tue Jan 01, 2013 2:03 pm
by Shawn333 » Thu Feb 14, 2013 6:18 pm
Found a quirk when hot-plugging in wired ethernet alongside the wireless dongle. When this is done the wireless connection drops out (which is good), and although the LEDS indicate wired connection is in operation, I cannot access the internet (which is not so good). However if it is unplugged then the wireless connection comes back into operation (again good).

I would like to know what it is that is preventing the wired conection being picked up in this situation, as it works fine hot-plugging when there is no wireless dongle present. Have ensured the hotplug commands are present for both etho0 and wlan0 - should 'apscan' be used or is this only for wireless setups.
Posts: 17
Joined: Tue Jan 01, 2013 2:03 pm