sbhere
Posts: 4
Joined: Mon Dec 30, 2013 7:59 pm

No connection to WEP network (Edimax7811) using config file

Tue Dec 31, 2013 7:17 pm

Okay, this started with a reply to a post by Grumpy Mike, but is better suited for a new thread.
I'm looking for a completely CLI-based way to configure a pi to connect to either a WEP network or a WPA network.[1]

I'm attempting to:
[*]Connect to different networks in different locations at different times
[*]One of those networks is WEP
[*]Another network is WPA
[*](This means that I can't just hardcode the connection information into /etc/network/interfaces)

Please don't:
[*]Tell me to change from WEP to WPA. Not an option
[*]Send a LMGTFY link - I've searched my eyeballs out and frustration has finally boiled over to a forum post. I've read more man pages than I ever care to - everything from wpa_cli to iwconfig and all in between. [I'm also horribly frustrated at the differences in versions, even in the Raspberry Pi forums, let alone once I get off the official pages. I used NOOBS 1.3.3 to install Raspbian. I found posts from <1 year ago with commands which won't even work on this version of software, which only further frustrates a new user!]

Things I've done...

I've edited /etc/network/interfaces (as follows currently)

Code: Select all

[email protected] ~ $ sudo cat /etc/network/interfaces
#loopback interface
auto lo
iface lo inet loopback
#-----

#eth0 - physical adaptor (RJ-45 connector)
#iface eth0 inet dhcp
iface eth0 inet static
  address 10.0.1.82
  netmask 255.255.255.0
  gateway 10.0.1.1
#-----

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

#  This works at work, but doesn't get DHCP
#auto wlan0
#allow-hotplug wlan0
#iface wlan0 inet dhcp
#  wireless-essid MYWiFi  #no quotes works
#  wireless-key 1234567890  #spelling error before

Edited wpa_supplicant.conf

Code: Select all

[email protected] ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="MYWiFi"
        key_mgmt=NONE
        auth_alg=OPEN
        wep_key0=1234567890  
}

network={
        ssid="MYWiFi"
        psk="1234567890"
}

network={
        ssid = "MYWiFi"
        key_mgmt= NONE
        wep_key0 = "1234567890"
}
and tried the wpa_cli, to no avail!

I know I have association

Code: Select all

[email protected] ~ $ iwconfig
wlan0     IEEE 802.11bg  ESSID:"MYWiFi"  Nickname:"<[email protected]>"
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:33:00:00:AA:33
          Bit Rate:54 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=40/100  Signal level=40/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.
And I know I have no IP:

Code: Select all

wlan0     Link encap:Ethernet  HWaddr 33:ff:33:cc:ee:aa
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:452 errors:0 dropped:156 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:106153 (103.6 KiB)  TX bytes:14424 (14.0 KiB)

I have run
sudo dhclient wlan0

... again, with no results!! Can anyone tell me a WEP setup that works without entering the info into /etc/network/interfaces, and NO, I don't have the option to just change the security to WPA.



[1] I use only SSH.[2]
[2] I have a display, but no, it isn't HDMI-capable.[3]
[3] I haven't found the GUI to reliably display on NTSC monitors (RCA out to projector through multi-connector video switch). [4]
[4] Right now I connect only through SSH, since I have no wired network hubs, switches, or routers. I would install VNC, but the RJ-45 connector is my only way in (through SSH) at the moment, and I can't get the wifi adapter to connect to the network, so I can't install using apt-get, since I can't connect to the internet and SSH in at the same time.


... and here I thought this thing would be new and fun - I didn't expect it to be easy, but I didn't expect it to be this incredibly frustrating either!! Image Image

Return to “Troubleshooting”