Bosse_B
Posts: 981
Joined: Thu Jan 30, 2014 9:53 am

How to connect WEP WiFi network?

Tue Sep 30, 2014 7:14 pm

I have a small Realtec WiFi dongle that I want to test with my new Pi B+.
I followed this guide regarding the general handling.
The adapter shows up when I do the dmesg command as follows:

Code: Select all

[106831.059863] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[106831.161539] usb 1-1.5: New USB device found, idVendor=0bda, idProduct=8176
[106831.161574] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[106831.161590] usb 1-1.5: Product: 802.11n WLAN Adapter
[106831.161604] usb 1-1.5: Manufacturer: Realtek
[106831.161617] usb 1-1.5: SerialNumber: 00e04c000001
[106831.464817] usbcore: registered new interface driver rtl8192cu
So I went ahead and edited the /etc/network/interfaces as described.
But I got stuck there on the data to enter for the network logon.
The tutorial presupposes that WPA is used but the network I need to connect to runs only WEP.

So exactly how should the data be entered into the file?
This is what I have now (after finding another post here):

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
   wireless-essid "myssid"
   wireless-key FF23ED193A
But when I restart networking it runs a while and then outputs:

Code: Select all

Listening on LPF/wlan0/00:e0:4c:0b:8a:47
Sending on   LPF/wlan0/00:e0:4c:0b:8a:47
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 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
Bo Berglund
Sweden

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: How to connect WEP WiFi network?

Tue Sep 30, 2014 7:32 pm

I use wpa-gui to do the job when connecting to a WEP wifi network. It is user friendly and supports WEP
There are 10 types of people: those who understand binary and those who don't.

sportingchiefs
Posts: 9
Joined: Thu May 01, 2014 3:16 am

Re: How to connect WEP WiFi network?

Tue Sep 30, 2014 7:34 pm

Give this guide a try. It's what I used for my pi set up and worked first try:

https://learn.adafruit.com/adafruits-ra ... cidentalis

Bosse_B
Posts: 981
Joined: Thu Jan 30, 2014 9:53 am

Re: How to connect WEP WiFi network?

Tue Sep 30, 2014 7:52 pm

The tutorial seems to suppose WPA as was the one I linked to.
WEP is not mentioned.
Bo Berglund
Sweden

Bosse_B
Posts: 981
Joined: Thu Jan 30, 2014 9:53 am

Re: How to connect WEP WiFi network?

Tue Sep 30, 2014 7:55 pm

I may have stumbled across the solution!
I removed the quotes around the ssid so the lines now reads:

Code: Select all

iface wlan0 inet dhcp
   wireless-essid myssidname
   wireless-key FF23ED193A
And now it managed to connect!
Bo Berglund
Sweden

User avatar
DougieLawson
Posts: 39126
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to connect WEP WiFi network?

Tue Sep 30, 2014 7:56 pm

Did you get any messages in dmesg about WEP authentication failures? Or was it just that your WiFi network isn't playing nicely with DHCP?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Bosse_B
Posts: 981
Joined: Thu Jan 30, 2014 9:53 am

Re: How to connect WEP WiFi network?

Tue Sep 30, 2014 8:56 pm

This is the WiFi part of the network restart messages:

Code: Select all

Listening on LPF/wlan0/00:e0:4c:0b:8a:47
Sending on   LPF/wlan0/00:e0:4c:0b:8a:47
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 9
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.0.129
DHCPACK from 192.168.0.129
bound to 192.168.0.141 -- renewal in 35226 seconds.
done.
So it seems like after I removed the quotes (which another tutorial stated were important) and then restarted networking it started working...
I see no messages from dmesg relating to WEP at all and DHCP works just fine (I got address 141).
So far I have tested by restarting a number of times and only once was there an error and it aborted the startup of networking.
So I located the test points for the supply lines (thanks to this thread) and measured 4.86V with drops down to 4.80V apparently when there was some communications going on.
But on a B+ that should be good to go thanks to the built-in supply converters.

EDIT:
I think I have to clarify that this Pi is headless, so there is no screen to use for a GUI.
I use PuTTY from my Win7 PC to connect to and manage my Pi.
Bo Berglund
Sweden

Return to “Troubleshooting”