View previous topic :: View next topic |
Author |
Message |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Wed Jul 21, 2004 10:35 am Post subject: Re: patching conf.d/net |
|
|
jimnutt wrote: | Just out of curiousity, why not define preup() and predown() in wireless.sh, then just check to see if conf.d/net sources /etc/init.d/wireless.sh?
It seems it would be a bit cleaner and would require less work after baselayout screws up conf.d/net
|
I did that at first - but came to the conclusion that it belongs in conf.d/net
Quote: |
Other than that, great work! I was just about to start writing something similar myself when I found this. I still think the gentoo devs are making a mistake not putting this into portage now, it works better than a lot of things already in portage. |
I'm talking to the devs about it - some are eager.
However, the way it goes in is under debate.
It's also not helped by timezone as most the the stuff happens in IRC :/ _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
jake&elroy n00b

Joined: 16 Jul 2004 Posts: 7
|
Posted: Wed Jul 21, 2004 10:56 am Post subject: |
|
|
Hi UberLord,
Thanks for the great script! It really should be part of portage, as it is quite elegant and gets the job done without fiddling with the sandbox etc.
Thanks again! |
|
Back to top |
|
 |
Helena Veteran


Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Wed Jul 21, 2004 11:38 am Post subject: Problem solved! |
|
|
Helena wrote: | Well I've tried your ebuild versions 0.4.7 until 0.4.10. No luck. The error is persistent. With every up-/downgrade etc-update modifies /etc/init.d/wireless.sh (which is OK with me). Only the downgrade to 0.4.7 modified /etc/conf.d/wireless. What else can I do? | Well it really took a lot of time and a bit of luck; but I found out it's a kernel/ACPI problem. Downgrading from 2.6.7 to 2.6.5 solved it! |
|
Back to top |
|
 |
roboguy n00b


Joined: 09 Oct 2003 Posts: 73 Location: London, England
|
Posted: Wed Jul 21, 2004 5:52 pm Post subject: |
|
|
UberLord wrote: | roboguy wrote: |
As you can see, not much success. It seems WEP is definately not working now. I have tested under windows and everything still works fine, so I can only conclude that something has become borked with WEP under linux...
|
Try removing WEP. If it works, then your WEP config is wrong with your Gentoo client - if not then it's something else |
Stranger and stranger... I removed WEP, and still I couldn't get connected.
Code: | porthos root # /etc/init.d/net.eth1 restart
* Running preup function
* Configuring wireless network for eth1
* Scanning for access points
* Found "PorthosNet" at 00:0D:54:F9:7F:DE
* Connecting to "PorthosNet" (WEP disabled)... [ !! ]
* No preferred access points found
* Trying to force preferred incase they are hidden
* Failed to associate with any preferred access points
* Couldn't associate with any access points
* Failed to configure wireless for eth1
* preup eth1 failed
porthos root #
|
It seems it simply can't find the access point perhaps?
I am truely lost so any help would be greatly appreciated. Can anyone tell me what are working versions of wireless tools and baselayout and how I might regress to an older version?
Cheers,
Roboguy. _________________ It's 5.50 a.m.... Do you know where your stack pointer is ?
AMD Athlon64 3400+ 1Gb Ram, 632Gb HDD, nVidia GeForce FX 5900 XT
My .Net blog |
|
Back to top |
|
 |
CB2206 Tux's lil' helper

Joined: 27 May 2003 Posts: 127 Location: NRW
|
Posted: Thu Jul 22, 2004 6:24 am Post subject: |
|
|
sry, this has probably been asked before, but i'm to lazy to read all 44 pages of this thread. (there should be an in-thread search possibility )
is there any way with these scripts to specify that a certain key belongs to a certain essid/mac-combination?
the problem is, that i have two wlans in different locations with different keys and macs but with the same essid. so it would be great to be able to say "this essid with this mac use this/these key(s)".
is this possible with the current version? _________________ CB |
|
Back to top |
|
 |
niknik n00b

Joined: 01 Mar 2004 Posts: 42
|
Posted: Thu Jul 22, 2004 6:49 am Post subject: in thread search |
|
|
sorry, no idea about your question, BUT, there is an in thread search functionality. Simply go to the search page and click
Code: | Display results as:
Posts |
|
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Thu Jul 22, 2004 11:36 am Post subject: |
|
|
CB2206 wrote: | is there any way with these scripts to specify that a certain key belongs to a certain essid/mac-combination?
the problem is, that i have two wlans in different locations with different keys and macs but with the same essid. so it would be great to be able to say "this essid with this mac use this/these key(s)".
is this possible with the current version? |
No - and I don't plan on putting that functionality in. Would it not make sense to give one AP a different ESSID? _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
CB2206 Tux's lil' helper

Joined: 27 May 2003 Posts: 127 Location: NRW
|
Posted: Thu Jul 22, 2004 3:44 pm Post subject: |
|
|
UberLord wrote: | CB2206 wrote: | is there any way with these scripts to specify that a certain key belongs to a certain essid/mac-combination?
the problem is, that i have two wlans in different locations with different keys and macs but with the same essid. so it would be great to be able to say "this essid with this mac use this/these key(s)".
is this possible with the current version? |
No - and I don't plan on putting that functionality in. Would it not make sense to give one AP a different ESSID? |
well, i do not have access to the configs of these aps. and the do both have the name "wlan". :-/ _________________ CB |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
crafteh n00b

Joined: 30 Mar 2004 Posts: 29
|
Posted: Thu Jul 22, 2004 11:00 pm Post subject: |
|
|
I've emerged the package, installed my card's drivers, and edited the configs, but when i do "/etc/init.d/net.ath0 start" I don't get the output that everyone else gets. It doesn't look like the preup function gets executed.
Code: | bash-2.05b# /etc/init.d/net.ath0 start
* Bringing ath0 up...
* Failed to bring ath0 up [ !! ] |
Code: | bash-2.05b# iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
ath0 IEEE 802.11 ESSID:""
Mode:Managed Frequency:5.7GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:6Mb/s Tx-Power:off Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0/94 Signal level:-95 dBm Noise level:-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
|
Code: | # /etc/conf.d/wireless:
# Global wireless config file for net.* rc-scripts
##############################################################################
# HINTS
##############################################################################
# Remember to change eth0 to your wireless interface which may be
# eth0, eth1, wlan0, ath0 - you get the idea. If you're not sure
# you can type "iwconfig" at the command prompt and it will tell you which
# interfaces are wireless.
# Say that your wireless interface is ath0 - the line
# #essid_eth0="any"
# becomes
# #essid_ath0="any"
#
# Remember to change ESSID to your ESSID.
# Say that your ESSID is My NET - the line
# #key_ESSID="s:passkey"
# becomes
# #key_My_NET="s:passkey"
# Notice that the space has changed to an underscore - do the same with all
# characters not in a-z A-Z (english alphabet) 0-9.
#
# Any ESSID's in quotes like essid_eth0="My NET" may need to be escaped
# This means placing the character \ before the character
# \" need to be escaped for example
# So if your ESSID is
# My "\ NET
# it becomes
# My \"\\ NET
# for example
# #essid_eth0="My\"\\NET"
#
# As a final note, most users will just need to set the following options
# key_ESSID1="s:yourkeyhere enc open"
# key_ESSID2="s:yourothrkey enc open"
# preferred_aps=( "ESSID1" "ESSID2" )
#
# Clear? Good. Now configure your wireless network below
#########################################################
##############################################################################
# SETTINGS
##############################################################################
# Hard code an ESSID to an interface - leave this unset if you wish the driver
# to scan for available Access Points
# Set to "any" to connect to any ESSID - the driver picks an Access Point
# This needs to be done when the driver doesn't support scanning
# This may work for drivers that don't support scanning but you need automatic
# AP association
# I would only set this as a last resort really - use the preferred_aps
# setting at the bottom of this file
essid_ath0="any"
# Set the mode of the interface (ad-hoc or managed). Managed is default
# If it's ad-hoc you also need to specify the channel below
mode_ath0="Managed"
# If managed mode fails, drop to ad-hoc mode with the below ESSID?
# If this is set, then remember to configure wireless options such as ifconfig
# for the specified ESSID. Channel can be set (1-14), but defaults to 3 if
# not set.
#
# The below is taken verbatim from the BSD wavelan documentation found at
# http://www.netbsd.org/Documentation/network/wavelan.html
# There are 14 channels possible; We are told that channels 1-11 are legal for
# North America, channels 1-13 for most of Europe, channels 10-13 for France,
# and only channel 14 for Japan. If in doubt, please refer to the documentation
# that came with your card or access point. Make sure that the channel you
# select is the same channel your access point (or the other card in an ad-hoc
# network) is on. The default for cards sold in North America and most of Europe
# is 3; the default for cards sold in France is 11, and the default for cards
# sold in Japan is 14.
adhoc_essid_ath0="WLAN"
adhoc_channel_ath0="3"
# Setup any other config commands. This is basically the iwconfig argument
# without the iwconfig $iface
#iwconfig_eth0=""
# Set private driver ioctls. This is basically the iwpriv argument without
# the iwpriv $iface
#iwpriv_eth0=""
# We can define various timeouts here.
sleep_scan_ath0="1"
sleep_associate_ath0="5"
# By default a successful association in Managed mode sets the MAC
# address of the AP connected to. However, some drivers (namely
# the ipw2100) don't set an invalid MAC address when association
# fails - so we need to check on link quality which some drivers
# don't report properly either.
# So if you have connection problems try flipping this setting
# Valid options are MAC, quality and all - defaults to MAC
associate_test_ath0="MAC"
# Some driver/card combinations need to scan in Ad-Hoc mode
# After scanning, the mode is reset to the one defined above
scan_mode_ath0="Ad-Hoc"
# Below you can define private ioctls to run before and after scanning
# Format is the same as the iwpriv_eth0 above
# This is needed for the HostAP drivers
#ipriv_scan_pre_eth0="host_roaming 2"
#iwpriv_scan_post_eth0="host_roaming 0"
# Define a WEP key per ESSID
# You can't use "any" for an ESSID here
#key_ESSID="1234-1234-1234-1234-1234-1234-56"
# or you can use strings. Passphrase IS NOT supported
# Note - this example also sets the encryption method to open
# which is regarded as more secure than restricted
#key_ESSID="s:foobar enc open"
#key_ESSID="s:foobar enc restricted"
# Here are some more examples of keys as some users find others work
# and some don't where they should all do the same thing
#key_ESSID="open s:foobar"
#key_ESSID="open 1234-5678-9012"
#key_ESSID="s:foobar enc open"
#key_ESSID="1234-5678-9012 enc open"
# You may want to set muliple keys - here's an example
# It sets 4 keys on the card and instructs to use key 2 by default
#key_ESSID="[1] s:passkey1 key [2] s:passkey2 key [3] s:passkey3 key [4] s:passkey4 key [2]"
# You can also override the interface settings found in /etc/conf.d/net
# per ESSID - which is very handy if you use different networks a lot
ifconfig_any=( "dhcp" )
dhcpcd_any="-t 5"
#inet6_any=()
#routes_any=()
#ifconfig_fallback_any=()
# iproute-2 style setup
#ipaddr_ESSID=( "dhcp" )
#iproute_ESSID=()
#ipaddr_fallback_ESSID=()
# Setting name/domain server causes /etc/resolv.conf to be overwritten
# Note that if DHCP is used, and you want this to take precedence then
# please put -R in your dhcpcd options
#nameserver_ESSID="192.168.0.1"
#domain_ESSID="some.domain"
# LEAP users will want to use the preassociate setting to specify
# an authentication script
#preassociate_ESSID="/run/this/script"
# Map a MAC address to an ESSID
# This is used when the Access Point is not broadcasting it's ESSID
# WARNING: This will override the ESSID being broadcast due to some
# Access Points sending an ESSID even when they have been configured
# not too!
# Change 001122334455 to the MAC address and ESSID to the ESSID
# it should map to
#essid_001122334455="ESSID"
# This lists the preferred ESSIDs to connect to in order
# ESSID's can contain any characters here as they must match the broadcast
# ESSID exactly.
# Surround each ESSID with the " character and seperate them with a space
# If the first ESSID isn't found then it moves onto the next
# If this isn't defined then it connects to the first one found
#preferred_aps=( "ESSID 1" "ESSID 2" )
|
|
|
Back to top |
|
 |
CB2206 Tux's lil' helper

Joined: 27 May 2003 Posts: 127 Location: NRW
|
Posted: Fri Jul 23, 2004 4:59 am Post subject: |
|
|
UberLord wrote: | Hey - go and kick the owners into giving them decent names
I'll think about it - no promises though |
it is often said for not-public wlans to give them a name, with which one is not able to guess whose wlan this is. (kind of security...well, i dont think so but i heard and read this very often) _________________ CB |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Jul 23, 2004 9:02 am Post subject: |
|
|
crafteh wrote: | I've emerged the package, installed my card's drivers, and edited the configs, but when i do "/etc/init.d/net.ath0 start" I don't get the output that everyone else gets. It doesn't look like the preup function gets executed. |
Ensure that net.ath0 is a symlink to net.eth0 Code: | rm /etc/init.d/net.ath0
ln -sf /etc/init.d/net.eth0 /etc/init.d/net.ath0 |
Ensure that your /etc/conf.d/net has the patch in - but from your comment about the preup I assume it has.... _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Jul 23, 2004 6:28 pm Post subject: |
|
|
NEW EBUILD POSTED
No new features or functionality added ..... so why goto version 0.5.0?
Well, it's undergone a major code cleanup - it's much more modular hardly uses "global" variables any more. This makes it much easier to debug and add new features.
For those interested, I just have 3 global arrays and that's to hold the results of a network scan. (Not that anything was really "global" as everthing is still "local" to the main functions).
I think all functionality is supported, but post any problems you have with it here and I'll get them fixed.
I'm away for a few days, so feel free to go back to 0.4.10 if I don't fix em fast enough for you! _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
Zebbeman n00b


Joined: 14 Jun 2003 Posts: 69
|
Posted: Sat Jul 24, 2004 1:48 am Post subject: |
|
|
Hi,
I've been trying for a week now with no luck.
My nic is a Netgear WG311T.
My AP is a Netgear DG834G.
I'm using madwifi-driver for my Atheros chip, and I'm loading wlan, ath_hal and ath_pci. I also got CONFIG_NET_RADIO=y and CONFIG_NET_WIRELESS=y in my kernel (2.6.7).
I got almost there, but couldn't get an IP by DHCP. I found my AP, it said I was connected, but when trying receiving an address I only got [!!]. Today I got connected to my neighbour's AP by mistake, and it worked fine. Only with 11Mbps though, it's a 11b AP. Anyway, I thought I might get rid of the problem by getting the new ebuild (0.5.0), but now everything stopped working.
Code: |
* Running preup function
* Configuring wireless network for ath0
* ath0 does not support setting keys
* or the parameter "key_nowire" is incorrect
* Failed to configure wireless for ath0
* preup ath0 failed
|
I tried to skip the parameters, that's how I got connected to my neighbour, but then I got this:
Code: |
* Running preup function
* Configuring wireless network for ath0
* Scanning for access points
* no access points found
* Couldn't find any access points on ath0
* Failed to configure wireless for ath0
* preup ath0 failed
|
I had the MAC of my AP in iwconfig ath0 before, but now it's only FF:FF:FF:FF:FF:FF. I did ran etc-update and ebuild config after updgrade and removed it in /net after (I guess it's only adding preup() once more?).
Can anyone give me a hint of what's happening here?
Edit: I see my AP's mac now, posting iwconfig & ifconfig:
Code: |
iwconfig
ath0 IEEE 802.11 ESSID:"nowire"
Mode:Managed Frequency:2.462GHz Access Point: $MAC
Bit Rate:1Mb/s Tx-Power:50 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:20/94 Signal level:-75 dBm Noise level:-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
ifconfig
ath0 Link encap:Ethernet HWaddr $MAC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2387 errors:1401 dropped:0 overruns:0 frame:1401
TX packets:1027 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:176048 (171.9 Kb) TX bytes:46355 (45.2 Kb)
Interrupt:17 Memory:e09c0000-e09d0000
|
Regards,
Seb |
|
Back to top |
|
 |
CB2206 Tux's lil' helper

Joined: 27 May 2003 Posts: 127 Location: NRW
|
Posted: Sat Jul 24, 2004 7:55 am Post subject: |
|
|
mh, i have partly the same problem with one ap i'm sometimes connecting to. it is recognized, but dhcp does not work. setting ip etc. by hand works and i can use this wlan. with my wlan at home i don't have any problems using dhcp.
is this an incompatibility of the hardware?
wlan card in notebook: dell truemobile 1300 using with ndiswrapper
ap at home: level one card with atheros chipset using madwifi-driver in ap-mode
ap with which dhcp does not work: i think elsa, have to check it again on monday _________________ CB |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sat Jul 24, 2004 11:11 am Post subject: |
|
|
Zebbeman wrote: | Hi,
I've been trying for a week now with no luck.
My nic is a Netgear WG311T.
My AP is a Netgear DG834G.
I'm using madwifi-driver for my Atheros chip, and I'm loading wlan, ath_hal and ath_pci. I also got CONFIG_NET_RADIO=y and CONFIG_NET_WIRELESS=y in my kernel (2.6.7).
I got almost there, but couldn't get an IP by DHCP. I found my AP, it said I was connected, but when trying receiving an address I only got [!!]. Today I got connected to my neighbour's AP by mistake, and it worked fine. Only with 11Mbps though, it's a 11b AP. Anyway, I thought I might get rid of the problem by getting the new ebuild (0.5.0), but now everything stopped working.
|
I have the WG311 card as well - however I cannot recommend the mad-wifi driver in portage as it's quite old and does have a few problems. The CVS one is much more reliable. Changing to a CVS build may cure your DHCP problem.
Also, could you post your config file options you have enabled? (ie don't post the entire conf.d/wireless) _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
CB2206 Tux's lil' helper

Joined: 27 May 2003 Posts: 127 Location: NRW
|
Posted: Sat Jul 24, 2004 1:36 pm Post subject: |
|
|
UberLord wrote: | NEW EBUILD POSTED
Quite a few bugs fixed - more than I thought!
You can now assign a WEP key to a MAC address
Code: | key_001122334455="s:foobar enc open" |
for example |
woohooo...great. i'll check this out later on! thanx in advanced! _________________ CB |
|
Back to top |
|
 |
CB2206 Tux's lil' helper

Joined: 27 May 2003 Posts: 127 Location: NRW
|
Posted: Sat Jul 24, 2004 3:11 pm Post subject: |
|
|
works great. thanks a lot!
one small thing: in the output of net.wlan0 i get an error saying about "invalid argument":
Code: |
* Running predown function
* Removing wireless configuration from wlan0... [ ok ]
* Bringing wlan0 down...
* Releasing DHCP lease for wlan0 [ ok ]
* Stopping wlan0
RTNETLINK answers: Invalid argument [ ok ]
* Running preup function
* Configuring wireless network for wlan0
* Scanning for access points
* Found "wlan" at 00:11:22:33:44:55 (WEP required)
* Connecting to "wlan" (WEP enabled)... [ ok ]
* wlan0 connected to "wlan" in managed mode
* on channel 03 (WEP enabled)
* Bringing wlan0 up...
* wlan0 dhcp [ ok ]
* wlan0 received address 192.168.0.3
|
and why is wireless-config not implemented in the standard gentoo net scripts? _________________ CB |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sat Jul 24, 2004 3:53 pm Post subject: |
|
|
CB2206 wrote: | works great. thanks a lot!
one small thing: in the output of net.wlan0 i get an error saying about "invalid argument":
Code: |
* Running predown function
* Removing wireless configuration from wlan0... [ ok ]
* Bringing wlan0 down...
* Releasing DHCP lease for wlan0 [ ok ]
* Stopping wlan0
RTNETLINK answers: Invalid argument [ ok ]
|
|
That's because you're using iproute2 instead of net-tools.
The Gentoo net.eth0 script does not handle iproute2 as well as net-tools at this time - try unemerging iproute2 and re-emerging net-tools and this error should go away.
Quote: |
and why is wireless-config not implemented in the standard gentoo net scripts? |
It's not yet ........ but should be soon  _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
CB2206 Tux's lil' helper

Joined: 27 May 2003 Posts: 127 Location: NRW
|
Posted: Sat Jul 24, 2004 4:08 pm Post subject: |
|
|
UberLord wrote: |
That's because you're using iproute2 instead of net-tools.
The Gentoo net.eth0 script does not handle iproute2 as well as net-tools at this time - try unemerging iproute2 and re-emerging net-tools and this error should go away.
|
ok, thx. message is gone now.
UberLord wrote: | It's not yet ........ but should be soon  |
great.  _________________ CB |
|
Back to top |
|
 |
zaai Apprentice


Joined: 24 Jul 2004 Posts: 175
|
Posted: Sat Jul 24, 2004 10:02 pm Post subject: WEP problems |
|
|
Hi UberLord, what a great script
Several people reported problems with WEP. Same here.
I'm pretty sure it isn't the wep key because the key is correct because when I type it manually:
iwconfig eth1 key 0011-2233-4455-6677-8899-aabb-cc
dhcpd eth1
then it works
To be sure it is not a timing issue I set: sleep_associate_eth1="5"
Here are the details:
1. plug in the card
Code: |
# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 9073 1 0 13:56 ? 00:00:00 [scsi_eh_0]
root 12256 1 0 14:19 ? 00:00:00 /sbin/cardmgr -s /var/run/stab -f
root 13160 4 0 14:37 ? 00:00:00 /bin/sh /sbin/hotplug net
root 13161 13160 2 14:37 ? 00:00:00 /bin/bash /sbin/runscript.sh /etc/init.d/net.eth1 --quiet start
root 13238 13161 0 14:37 ? 00:00:00 /sbin/dhcpcd eth1
|
2. iwconfig:
Code: |
# iwconfig
eth1 IEEE 802.11-DS ESSID:"Wheel" Nickname:"Prism I"
Mode:Managed Frequency:2.417GHz Access Point: 00:09:5B:6B:14:12
Bit Rate:11Mb/s Tx-Power=15 dBm Sensitivity:1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:68/92 Signal level:-46 dBm Noise level:-149 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
|
The 'wireless' script (listed down below) contains an entry for AP 'Wheel' including encryption key '0011-2233-4455-6677-8899-aabb-cc'
However, iwconfig shows no encryption.
After a while of doing nothing the essid goes empty as the search for a usable AP continues.
3. ifconfig
Code: |
# ifconfig:
eth1 Link encap:Ethernet HWaddr 00:04:E2:29:42:F8
inet6 addr: fe80::204:e2ff:fe29:42f8/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:3 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:3592 (3.5 Kb)
Interrupt:3 Base address:0x100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
|
Heh does this mean that dhcpd created an entry for eth1 already?
4. last, the manual fix
Now the reason why I think this is a script bug:
Code: |
iwconfig eth1 key 0011-2233-4455-6677-8899-aabb-cc
(I doublechecked to make sure it was exactly as in the script)
dhcpd eth1
ping www.telus.net
|
It works!
So I'm quite sure the script either didn't set the key or that iwconfig didn't accept it at the time.
5. Below the content of wireless - the WEP key is changed into aabb-aabb-aabb-aabb-aa
As you can see the key is bound to the essid. I've also tried it with the AP MAC but that didn't help either.
Code: |
# /etc/conf.d/wireless:
# Global wireless config file for net.* rc-scripts
##############################################################################
# HINTS
##############################################################################
# Remember to change eth0 to your wireless interface which may be
# eth0, eth1, wlan0, ath0 - you get the idea. If you're not sure
# you can type "iwconfig" at the command prompt and it will tell you which
# interfaces are wireless.
# Say that your wireless interface is ath0 - the line
# #essid_eth0="any"
# becomes
# #essid_ath0="any"
#
# Remember to change ESSID to your ESSID.
# Say that your ESSID is My NET - the line
# #key_ESSID="s:passkey"
# becomes
# #key_My_NET="s:passkey"
# Notice that the space has changed to an underscore - do the same with all
# characters not in a-z A-Z (english alphabet) 0-9.
#
# Any ESSID's in quotes like essid_eth0="My NET" may need to be escaped
# This means placing the character \ before the character
# \" need to be escaped for example
# So if your ESSID is
# My "\ NET
# it becomes
# My \"\\ NET
# for example
# #essid_eth0="My\"\\NET"
#
# As a final note, most users will just need to set the following options
# key_ESSID1="s:yourkeyhere enc open"
# key_ESSID2="s:yourothrkey enc open"
# preferred_aps=( "ESSID1" "ESSID2" )
#
# Clear? Good. Now configure your wireless network below
#########################################################
##############################################################################
# SETTINGS
##############################################################################
# Hard code an ESSID to an interface - leave this unset if you wish the driver
# to scan for available Access Points
# Set to "any" to connect to any ESSID - the driver picks an Access Point
# This needs to be done when the driver doesn't support scanning
# This may work for drivers that don't support scanning but you need automatic
# AP association
# I would only set this as a last resort really - use the preferred_aps
# setting at the bottom of this file
#essid_eth0="any"
#Wheel_eth1="any"
# Set the mode of the interface (ad-hoc or managed). Managed is default
# If it's ad-hoc you also need to specify the channel below
#mode_eth0="Managed"
mode_eth1="Managed"
# If managed mode fails, drop to ad-hoc mode with the below ESSID?
# If this is set, then remember to configure wireless options such as ifconfig
# for the specified ESSID. Channel can be set (1-14), but defaults to 3 if
# not set.
#
# The below is taken verbatim from the BSD wavelan documentation found at
# http://www.netbsd.org/Documentation/network/wavelan.html
# There are 14 channels possible; We are told that channels 1-11 are legal for
# North America, channels 1-13 for most of Europe, channels 10-13 for France,
# and only channel 14 for Japan. If in doubt, please refer to the documentation
# that came with your card or access point. Make sure that the channel you
# select is the same channel your access point (or the other card in an ad-hoc
# network) is on. The default for cards sold in North America and most of Europe
# is 3; the default for cards sold in France is 11, and the default for cards
# sold in Japan is 14.
#adhoc_essid_eth0="WLAN"
#adhoc_channel_eth0="3"
# Setup any other config commands. This is basically the iwconfig argument
# without the iwconfig $iface
#iwconfig_eth0=""
# Set private driver ioctls. This is basically the iwpriv argument without
# the iwpriv $iface
#iwpriv_eth0=""
# We can define various timeouts here.
#sleep_scan_eth0="1"
#sleep_associate_eth0="5"
#--- HS: 24 July 2004
sleep_associate_eth1="5"
#---
# By default a successful association in Managed mode sets the MAC
# address of the AP connected to. However, some drivers (namely
# the ipw2100) don't set an invalid MAC address when association
# fails - so we need to check on link quality which some drivers
# don't report properly either.
# So if you have connection problems try flipping this setting
# Valid options are MAC, quality and all - defaults to MAC
#associate_test_eth0="MAC"
# Some driver/card combinations need to scan in Ad-Hoc mode
# After scanning, the mode is reset to the one defined above
#scan_mode_eth0="Ad-Hoc"
# Below you can define private ioctls to run before and after scanning
# Format is the same as the iwpriv_eth0 above
# This is needed for the HostAP drivers
#iwpriv_scan_pre_eth0="host_roaming 2"
#iwpriv_scan_post_eth0="host_roaming 0"
# Define a WEP key per ESSID or MAC address (of the AP, not your card)
# You can't use "any" for an ESSID here
#key_ESSID="1234-1234-1234-1234-1234-1234-56"
# or you can use strings. Passphrase IS NOT supported
# Note - this example also sets the encryption method to open
# which is regarded as more secure than restricted
#key_ESSID="s:foobar enc open"
#key_ESSID="s:foobar enc restricted"
# WEP key for the AP with MAC address 001122334455
#mac_key_001122334455="s:foobar"
#[b]key_00095b6b1412="enc open 0011-2233-4455-6677-8899-aabb-cc"[/b]
# Here are some more examples of keys as some users find others work
# and some don't where they should all do the same thing
#key_ESSID="open s:foobar"
#key_ESSID="open 1234-5678-9012"
#key_ESSID="s:foobar enc open"
#key_ESSID="1234-5678-9012 enc open"
# You may want to set muliple keys - here's an example
# It sets 4 keys on the card and instructs to use key 2 by default
#key_ESSID="[1] s:passkey1 key [2] s:passkey2 key [3] s:passkey3 key [4] s:passkey4 key [2]"
#---HS 24 July 2004
#[b]key_Wheel="0011-2233-4455-6677-8899-aabb-cc"[/b]
[b]key_Wheel="enc open 0011-2233-4455-6677-8899-aabb-cc"[/b]
#---
# You can also override the interface settings found in /etc/conf.d/net
# per ESSID - which is very handy if you use different networks a lot
#ifconfig_ESSID=( "dhcp" )
#dhcpcd_ESSID="-t 5"
#inet6_ESSID=()
#routes_ESSID=()
#ifconfig_fallback_ESSID=()
#--- HS: 24 July 2004
[b]ifconfig_Wheel=( "dhcp" )[/b]
#---
# iproute-2 style setup
#ipaddr_ESSID=( "dhcp" )
#iproute_ESSID=()
#ipaddr_fallback_ESSID=()
# Setting name/domain server causes /etc/resolv.conf to be overwritten
# Note that if DHCP is used, and you want this to take precedence then
# please put -R in your dhcpcd options
#nameserver_ESSID="192.168.0.1"
#domain_ESSID="some.domain"
# LEAP users will want to use the preassociate setting to specify
# an authentication script
#preassociate_ESSID="/run/this/script"
# Map a MAC address to an ESSID
# This is used when the Access Point is not broadcasting it's ESSID
# WARNING: This will override the ESSID being broadcast due to some
# Access Points sending an ESSID even when they have been configured
# not too!
# Change 001122334455 to the MAC address and ESSID to the ESSID
# it should map to
#essid_001122334455="ESSID"
[b]essid_00095b6b1412="Wheel"[/b]
# This lists the preferred ESSIDs to connect to in order
# ESSID's can contain any characters here as they must match the broadcast
# ESSID exactly.
# Surround each ESSID with the " character and seperate them with a space
# If the first ESSID isn't found then it moves onto the next
# If this isn't defined then it connects to the first one found
#preferred_aps=( "ESSID 1" "ESSID 2" )
[b]preferred_aps=( "Wheel" "default" )[/b]
|
|
|
Back to top |
|
 |
|