View previous topic :: View next topic |
Author |
Message |
5xl n00b
Joined: 08 Aug 2004 Posts: 27 Location: Gaithersburg, MD, US
|
Posted: Tue Aug 10, 2004 6:48 pm Post subject: |
|
|
New update of my info.
Please help me! I'm getting pretty desparate here...
dmesg:
Code: | ndiswrapper version 0.8 loaded
ndiswrapper adding bcmwl5.sys
wlan0: ndiswrapper ethernet device 00:90:4b:5b:99:a4 using driver bcmwl5.sys |
Code: | #iwconfig wlan0
wlan0 IEEE 802.11g ESSID:""
Mode:Managed Frequency:2.462GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:54Mb/s Tx-Power:24 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-10 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:311 Missed beacon:0 |
Any attempt to change this info is ignored (ie changing the essid etc) It's like I never entered a command in the first place. When I try to start the card I get this:
Code: | # /etc/init.d/net.wlan0 restart
* Running preup function
* Configuring wireless network for wlan0
* Scanning for access points
* no access points found
* Trying to force preferred incase they are hidden
* Connecting to "82113" (WEP enabled)... [ !! ]
* Failed to associate with any preferred access points on wlan0
* Couldn't find any access points on wlan0
* Failed to configure wireless for wlan0
* preup wlan0 failed |
I have tried absolutly everything from changing ndiswrapper versions to changing the inf files i use. My laptop is a hp zx5000 and I have a broadcom 802.11g card. Any help would be greatly appreciated. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Wed Aug 11, 2004 8:32 am Post subject: |
|
|
5xl wrote: |
I don't really use 00000 as the essid, it's just an example, my real one is 82113. For that matter, it won't take any essid or any paramer... What else could be making iwconfig not respond? I'm assuming the use of iwconfig is crucial to get this script working... |
Could you try starting the ESSID with a letter? Obviously you would have to change the AP as well
Have you tried manualling setting ESSID?
Code: |
ifconfig wlan0 up
iwconfig wlan0 essid 82113 |
_________________ 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: Wed Aug 11, 2004 8:42 am Post subject: |
|
|
GreenPea wrote: |
Now my antena stays off until I /etc/init.d/net.wlan0 start and it turns off when I /etc/init.d/net.wlan0 stop.
I understand this is not for everyone, but it works well for me since I am wired most of the time and want my wireless only when I want it.
I am not a coder so I must beg some help or at least a pointer in the right direction. Is there a script or config that will start eth0 on start up, and if that works move on with the rest of the start up skipping wlan0, but if it fails, try to start wlan0 using wireless-config? This would save a lot of hassle of having to go back and rerun ssh, ntpdate etc startup scripts after eth0 fails and I manualy start wlan0. |
This should work for you
Code: |
###########################################
# Hook wireless into /etc/init.d/net.eth0
# Please note, these lines should appear
# at the END of the file
source /etc/init.d/wireless.sh
preup() {
local iface=${1}
if [[ wlan0 == ${iface} ]]; then
modprobe ndiswrapper
wireless_up ${iface}
return $?
else
return 0
fi
}
postdown() {
local iface=${1}
if [[ wlan0 == ${iface} ]]; then
wireless_down ${iface}
rmmod ndiswrapper
return $?
else
return 0
fi
}
# End hook
########################################### |
_________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
5xl n00b
Joined: 08 Aug 2004 Posts: 27 Location: Gaithersburg, MD, US
|
Posted: Wed Aug 11, 2004 3:54 pm Post subject: |
|
|
Code: | home root # iwconfig wlan0 essid setsomething
home root # iwconfig wlan0
wlan0 IEEE 802.11g ESSID:""
Mode:Managed Frequency:2.462GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:54Mb/s Tx-Power:24 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-10 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:934 Missed beacon:0
home root # iwconfig wlan0 essid TRYCAPITAL
home root # iwconfig wlan0
wlan0 IEEE 802.11g ESSID:""
Mode:Managed Frequency:2.462GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:54Mb/s Tx-Power:24 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-10 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:935 Missed beacon:0
home root # iwconfig wlan0 essid 123456
home root # iwconfig wlan0
wlan0 IEEE 802.11g ESSID:""
Mode:Managed Frequency:2.462GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:54Mb/s Tx-Power:24 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-10 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:935 Missed beacon:0
home root # iwconfig wlan0 essid "tryquotes"
home root # iwconfig wlan0
wlan0 IEEE 802.11g ESSID:""
Mode:Managed Frequency:2.462GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:54Mb/s Tx-Power:24 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-10 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:1163 Missed beacon:0
home root # iwconfig wlan0 up
Error : unrecognised wireless request "up"
|
weird, isn't it? |
|
Back to top |
|
|
Anarcho Advocate
Joined: 06 Jun 2004 Posts: 2970 Location: Germany
|
Posted: Wed Aug 11, 2004 5:32 pm Post subject: |
|
|
Maybe you should try
iwconig wlan0 commit
after you set the essid |
|
Back to top |
|
|
kamagurka Veteran
Joined: 25 Jan 2004 Posts: 1026 Location: /germany/munich
|
Posted: Wed Aug 11, 2004 6:36 pm Post subject: |
|
|
UberLord wrote: | kamagurka wrote: |
i assume you mean i should put it in /etc/conf.d/wireless. it has no noticeable effect.
is it a problem that i am also hardconnected to the router when i try to get the wlan up? |
Doubtfull.
Running any security like WPA, MAC filtering, etc on the AP? |
nope, i turned all that off; i'm gonna turn it back on when i have this running.
and it still isn't working; i can't get it to work manually either. when i try to set the essid manually, it is as if nothing happened.
Code: | └─# iwconfig wlan0 essid test
└─# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
sit0 no wireless extensions.
wlan0 IEEE 802.11b ESSID:off/any
Mode:Managed Frequency:2.462GHz Access Point: 00:00:00:00:00:00
Bit Rate:54Mb/s
RTS thr:1600 B Fragment thr:2304 B
Encryption key:off
Power Management:off
Link Quality:0/100 Signal level:24/154 Noise level:0/154
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0 |
(yes, my ap's essid (or ssid, as barricade likes to call it) is set to "test" right now). _________________ If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word |
|
Back to top |
|
|
moramis n00b
Joined: 12 Aug 2004 Posts: 2
|
Posted: Thu Aug 12, 2004 12:25 am Post subject: Failover to any/dhcp? |
|
|
Forgive me if this question has been answered, but I couldn't find it in the sample config file nor in the 20-some pages I have read so far of this 50-page topic.
I have the system working perfectly, switching between home and office networks correctly. What I would like to do in the case of not finding any of my preferred SSIDs is fall back to looking for any SSID and using DHCP. The only specific fall back mechanism I can see is ad-hoc, and leaving it out entirely doesn't appear to do what I want.
Can this be done? How do I specify DHCP for non-preferred SSIDs? |
|
Back to top |
|
|
UndercoverParrothead n00b
Joined: 12 Aug 2004 Posts: 15 Location: Stafford, VA
|
Posted: Thu Aug 12, 2004 4:32 am Post subject: |
|
|
I've gone through many of the pages on this topic as well and can't seem to find any answers to my problems.
I have an AP that I have to manually specify the nameservers for. I've set
Code: | nameserver_NETGEAR="38.9.213.2"
nameserver_NETGEAR="38.9.223.2" |
and
Code: | dhcpcd_NETGEAR="-R" |
yet I still have to manually edit /etc/resolv.conf to specify the nameservers. Am I missing something here? |
|
Back to top |
|
|
moramis n00b
Joined: 12 Aug 2004 Posts: 2
|
Posted: Thu Aug 12, 2004 4:37 am Post subject: |
|
|
-R *prevents* dhcpcd from replacing your resolv.conf. Get rid of it if you want the DHCP server to set your DNS. |
|
Back to top |
|
|
UndercoverParrothead n00b
Joined: 12 Aug 2004 Posts: 15 Location: Stafford, VA
|
Posted: Thu Aug 12, 2004 5:15 am Post subject: |
|
|
That's the thing, for this specific ESSID I *don't* want DHCP setting the nameserver settings, I need to manually specify them. If I read things right, then I need to specify -R for this to work, no?
Regardless, whether or not I have -R specified, DHCP is still overwriting /etc/resolv.conf. In one of the two cases, it shouldn't be doing this. |
|
Back to top |
|
|
cult hero Apprentice
Joined: 13 Oct 2002 Posts: 186 Location: Las Vegas
|
Posted: Thu Aug 12, 2004 5:15 am Post subject: |
|
|
I dunno if I found a problem or what... but... here goes. I have three APs I use regularly (my place, work, friend's place) and wanted to configure APs for them. Seemed easy enough...
Here's my configuration:
Code: | preferred_aps=("cantina", "shadowninja", "ubernet")
preferred_only="no"
key_cantina="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx"
key_shadowninja="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx"
key_ubernet="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx" |
Obviously I blotted out keys. Anyway, the end result works, but here's the problem I get:
Code: | /etc/init.d/net.eth0 start
* Running preup function
* Configuring wireless network for eth0
* Scanning for access points
* Found "cantina" at 00:06:25:98:DC:C6 (WEP required)
* Trying to force preferred incase they are hidden
* Connecting to "cantina," (WEP Disabled)... [ !! ]
* Connecting to "shadowninja," (WEP Disabled)... [ !! ]
* Connecting to "ubernet" (WEP enabled)... [ !! ]
* Failed to associate with any preferred access points on eth0
* Connecting to "cantina" (WEP enabled)... [ ok ]
* eth0 connected to "cantina" in managed mode
* on channel 7 (WEP enabled)
* Bringing eth0 up via DHCP... [ ok ]
* eth0 received address 192.168.0.109 |
Not only is the script trying to connect without WEP at first, but strangely... on it's FIRST try to my third preferred AP it tries with WEP. Logically I'd think it would try all three without WEP first and THEN try with WEP. (And I'd prefer having it do WEP first.)
While it could be my configuration I figured I might as well post it because it's so strange.
Anyway... I want to say many thanks for this script though. I just flat out rocks. _________________ Repeat after me! This world is made of love and peace! |
|
Back to top |
|
|
GreenPea n00b
Joined: 24 Jan 2003 Posts: 25 Location: Boise ID
|
Posted: Thu Aug 12, 2004 11:00 pm Post subject: |
|
|
UberLord, Thank you very much for the additional code. I must have a conceptual error somewhere. I commented out the previous wireless hooks section and pasted your new one in.
With the following settings, this is what happens durring boot:
just eth0 set to default -> success or fail, system does not try wlan0.
eth0 and wlan0 set to default -> trys to bring up both regardless
This is the process I was hoping for:
(durring boot)-> start eth0 IF DHCP success -> skip trying wlan0 and move on with the rest of the start up IF eth0 DHCP timout or fails -> try wlan0 (success or fail) move on with boot
Is there something obvious that I missed, or should I have these set some other way?
Thanks again for your help.
GP. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Aug 13, 2004 12:35 pm Post subject: Re: Failover to any/dhcp? |
|
|
moramis wrote: | Forgive me if this question has been answered, but I couldn't find it in the sample config file nor in the 20-some pages I have read so far of this 50-page topic.
I have the system working perfectly, switching between home and office networks correctly. What I would like to do in the case of not finding any of my preferred SSIDs is fall back to looking for any SSID and using DHCP. The only specific fall back mechanism I can see is ad-hoc, and leaving it out entirely doesn't appear to do what I want.
Can this be done? How do I specify DHCP for non-preferred SSIDs? |
This can be done
Set the default config for the interface to DHCP - ifconfig_eth0=( "dhcp" )
Set the config for your preferred ESSIDs - ifconfig_ESSID=( "192.etc etc") _________________ 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 Aug 13, 2004 12:37 pm Post subject: |
|
|
UndercoverParrothead wrote: | I've gone through many of the pages on this topic as well and can't seem to find any answers to my problems.
I have an AP that I have to manually specify the nameservers for. I've set
Code: | nameserver_NETGEAR="38.9.213.2"
nameserver_NETGEAR="38.9.223.2" |
and
Code: | dhcpcd_NETGEAR="-R" |
yet I still have to manually edit /etc/resolv.conf to specify the nameservers. Am I missing something here? |
At this time you can only set one nameserver - with your config it will use the last one.
The dhcpcd_NETGEAR option is correct - however, is that the exact ESSID? If it is netgear it will not work as it's lowercase ... _________________ 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 |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Aug 13, 2004 12:50 pm Post subject: |
|
|
GreenPea wrote: |
This is the process I was hoping for:
(durring boot)-> start eth0 IF DHCP success -> skip trying wlan0 and move on with the rest of the start up IF eth0 DHCP timout or fails -> try wlan0 (success or fail) move on with boot
|
OK - this is tricky
You will need to put both eth0 and wlan0 in default runlevel for both to start
eth0 will always be tried first (rc goes in alpha order)
So, you need to add some code to preup to case a failure if the iface is wlan0 and eth0 is started
Code: |
local status=$( rc-status default | awk '/net.eth0/ {print $3}' | grep started )
if [[ -n ${status} ]]; then
eerror "net.eth0 has been started - aborting net.wlan0 startup"
return 1
fi
|
Put that in your pre-up function and I think you're golden _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
UndercoverParrothead n00b
Joined: 12 Aug 2004 Posts: 15 Location: Stafford, VA
|
Posted: Fri Aug 13, 2004 4:14 pm Post subject: |
|
|
UberLord wrote: |
At this time you can only set one nameserver - with your config it will use the last one.
The dhcpcd_NETGEAR option is correct - however, is that the exact ESSID? If it is netgear it will not work as it's lowercase ... |
I commented out the second nameserver entry - and yes, the ESSID is correct, including the case.
I just restarted the wireless card again:
1) ifconfig eth1 down
2) /etc/init.d/net.eth1 restart
3) cat /etc/resolv.conf:
Code: | nameserver 192.168.0.1 |
So it's not obeying what I've specified in /etc/conf.d/wireless... |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Madferret n00b
Joined: 23 Jul 2004 Posts: 13
|
Posted: Fri Aug 13, 2004 6:07 pm Post subject: |
|
|
I just installed your ebuild and it works flawlessly
this was exactly what i was looking for
Just wanna say thanks and keep up the good work
btw, I'm using the USR5410 pcmcia (802.11g) with 128-bit wep, using the linuxant driver. I wish I could use the ACX111 drivers but i couldn't get wep working with the native ACX111 drivers or it's not currently supported. |
|
Back to top |
|
|
cult hero Apprentice
Joined: 13 Oct 2002 Posts: 186 Location: Las Vegas
|
Posted: Fri Aug 13, 2004 10:05 pm Post subject: |
|
|
UberLord: Yup. I feel like an ass now. The commas were the problem. Thanks a bunch though. The script works PERFECTLY now. (I guess it did before too since the error was mine.) My mom's using a Gentoo laptop now! Making sure wireless "just worked" was the last thing I needed before switching her! So know that you've helped bring a luddite to Linux. _________________ Repeat after me! This world is made of love and peace! |
|
Back to top |
|
|
UndercoverParrothead n00b
Joined: 12 Aug 2004 Posts: 15 Location: Stafford, VA
|
Posted: Sat Aug 14, 2004 12:16 am Post subject: |
|
|
Just to make sure I'm doing things right - I downloaded that version of wireless.sh and replaced the version in /etc/init.d (After making a backup, of course).
And no, it didn't work.
Drop me an IM at UndrcvrParrothed and maybe we can figure it out if you get the chance. |
|
Back to top |
|
|
ixtow Tux's lil' helper
Joined: 17 Feb 2004 Posts: 102
|
Posted: Sun Aug 15, 2004 1:20 am Post subject: getting started, how fun..... |
|
|
Code: |
bash-2.05b# cd /usr/local/portage/net-wireless/wireless-config
bash-2.05b# wget http://rsm.demon.co.uk/~roy/downloads/wireless-config-0.5.5.ebuild
--21:19:41-- http://rsm.demon.co.uk/%7Eroy/downloads/wireless-config-0.5.5.ebuild
=> `wireless-config-0.5.5.ebuild'
Resolving rsm.demon.co.uk... 80.177.174.176
Connecting to rsm.demon.co.uk[80.177.174.176]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,159 [text/plain]
100%[====================================>] 2,159 --.--K/s
21:19:42 (28.00 KB/s) - `wireless-config-0.5.5.ebuild' saved [2159/2159]
bash-2.05b# ebuild wireless-config-0.5.5.ebuild digest
!!! aux_get(): ebuild for 'net-wireless/wireless-config-0.5.5' does not exist at:
!!! /usr/portage/net-wireless/wireless-config/wireless-config-0.5.5.ebuild
doebuild(): aux_get() error; aborting.
bash-2.05b#
|
Sooo......
Code: |
bash-2.05b# pwd
/usr/local/portage/net-wireless/wireless-config
bash-2.05b# ls -l
total 4
-rw-r--r-- 1 root root 2159 Jul 28 10:46 wireless-config-0.5.5.ebuild
bash-2.05b# ebuild wireless-config-0.5.5.ebuild digest
!!! aux_get(): ebuild for 'net-wireless/wireless-config-0.5.5' does not exist at:
!!! /usr/portage/net-wireless/wireless-config/wireless-config-0.5.5.ebuild
doebuild(): aux_get() error; aborting.
bash-2.05b#
|
Maybe, if I take that "/local" out of it..... |
|
Back to top |
|
|
Ecco Tux's lil' helper
Joined: 06 Feb 2004 Posts: 80 Location: the Netherlands
|
Posted: Sun Aug 15, 2004 6:54 pm Post subject: Re: getting started, how fun..... |
|
|
ixtow wrote: |
Maybe, if I take that "/local" out of it..... |
I'll just bet you didn't put
Code: | PORTDIR_OVERLAY="/usr/local/portage" |
in your /etc/make.conf?
Try putting "digest" in your FEATURES and then "emerge wireless-config". It should make the digest automatically. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Aug 16, 2004 8:56 am Post subject: |
|
|
UndercoverParrothead wrote: |
Just to make sure I'm doing things right - I downloaded that version of wireless.sh and replaced the version in /etc/init.d (After making a backup, of course).
And no, it didn't work.
Drop me an IM at UndrcvrParrothed and maybe we can figure it out if you get the chance. |
I've upped a new test version (same URL). It's not changed except for I've added 2 debug lines to show what variables are set by your ESSID and if /etc/resolv.conf gets overwritten by my nameserver script. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
Zidge Tux's lil' helper
Joined: 20 Aug 2003 Posts: 86
|
Posted: Mon Aug 16, 2004 4:45 pm Post subject: |
|
|
Hi Uberlord
I'm trying to set my wireless network up, and I think I'm pretty much done ... though I have some config problems:
here is my AP config (a Belkin 802.11b router)
Quote: |
SSSID: Ricquet
Channel: 1
Encryption: WEP 64 bits manual
DHCP: activated
|
and here is my /etc/conf.d/wireless (without comment)
Quote: |
essid_wlan0="Ricquet"
channel_wlan0="1"
key_Ricquet="12-34-56-78-90 enc open"
|
I also added some lines in my /etc/conf.d/net
Quote: |
iface_wlan0="dhcp"
dhcpcd_wlan0="-h Ricquet -D"
wireless_essid_wlan0="Ricquet"
wireless_channel_wlan0="1"
wireless_mode_wlan0="auto"
wireless_rate_wlan0="auto"
wireless_rts_wlan0="off"
wireless_frag_wlan0="iff"
wireless_key_memory="restricted 1234-5678-90"
|
just in case :p
when I do a
/etc/init.d/net.wlan0 start I then have
Quote: |
* Running preup function
* Configuring wireless network for wlan0
* Connecting to "Ricquet" (WEP enabled)... [ !! ]
* Failed to configure wireless for wlan0
* preup wlan0 failed
|
What have I wrong ? |
|
Back to top |
|
|
|