need help with setting up wifi on my pi


7 posts
by pie_chucker » Sun Dec 16, 2012 6:16 pm
Dear RPI Gurus, I have been trying to get my Rpi connect to the home wifi network for 2 days without success. I am using a dlink n150 usb wireless adaptor..

on using
iwlist wlan0 scan

i can see wifi networks in my area including my home wifi.. so i am guessing that the problem is not with drivers. the following is a snippet of my home network information from iwlist
Code: Select all
Cell 03 - Address: 00:1F:33:48:DD:76
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=41/70  Signal level=-69 dBm 
                    Encryption key:on
                    ESSID:"cs_unwired"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=000000495ed96181
                    Extra: Last beacon: 3090ms ago
                    IE: Unknown: 000A63735F756E7769726564
                    IE: Unknown: 010882848B0C12961824
                    IE: Unknown: 030106
                    IE: Unknown: 0706534720010D14
                    IE: Unknown: 200100
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 2A0100




the following is what i get when i try to start wireless using
/etc/init.d/networking start
Code: Select all
Rpi@raspberrypi /etc/network $ sudo /etc/init.d/networking restart > /home/pi/a.log
wpa_supplicant: wpa_action is managing ifup/ifdown state of wlan0
wpa_supplicant: execute `ifdown --force wlan0' to stop wpa_action
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
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/bc:f6:85:e8:51:54
Sending on   LPF/wlan0/bc:f6:85:e8:51:54
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
No DHCPOFFERS received.


this is what i have in /etc/network/interfaces
Code: Select all
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "cs_unwired"
wpa-psk "*******"


this is what i have in /etc/wpa.conf
Code: Select all
netwok={
ssid="cs_unwired"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="********"
}


I have tried multiple combinations of entries in these files based on inputs from various forums.. nothing seems to work..

have been at it for 2 days now and have read almost all posts .. need some help ..

thanks ..
Posts: 4
Joined: Sun Dec 16, 2012 5:40 pm
by pjc123 » Sun Dec 16, 2012 10:43 pm
Well, first thing off the bat, you have "network" mispelled as "netwok".
Posts: 911
Joined: Thu Mar 29, 2012 3:37 pm
by poing » Sun Dec 16, 2012 10:48 pm
If you use Raspian 2012-10-28 and run 'startx' you'll enter the desktop. There's a very easy tool on it called 'WiFi config' which should take you about a minute to set up.
Posts: 1090
Joined: Thu Mar 08, 2012 3:32 pm
by pie_chucker » Mon Dec 17, 2012 5:15 am
@pjc123 thanks for the catch.. Am at work now but will go back and try that out once again.

@poing i tried with the wifi util on the desktop.. that did not work.. will try again..

thanks for the posts.. will keep my fingers crossed and try again later today
Posts: 4
Joined: Sun Dec 16, 2012 5:40 pm
by Dweeber » Mon Dec 17, 2012 5:55 am
pie_chucker wrote:this is what i have in /etc/network/interfaces
Code: Select all
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "cs_unwired"
wpa-psk "*******"


this is what i have in /etc/wpa.conf
Code: Select all
netwok={
ssid="cs_unwired"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="********"
}

Other than the netwok that has been mentioned you seem to have your SSID in both config files. Normally, you have the wpa config pointed at by the interfaces file... like:
Code: Select all
auto lo
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

and then have the configuration for you available SSID"s in the wpa_supplicant.conf file like:
Code: Select all
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="YOURSSID"
        psk="PASSWORD"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
        priority=5
}

You can have multiple network entries in the wpa... file and use priority if you want them to be taken before others. Higher priority number, the entry will take precedence.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com
User avatar
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
by pie_chucker » Tue Dec 18, 2012 3:46 am
@pjc123.. so the misspelt 'network' it was.. thanks to all for your replies..

"given enough eyeballs.. all bugs are shallow" :)
Posts: 4
Joined: Sun Dec 16, 2012 5:40 pm
by pjc123 » Tue Dec 18, 2012 11:51 am
pie_chucker wrote:@pjc123.. so the misspelt 'network' it was.. thanks to all for your replies..

"given enough eyeballs.. all bugs are shallow" :)


We have all been there; good to see you have it working. The worst is when you spend all day looking for a bug in your code and someone walks into your office, passes by your computer, and says "Hey, what's that extra comma doing there?".
Posts: 911
Joined: Thu Mar 29, 2012 3:37 pm