WEP Lenny /etc/network/interfaces

Kernels & Hardware, configuring network, installing services

WEP Lenny /etc/network/interfaces

Postby timsan » 2009-07-25 20:32

hullo,

I would like to get the WEP connection on my Lenny laptop working automagically.

I have the following in my /etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

iface wlan0 inet dhcp
wireless-essid BTHomeHub-XXX
wireless-key xxxxxxxxxxx
auto wlan0

However, the result of this is that no connection is made. You see it try to get a dhcp offer, and then it "sleeps".

However, when I did it manually, it works just fine:

1) iwconfig wlan0 essid BTHomeHub-XXX
2) iwconfig wlan0 key xxxxxxxxxxx
3) dhclient wlan0

And voilà, it connects in two seconds.

My question: what do I need to put in the /etc/network/interfaces that it connects automagically? It worked just fine when I was using WPA (wpa_supplicant.conf). And really, I would prefer to use WPA to WEP but sadly it's not me to choose.

ta,

t.
timsan
 
Posts: 3
Joined: 2009-03-19 10:43

Re: WEP Lenny /etc/network/interfaces

Postby timsan » 2009-07-25 21:25

Sorryt., forgot one thing. from my lspci:

04:00.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)

When it works:

Jul 25 22:12:43 boink dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Jul 25 22:12:46 boink dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Jul 25 22:12:51 boink dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Jul 25 22:12:52 boink dhclient: DHCPACK from 192.168.1.254
Jul 25 22:12:52 boink avahi-daemon[2223]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.66.
Jul 25 22:12:52 boink avahi-daemon[2223]: New relevant interface wlan0.IPv4 for mDNS.
Jul 25 22:12:52 boink avahi-daemon[2223]: Registering new address record for 192.168.1.66 on wlan0.IPv4.
Jul 25 22:12:52 boink dhclient: bound to 192.168.1.66 -- renewal in 38828 seconds.

And when it doesn't work:

Jul 25 22:10:04 boink dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
Jul 25 22:10:13 boink dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
Jul 25 22:10:25 boink dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
Jul 25 22:10:28 boink dhclient: No DHCPOFFERS received.

t.
timsan
 
Posts: 3
Joined: 2009-03-19 10:43

Re: WEP Lenny /etc/network/interfaces

Postby timsan » 2009-07-27 07:45

oh great ... no reply.

though, I did find a solution: I installed Ubuntu. Connects to that blasted BTHomeHub, using WEP instead of WPA for some idiotic reason. All other ISPs use WPA now as default.

I tried with debian, using WEP but I figured it was flogging a dead horse.

Oddly enough, I had to ditch Ubuntu since the gnome-wireless utility works only with much agony with Fon routers, using WPA. And wpa_supplicant worked very well for me in debian.

Now .. debian wouldn't work very well using WEP, and Ubuntu works very well here.

t.
timsan
 
Posts: 3
Joined: 2009-03-19 10:43

Re: WEP Lenny /etc/network/interfaces

Postby aspnair » 2009-07-27 10:25

If you are using manual configuration for wireless, then make sure that network manager is disabled. I had one similar problem once with my laptop, some times it connects and some times it does not. Finally I disabled /etc/init.d/network-manager and then everything started working fine.
Compressed Air Energy Storage, Entropy and Efficiency
http://saurorja.org/2012/06/18/compress ... fficiency/
User avatar
aspnair
 
Posts: 1247
Joined: 2009-06-18 12:27
Location: Twitter: @anand_sivaram

Re: WEP Lenny /etc/network/interfaces

Postby hkoster1 » 2009-07-27 10:26

@timsan: Oh great... and goodbye.
Real Debian users don't do chat...
hkoster1
 
Posts: 1265
Joined: 2006-12-18 10:10

Re: WEP Lenny /etc/network/interfaces

Postby jowyta » 2010-06-05 14:23

I am having this problem and this thread does not throw much light on it so far. I have etc/network/interfaces set up in the normal way for wep. The interface fails to work when I start up. I just send exactly the same key using iwconfig wlan0 key bbbbbbbbb and the interface starts to work.

Can anyone say what the problem is?

John
jowyta
 
Posts: 44
Joined: 2010-04-08 09:00
Location: Leicestershire, UK

Re: WEP Lenny /etc/network/interfaces

Postby merkurvenus » 2010-06-05 15:13

Hi John,

post your "/etc/network/interfaces" please!

Dirk
User avatar
merkurvenus
 
Posts: 26
Joined: 2010-05-21 08:08
Location: Bremen / Germany

Re: WEP Lenny /etc/network/interfaces

Postby jowyta » 2010-06-05 16:02

Code: Select all
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlan0
iface wlan0 inet static
   address 192.168.100.8
   netmask 255.255.255.0
   gateway 192.168.100.1
   wireless-essid <ESSID>
   wireless-key <bbbbbbbbbbbbbbb>
   wireless-mode managed
   dns-nameservers 192.168.100.1
jowyta
 
Posts: 44
Joined: 2010-04-08 09:00
Location: Leicestershire, UK

Re: WEP Lenny /etc/network/interfaces

Postby aspnair » 2010-06-05 17:11

Send the output of the following also.
Code: Select all
/etc/init.d/networking stop
dmesg -c (clear everything)
/etc/init.d/networking start
dmesg (take the log and send it)
Compressed Air Energy Storage, Entropy and Efficiency
http://saurorja.org/2012/06/18/compress ... fficiency/
User avatar
aspnair
 
Posts: 1247
Joined: 2009-06-18 12:27
Location: Twitter: @anand_sivaram

Re: WEP Lenny /etc/network/interfaces

Postby jowyta » 2010-06-05 20:31

Code: Select all
# dmesg
[  309.418430] rtl819xE: PlatformInitFirmware()==>
[  309.418434]
[  309.425132] rtl819xE:Download Firmware: Put code ok!
[  309.425140]
[  309.433101] rtl819xE:Download Firmware: Boot ready!
[  309.433106]
[  309.434136] rtl819xE:Download Firmware: Firmware ready!
[  309.434140]
[  309.434145] rtl819xE:Firmware Download Success
[  309.434149]
[  309.869416] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  312.791704] Linking with <ESSID>,channel:11, qos:0, myHT:0, networkHT:0
[  312.797191] ===>ieee80211_associate_procedure_wq(), chan:11
[  312.812770] =================>ieee80211_authentication_req():auth->algorithm is 0
[  312.814074] ==========>to link with AP using SEC(0, 0)===>u4bAcParam:731c, ===>u4bAcParam:731c, ===>u4bAcParam:731c, ===>u4bAcParam:731c,
[  312.816329] Associated successfully
[  312.816342] Using G rates:108
[  312.816352] Successfully associated, ht not enabled(0, 0)
[  312.816491] ============>normal associate
[  312.817021] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready


and

Code: Select all
# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

wlan0     802.11bg  ESSID:"<ESSID>" 
          Mode:Managed  Frequency=2.462 GHz  Access Point: 00:11:50:83:19:60   
          Bit Rate=54 Mb/s   
          Retry:on   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=87/100  Signal level=-54 dBm  Noise level=-113 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.


Thanks for looking at this.

John
jowyta
 
Posts: 44
Joined: 2010-04-08 09:00
Location: Leicestershire, UK

Re: WEP Lenny /etc/network/interfaces

Postby aspnair » 2010-06-06 02:37

[ 312.816342] Using G rates:108
[ 312.816352] Successfully associated, ht not enabled(0, 0)

Did you enable SuperG, SpeedBooster etc. on your router? They are not in the 802.11g standard and they may require matching accesspoint and stations. 802.11g supports only 6,9,12,18,24,36,48 and 54 Mbps and 802.11b supports 1,2,5.5 and 11 Mbps. So try to disable any 108Mbps mode in your router, and force your /etc/init.d/networking to use 54Mbps by
Code: Select all
wireless-rate 54M

You could also try with any of the supported rates as given above also.
Look at the dmesg output again.

Edited: What kernel your are using? Try to use a newer kernel.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/530275
The above link also describes some similar problem.
Compressed Air Energy Storage, Entropy and Efficiency
http://saurorja.org/2012/06/18/compress ... fficiency/
User avatar
aspnair
 
Posts: 1247
Joined: 2009-06-18 12:27
Location: Twitter: @anand_sivaram

Re: WEP Lenny /etc/network/interfaces

Postby jowyta » 2010-06-06 11:25

Last point first, I am using 2.6.32 kernel with built in drivers (I.e. no modules). The RTL8192E is, of course, a staging driver. I do not recall where I downloaded the firmware from. However, as I wrote, everything works if I use
Code: Select all
iwconfig wlan0 key <bbbbbbbbbbbbbbb>

after booting or using a networking start procedure.

Nothing I do seems to affect the wireless rate. I have tried using “wireless-rate 36M” and other values in /etc/network/interfaces and I have tried using “iwconfig wlan0 rate 48M ” and other values.

The “Using G rates:108” seems to originate in the kernel part of the driver, the code can be seen in /usr/src/linux-source-2.6.32/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c.

iwconfig reports Bit Rate=54 Mb/s whatever I do. For example, with /etc/network/interfaces:

Code: Select all
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlan0
iface wlan0 inet static
   address 192.168.100.8
   netmask 255.255.255.0
   gateway 192.168.100.1
   wireless-rate 36M
   wireless-essid <ESSID>
   wireless-key <bbbbbbbbbbbbbbbbbbbbbb>
   wireless-mode managed
   dns-nameservers 192.168.100.1

I get:
Code: Select all
celiamwn120:/home/celia# /etc/init.d/networking stop
Deconfiguring network interfaces...Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Network is down.
done.
celiamwn120:/home/celia# /etc/init.d/networking start
Configuring network interfaces...Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Network is down.
done.
n120:/home/name# dmesg
[  205.798308] rtl819xE: PlatformInitFirmware()==>
[  205.798313]
[  205.808090] rtl819xE:Download Firmware: Put code ok!
[  205.808097]
[  205.820082] rtl819xE:Download Firmware: Boot ready!
[  205.820087]
[  205.821114] rtl819xE:Download Firmware: Firmware ready!
[  205.821118]
[  205.821122] rtl819xE:Firmware Download Success
[  205.821125]
[  206.277420] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  209.199705] Linking with <ESSID>,channel:11, qos:0, myHT:0, networkHT:0
[  209.204169] ===>ieee80211_associate_procedure_wq(), chan:11
[  209.220752] =================>ieee80211_authentication_req():auth->algorithm is 0
[  209.222066] ==========>to link with AP using SEC(0, 0)
[  209.224349] Associated successfully
[  209.224358] Using G rates:108
[  209.224365] Successfully associated, ht not enabled(0, 0)
[  209.224498] ============>normal associate
[  209.225156] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  210.284037] ===>u4bAcParam:731c, ===>u4bAcParam:731c, ===>u4bAcParam:731c, ===>u4bAcParam:731c,
[  219.344031] wlan0: no IPv6 routers present
[  220.760783] Monitor-Mwait will be used to enter C-2 state
[  220.760804] Marking TSC unstable due to TSC halts in idle
[  220.766074] Switching to clocksource hpet
n120:/home/name# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

wlan0     802.11bg  ESSID:"<ESSID>" 
          Mode:Managed  Frequency=2.462 GHz  Access Point: 00:11:50:83:19:60   
          Bit Rate=54 Mb/s   
          Retry:on   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=84/100  Signal level=-56 dBm  Noise level=-112 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

And if I try:
Code: Select all
n120:/home/name# iwconfig wlan0 rate 36M


I get
Code: Select all
n120:/home/name# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

wlan0     802.11bg  ESSID:"<ESSID>" 
          Mode:Managed  Frequency=2.462 GHz  Access Point: 00:11:50:83:19:60   
          Bit Rate=54 Mb/s   
          Retry:on   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=84/100  Signal level=-57 dBm  Noise level=-112 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

But then if I do:
Code: Select all
n120:/home/name# iwconfig wlan0 key <bbbbbbbbbbbbbbbbbbbbbbb>

I get
Code: Select all
n120:/home/name# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

wlan0     802.11bg  ESSID:"<ESSID>" 
          Mode:Managed  Frequency=2.462 GHz  Access Point: 00:11:50:83:19:60   
          Bit Rate=54 Mb/s   
          Retry:on   RTS thr:off   Fragment thr:off
          Encryption key:<BBBB-BBBB-BBBB-BBBB-BBBB-BBBB-BB>   Security mode:open
          Power Management:off
          Link Quality=82/100  Signal level=-56 dBm  Noise level=-111 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

and the wireless works.
jowyta
 
Posts: 44
Joined: 2010-04-08 09:00
Location: Leicestershire, UK

Re: WEP Lenny /etc/network/interfaces

Postby merkurvenus » 2010-06-06 22:31

Hello jowyta,

it is posible that your problem seems to be inherent in your wireless driver. The syntax of your "/etc/network/interfaces" seems to be ok.

To get one step further i would consider the following three options:

1. edit the file "/etc/rc.local" in a root terminal and add the following two lines without the quotes ABOVE the "exit 0" entry:

=> "ifdown wlan0"
=> "ifup wlan0"

Then reboot and see if the interface starts.

And if that doesn't help,

2. you can try "wpa_supplicant" with an appropriate configuration to bring up your interface by systemstart.

3. You can use a gui network-manager like WICD.

But see if the first option will fix it.

Greetings Dirk
Last edited by merkurvenus on 2010-06-09 09:31, edited 1 time in total.
User avatar
merkurvenus
 
Posts: 26
Joined: 2010-05-21 08:08
Location: Bremen / Germany

Re: WEP Lenny /etc/network/interfaces

Postby jowyta » 2010-06-07 05:47

Thanks Dirk

This problem has occured on a friend's Samsung N120 computer that I was helping to get set up and I was staying with her for a few days. As I am now not in the same location as the computer I do not know how quickly we will be able to continue this investigation. I will suggest that my friend tries your option 1. With regard to option 2, how might this help since she is using WEP? As far as using a network manager goes, we were inteneding to use network-manager-gnome, but that is not working either for what appear to be different reasons. We may just wait for Squeeze to become stable and see if it works then before doing anything more with that.

The actual wireless drivers seem to be working OK since we get as far as "wlan0: link becomes ready" and if we then send the key everything works. The problem seems to be something to do with ifup not sending the key at an appropriate time.

John
jowyta
 
Posts: 44
Joined: 2010-04-08 09:00
Location: Leicestershire, UK

Re: WEP Lenny /etc/network/interfaces

Postby merkurvenus » 2010-06-07 08:06

Hello John,

1. there are configuration template scripts for wpa_supplicant how to configure it when using WEP instead of WPA! => "/usr/share/doc/wpasupplicant/examples"

2. WICD in my experience works in many cases where network-manager gnome doesn't. It is the far better tool for managing wireless devices.

Good Luck
User avatar
merkurvenus
 
Posts: 26
Joined: 2010-05-21 08:08
Location: Bremen / Germany


Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable