View previous topic :: View next topic |
Author |
Message |
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
|
|
Back to top |
|
 |
allucid Veteran

Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Thu Jul 15, 2004 3:11 pm Post subject: |
|
|
UberLord wrote: | allucid wrote: | Ok, I have everything working (almost) perfectly now. This is great. I do have a feature request, though.
Would it be possible to add a post-associate script option? I have a login script I run after associating with a certain access point that I would like to have run automatically. |
You can already do this in the pre-up function in /etc/conf.d/net
https://forums.gentoo.org/viewtopic.php?p=1274868#1274868 |
thanks again! |
|
Back to top |
|
 |
spacezmonkey n00b


Joined: 26 May 2004 Posts: 52 Location: Singapore
|
Posted: Thu Jul 15, 2004 5:19 pm Post subject: |
|
|
i had changed /etc/conf.d/wireless and when i try the following command.i recievie this error..
Code: |
root@fallenangel wireless-config # /etc/init.d/net.wlan0 start
* Running preup function
* Configuring wireless network for wlan0
* Connecting to "Yang" (WEP enabled)... [ ok ] * wlan0 connected to "Yang" in managed mode
* on channel (WEP enabled)
* Bringing wlan0 up...
* wlan0 dhcp
[ !! ]
|
Code: |
##############################################################################
# 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_wlan0="Yang"
# 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_wlan0="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
below is my configuration:
# 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_wlan0="channel 10"
# 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"
# 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_wlan0="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
# You can't use "any" for an ESSID here
key_Yang="XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX" ( i have masked this in this forum )
# 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
# 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_Yang=( "dhcp" )
dhcpcd_Yang="-t 5"
inet6_Yang=()
routes_Yang=()
ifconfig_fallback_Yang=()
# iproute-2 style setup
#ipaddr_Yang=( "dhcp" )
#iproute_Yang=()
#ipaddr_fallback_Yang=()
# 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_Yang="XXXX"
#domain_Yang="XXXX"
# 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=( "Yang" )
|
btw..i am using linksys usb adapter, do i need to edit this line in net.wlan0
Code: |
# For pcmcia users. note that pcmcia must be added to the same
# runlevel as the net.* script that needs it.
depend() {
use hotplug usb
}
|
the initial setting is use hotplug pcmcia...but i am using usb adapter so am i correcto to change to use hotplug usb as shown above?? |
|
Back to top |
|
 |
jza Tux's lil' helper

Joined: 27 Jun 2004 Posts: 87 Location: U.S.A
|
Posted: Thu Jul 15, 2004 10:06 pm Post subject: |
|
|
allucid wrote: | for ipw2100:
1) make sure /usr/src/linux is pointing to the correct kernel sources
2) make sure wireless is enabled in your kernel
3) make sure the crypto library, the ARC4 cipher algorithm, and the CRC32 library routines are enabled in your kernel
4) emerge ipw2100 |
The driver works fine as far as i'm concerned, i could even load the module, but no interfaces show up |
|
Back to top |
|
 |
allucid Veteran

Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Thu Jul 15, 2004 11:47 pm Post subject: |
|
|
what is the output of 'ifconfig -a'?
it would probably be a good idea if everyone got wireless working with the standard gentoo scripts before trying UberLord's scripts. This is turning into a general wireless support thread.  |
|
Back to top |
|
 |
allucid Veteran

Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Thu Jul 15, 2004 11:58 pm Post subject: |
|
|
UberLord wrote: | allucid wrote: | Ok, I have everything working (almost) perfectly now. This is great. I do have a feature request, though.
Would it be possible to add a post-associate script option? I have a login script I run after associating with a certain access point that I would like to have run automatically. |
You can already do this in the pre-up function in /etc/conf.d/net
https://forums.gentoo.org/viewtopic.php?p=1274868#1274868 |
from that post:
Code: | postup() {
local IFACE=${1}
local IWGETID=`which iwgetid 2>${devnull}`
local essid=`${IWGETID} -s ${IFACE}`
if [ "unifunk1" == "${essid}" ]; then
/usr/bin/vpnc-connect &>/dev/null
fi
}
|
when i run the startup script i get this error at the bottom
Code: | * Running postup function
/sbin/runscript.sh: line 1: -s: command not found
|
|
|
Back to top |
|
 |
dwalexuk n00b

Joined: 09 Mar 2004 Posts: 41
|
Posted: Fri Jul 16, 2004 7:52 am Post subject: |
|
|
UberLord wrote: |
wireless tool accepts ASCII and hex only - afaik it doesn't like dec |
It works great now great script.
I think it will be good idea to add example:
key_ESSID="aa2233bb" because I was trying to use key s:hexcode, and key dec code and of cause it wasn't workin. THnk you very much for support. |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Jul 16, 2004 8:06 am Post subject: |
|
|
spacezmonkey wrote: | i had changed /etc/conf.d/wireless and when i try the following command.i recievie this error..
Code: |
root@fallenangel wireless-config # /etc/init.d/net.wlan0 start
* Running preup function
* Configuring wireless network for wlan0
* Connecting to "Yang" (WEP enabled)... [ ok ] * wlan0 connected to "Yang" in managed mode
* on channel (WEP enabled)
* Bringing wlan0 up...
* wlan0 dhcp
[ !! ]
|
|
That shows that you cannot get a DHCP address. I would guess that the WEP key is entered wrong
Quote: |
Code: |
# For pcmcia users. note that pcmcia must be added to the same
# runlevel as the net.* script that needs it.
depend() {
use hotplug usb
}
|
the initial setting is use hotplug pcmcia...but i am using usb adapter so am i correcto to change to use hotplug usb as shown above?? |
Correct  _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
spacezmonkey n00b


Joined: 26 May 2004 Posts: 52 Location: Singapore
|
Posted: Fri Jul 16, 2004 2:22 pm Post subject: |
|
|
i have retyped my wep address and the problem is still there...
is my configuration correct?? or do i need to change anything in /etc/conf.d/net ??
[/quote] |
|
Back to top |
|
 |
Reformist Guru


Joined: 06 Oct 2002 Posts: 323
|
Posted: Sat Jul 17, 2004 2:52 am Post subject: |
|
|
Can we split this massive thread up, and/or stop posting to this one? all of my wireless queries seem to turn up this thread as #1 result, but there's no way I'm looking through 40 pages, or even the latest 20, for the answer. It's just not useful. If you have a question regarding a specific wireless topic, then post it in a separate thread, reference this one if you want to, but keep all of the discussion out of this thread. _________________ -Phil Crosby |
|
Back to top |
|
 |
iverson0881 Apprentice


Joined: 08 Jan 2004 Posts: 285 Location: CA
|
Posted: Sat Jul 17, 2004 10:40 am Post subject: |
|
|
what we really need is the capability of searching posts. and not only searching an entire forum. |
|
Back to top |
|
 |
allucid Veteran

Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Sat Jul 17, 2004 3:33 pm Post subject: |
|
|
iverson0881 wrote: | what we really need is the capability of searching posts. and not only searching an entire forum. |
you can do that already. just click 'search' at the top left and select 'display results as posts'. |
|
Back to top |
|
 |
UberLord Retired Dev


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

Joined: 01 Mar 2004 Posts: 42
|
Posted: Sun Jul 18, 2004 12:08 am Post subject: net.eth1 is not called |
|
|
the script works great for me when I call it manually with
Code: | /etc/init.d/net.eth1 start
|
however when I add the wireless card to the startup sequence by doing
Code: | rc-config add net.eth1 default
|
nothing happens!
My wireless card is initialized by the pcmcia code and
apparently /etc/init.d/net.eth1 does not get called at all !?
Does anyone know what's wrong and what I can do about it?
thanks
Nik |
|
Back to top |
|
 |
UberLord Retired Dev


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

Joined: 01 Mar 2004 Posts: 42
|
Posted: Sun Jul 18, 2004 1:45 pm Post subject: |
|
|
pcmcia is there ... I can start the card as using iwconfig or by calling
Code: | /etc/init.d/net.eth1 start |
everything works as described until i want to have wireless included in the bootup sequence.
when the system comes up i get no output for eth1 ... only the note that eth0 has no wireless extensions (which is ok)
and the connection does not work after startup. |
|
Back to top |
|
 |
niknik n00b

Joined: 01 Mar 2004 Posts: 42
|
Posted: Sun Jul 18, 2004 4:00 pm Post subject: |
|
|
hey there,
I just solved my problem: apparently my dhcp settings caused the trouble. I had
Code: | dhcpcd_eth1="-NHD -t 10 -h niksbox" |
I have not pinpointed the actual troublemaker yet. Maybe the timeout was too short.
Anyway, everybody watch out for those dhcp settings.
What is still strange:
I did not get any error messages when things failed and the usual output
Code: | /etc/init.d/net.eth1 start |
gives when called on the command line is nowhere to be seen. Apparently the pcmcia startup routines suppress that output. Is that good? Should I maybe file an error?
Anyway, great script, thanks uberlord! |
|
Back to top |
|
 |
UberLord Retired Dev


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


Joined: 09 Oct 2003 Posts: 73 Location: London, England
|
Posted: Tue Jul 20, 2004 7:35 pm Post subject: |
|
|
Helena,
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? |
Have you found a solution yet? I seem to have exactly the same symptoms. I have changed nothing to do with my wireless configuation, however it has suddenly stopped working? I think I emerged some updates at the end of last week, but I can't remember what....
Now I get the following if I try /etc/init.d/net.eth1 start
Code: |
* Running preup function
* Configuring wireless network for eth1
* Connecting to "PorthosNet" (WEP enabled)... [ !! ]
* Failed to configure wireless for eth1
* preup eth1 failed
|
It also fails to get an ip address if I try "dhcpcd eth1"
Anyone?
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 |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Jul 20, 2004 9:30 pm Post subject: |
|
|
roboguy wrote: |
Code: |
* Running preup function
* Configuring wireless network for eth1
* Connecting to "PorthosNet" (WEP enabled)... [ !! ]
* Failed to configure wireless for eth1
* preup eth1 failed
|
It also fails to get an ip address if I try "dhcpcd eth1"
|
It will fail DHCP until you connect properly.
I very much recommend using preferred_aps=( "PorthosNet" ) instead of essid_eth1="PorthosNet" as you get much more output. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
 |
LordKefka Tux's lil' helper

Joined: 30 May 2004 Posts: 86
|
Posted: Tue Jul 20, 2004 9:54 pm Post subject: |
|
|
Quote: | emerge it and follow the ebuilds instructions
If you don't run ~arch then you need to add wireless-config to your /etc/portage/package.keywords
Code:
echo "net-wireless/wireless-config ~x86" >> /etc/portage/package.keywords
(note - change ~x86 to match your ~arch)
Code:
net-wireless/wireless-config |
My arch is ~amd64. I edited package.keywords, but it's still masked when i emerge it?? |
|
Back to top |
|
 |
roboguy n00b


Joined: 09 Oct 2003 Posts: 73 Location: London, England
|
Posted: Tue Jul 20, 2004 10:01 pm Post subject: |
|
|
UberLord wrote: |
It will fail DHCP until you connect properly.
I very much recommend using preferred_aps=( "PorthosNet" ) instead of essid_eth1="PorthosNet" as you get much more output. |
The strange thing is that I haven't changed any of my wireless settings for weeks. I certainly haven't changed the SSID. Just for kicks I logged into the router and checked it and it is definately still set to 'PorthosNet'...
I made the change you recommended above and tried bringing the wireless interface up.
Code: |
porthos conf.d # /etc/init.d/net.eth1 start
* Running preup function
* Configuring wireless network for eth1
* Scanning for access points
* Found "PorthosNet" at 00:0D:54:F9:7F:DE (WEP required)
* Connecting to "PorthosNet" (WEP enabled)... [ !! ]
* 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 conf.d #
|
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...
Grrrr,
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 |
|
 |
jimnutt n00b

Joined: 21 Jul 2003 Posts: 7 Location: Dedham, MA
|
Posted: Tue Jul 20, 2004 11:01 pm Post subject: patching conf.d/net |
|
|
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
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. |
|
Back to top |
|
 |
UberLord Retired Dev


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