Page 1 of 1

getting WiFi working

Posted: Tue Jan 08, 2013 4:45 pm
by Alan Johnstone
Hope this is the correct form for this
I am trying to get my Edimax USB adapter working.
sudo iwlist scan shows the wireless networks in my area so I think that means it is working
iwconfig shows
wlan0 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
my interfaces file is

auto lo

iface lo inet loopback
iface eth0 inet static
address 192.168.0.14
netmask 255.255.255.0
gateway 192.168.0.1


auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf

My wpa.conf file is

network={
ssid="NETGEAR"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="Network Password"
}
The network password is correct

When I do Sudo ifup wlan0 i get
pi@raspberrypi ~ $ sudo ifup wlan0
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/80:1f:02:85:0c:31
Sending on LPF/wlan0/80:1f:02:85:0c:31
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
Unable to obtain a lease on first try. Exiting.
Failed to bring up wlan0.


What does it not like

Thanks

Alan

Re: getting WiFi working

Posted: Tue Jan 08, 2013 7:29 pm
by Chapindad
try this:

Code: Select all

iface wlan0 inet dhcp
           wpa-ssid="NETGEAR"
           wpa-psk="mypasscode"
This worked for me...

Re: getting WiFi working

Posted: Tue Jan 08, 2013 8:04 pm
by Alan Johnstone
I tried the above and initially it said
sudo ifup wlan0
/etc/network/interfaces:12: option with empty value

so I retyped with spaces around the "=" signs
This allowed it to read the file but with the same result

sudo ifup wlan0
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/80:1f:02:85:0c:31
Sending on LPF/wlan0/80:1f:02:85:0c:31
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
Unable to obtain a lease on first try. Exiting.
Failed to bring up wlan0.

Alan

Re: getting WiFi working

Posted: Fri Jan 18, 2013 10:26 pm
by seeyounorth
Ok, so I struggled with this same issue for a while trying many different configs in wpa_supplicant.conf.

This config solved it for me:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
 ssid="wirelessname"
 psk="password"
 key_mgmt=WPA-PSK
}
I tried many other things like the "proto" and "group" but they must have confused the adapter further. My network is both WPA and WPA2 hosted by a Dlink DIR-655. Adapter is the EdiMax EW-7811Un. Raspberry "whezzy" 2012-12-16 and no USB hub. Also am running wireless mouse and keyboard. 700ma micro USB

Hope this helps anyone else with DHCPDISCOVER issues.

Re: getting WiFi working

Posted: Sat Jan 19, 2013 3:08 pm
by Alan Johnstone
I almost do not believe it.

IT WORKS!

Thank you very much.

For the record to help anybody else:
I had got it working by using wicd which is a GUI interface
and that worked straight out of the box.
(
http://dembtech.blogspot.co.uk/2012/09/ ... ry-pi.html
)
To make absolutely sure that wicd was not somehow bringing up wlan0 I purge removed it.

WiFi Config on the GUI still does not work.

My /etc/network/interfaces file says:
auto lo

iface lo inet loopback
iface eth0 inet static
address 192.168.0.14
netmask 255.255.255.0
gateway 192.168.0.1


allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf


( I was using a static network address for plugged-in networking so the last 3 lines are the important ones. I believe that the last line is saying which file wpa_supplicant should take as the config file and that is the file I put the suggested code in.)

Re: getting WiFi working

Posted: Thu Jun 02, 2016 4:32 pm
by theamazingdrew
I tried this and still couldn't get it to work. wpa_supplicant is a pain to deal with.

This following link, on the other hand, works beautifully.

http://askubuntu.com/questions/522842/u ... mmand-line

Re: getting WiFi working

Posted: Sun Jun 26, 2016 3:59 pm
by carioca10
I have tried both and am getting the following message when typing the command sudo ifup wlan0:

/etc/network/interfaces:9: option with empty value
Ifup: couldn't read interfaces file "/etc/network/interfaces"


The WiFi Configuration wpa_gui does not list the WiFi adapter.

Any help is welcome.

Re: getting WiFi working

Posted: Mon Jun 27, 2016 5:35 am
by Cancelor
I would recommend starting with a new install.

Then use the GUI to connect to the WiFi by clicking on the WiFi icon in the top right of the screen.

Edit:- Link added ... https://www.raspberrypi.org/documentati ... /README.md

Re: getting WiFi working

Posted: Mon Jun 27, 2016 10:23 am
by carioca10
Thank you.

I will try it later and then post the results.

Re: getting WiFi working

Posted: Tue Jun 28, 2016 3:03 am
by carioca10
I have updated and upgraded 2 times with no success.

Then I installed the new Raspbian Jessie version and partially solved.

Though I was not able to access the WiFi of the Amped REC10 Extended Wireless Network, which gives the best signal at the place where I want to access my RPi. Later I discovered I was typing a password which includes a letter which I was uncorrectly typing the "l" ( "L") in tiny letters, but I needed to type the "l" ("i") in capital letters.

PROBLEM SOLVED, :D !