View previous topic :: View next topic |
Author |
Message |
duhblow7 n00b
Joined: 04 Sep 2004 Posts: 37
|
Posted: Sun Sep 12, 2004 7:59 pm Post subject: |
|
|
hi uberlord,
first off...great script, keep up the good work!!
i'm able to use the script when i don't turn on MAC filtering or WEP on my AP, but i would like some type of security. when i connect to my AP without WEP and MAC filtering, ssid = "TRON", it shows this:
Code: | tranquil oo7 # /etc/init.d/net.eth1 start
* Running preup function
* Configuring wireless network for eth1
* Connecting to "troy" (WEP Disabled)... [ ok ]
* eth1 connected to "troy�9@a" at 00:0F:66:00:BD:FF
* in managed mode on channel 6 (WEP disabled)
* Bringing eth1 up via DHCP... [ ok ]
* eth1 received address 192.168.1.5 |
why are there weird characters after my SSID name when i connect to the AP? Also because of this, when i try to define my 64bit 10 hex WEP key i cannot properly define it in /etc/conf.d/wireless.
when i turn on WEP and try:
Code: | essid_eth1="troy"
key_troy="3D-07-2C-A3-3B enc open"
preferred_aps=( "troy" )
|
i get the following output:
Code: | * Running preup function
* Configuring wireless network for eth1
* Connecting to "troy" (WEP enabled)... [ ok ]
* eth1 connected to "troy�9@a" at 00:00:00:00:00:00
* in managed mode on channel 0 (WEP enabled)
* Bringing eth1 up via DHCP... [ !! ] |
i don't think i'm getting the AP MAC address because i'm not getting passed the encryption and therefore cannot get an IP. I am using static DHCP allocations based on my wireless MAC address. I am using the Linksys WRT54G router with Samadhi2 firmware. I have an Intel 2200 Pro wireless card with ipw2200 and ieee80211_crypt_wep modules loaded.
The following commands using iwconfig were able to authenticate my wireless network:
Code: | iwconfig eth1 essid troy
iwconfig eth1 key 3D072CA433B
|
thanks,
oo7 |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sun Sep 12, 2004 8:23 pm Post subject: |
|
|
duhblow7 wrote: |
why are there weird characters after my SSID name when i connect to the AP? Also because of this, when i try to define my 64bit 10 hex WEP key i cannot properly define it in /etc/conf.d/wireless.
|
OK - too many people have reported this.
Shame, as it's much easier to use iwgetid -r instead of parsing iwconfig.
Edit /etc/init.d/wireless and look for the function wireless_get_essid
Replace the line iwgetid with the code below
Code: | iwconfig ${1} 2>${devnull} | awk -F\" '/ESSID/ {print $2}' |
Hopefully I will release a new version in a day or two _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
duhblow7 n00b
Joined: 04 Sep 2004 Posts: 37
|
Posted: Sun Sep 12, 2004 9:28 pm Post subject: |
|
|
if a lot of people have reported this, i bet it's caused by using 'hacked' firmware for the linksys routers. the most common firmware hacks for the linksys WRT54G 802.11b/g cable/dls router is called Samadhi2 and the linksys WAP54G access point is called Freya. |
|
Back to top |
|
|
duhblow7 n00b
Joined: 04 Sep 2004 Posts: 37
|
Posted: Sun Sep 12, 2004 9:43 pm Post subject: |
|
|
i tried the change you suggested. i still get an error:
Code: |
tranquil root # /etc/init.d/net.eth1 start
* Running preup function
* Configuring wireless network for eth1
* Connecting to "troy" (WEP enabled)... [ ok ]
* eth1 connected to "troy" at 00:00:00:00:00:00
* in managed mode on channel 0 (WEP enabled)
* Bringing eth1 up via DHCP... [ !! ]
tranquil root # nano -w /etc/conf.d/wireless
tranquil root # /etc/init.d/net.eth1 start
* Running preup function
* Configuring wireless network for eth1
* Connecting to "troy" (WEP Disabled)... [ ok ]
* eth1 connected to "troy" at 00:0F:66:00:BD:FF
* in managed mode on channel 6 (WEP disabled)
* Bringing eth1 up via DHCP... [ ok ]
* eth1 received address 192.168.1.5
|
the first time i tried to start net.eth1 i had wep enabled and my /etc/conf.d/wireless looked like this:
Code: | essid_eth1="troy"
key_troy="s:3D-07-2C-A3-3B enc open"
preferred_aps=( "troy" )
|
the second time i disabled WEP on the router and removed the key_troy line and it connects fine. There was one time i started net.eth1 and got this:
Code: | tranquil root # /etc/init.d/net.eth1 restart
* Running preup function
* Configuring wireless network for eth1
* Connecting to "troy" (WEP enabled)... [ ok ]
* eth1 connected to "troy" at 00:0F:66:00:BD:FF
* in managed mode on channel 6 (WEP enabled)
* Bringing eth1 up via DHCP... [ !! ] |
but i still wasn't able to get an IP. any ideas? |
|
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
|
|
Back to top |
|
|
duhblow7 n00b
Joined: 04 Sep 2004 Posts: 37
|
Posted: Sun Sep 12, 2004 11:25 pm Post subject: |
|
|
i was trying with the s: and without it.
funny thing was when i was able to get my AP's MAC address and what seemed like i connected successfully with WEP i had it with the s:. Go figure. I'll keep my eye out for your updates.
oo7 |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
hollowsoul n00b
Joined: 29 Feb 2004 Posts: 31
|
Posted: Mon Sep 13, 2004 10:36 am Post subject: |
|
|
Trying to set a Prism Duette in Master mode,
But complains, that eth5 doesnt support setting essid but i can set it with iwconfig??
Code: | * Running preup function
* Configuring wireless network for eth5
* eth5 does not support setting ESSID to "Donnie Darko"
* Failed to configure wireless for eth5
* preup eth5 failed
|
tail -f /var/log/messages/current and got the following when i ran the script, any ideas what is wrong linux-2.6.9-rc1-mm4
Code: | Sep 13 10:46:19 [kernel] eth5: reset problem: no 'reset complete' IRQ seen
Sep 13 10:46:20 [kernel] eth5: timeout waiting for mgmt response
Sep 13 10:46:20 [kernel] eth5: mgt_commit_list: failure. oid=ff020008 err=-110
Sep 13 10:46:21 [kernel] eth5: timeout waiting for mgmt response
Sep 13 10:46:21 [kernel] eth5: mgt_commit_list: failure. oid=ff020003 err=-110
Sep 13 10:46:22 [kernel] eth5: timeout waiting for mgmt response
Sep 13 10:46:22 [kernel] eth5: mgt_commit_list: failure. oid=10000000 err=-110
Sep 13 10:46:23 [kernel] eth5: timeout waiting for mgmt response
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=17000007 err=-110
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=19000001 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=10000002 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=19000004 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000000 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000001 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000002 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000004 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000005 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000006 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000007 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=12000003 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=150007e0 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=ff02000c err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_commit_list: failure. oid=ff020003 err=-12
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
Sep 13 10:46:23 [kernel] eth5: mgt_update_addr: failure
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
- Last output repeated 12 times -
Sep 13 10:46:23 [rc-scripts] eth5 does not support setting ESSID to "Donnie Dark o"
Sep 13 10:46:23 [rc-scripts] Failed to configure wireless for eth5
Sep 13 10:46:23 [kernel] eth5: mgmt tx queue is still full
- Last output repeated 8 times -
Sep 13 10:46:23 [rc-scripts] preup eth5 failed
|
|
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
bjchamb n00b
Joined: 30 Jan 2004 Posts: 17
|
Posted: Wed Sep 15, 2004 5:06 pm Post subject: Loading Modules |
|
|
Is there any way that I can have the script load the appropriate modules when I bring the interface up (and ideally unload them when I bring the interface down)? The reason I need this is because if the module loaded at boot time (for some reason) iwconfig fails to detect it. But if it is inserted after booting it works fine. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
jrmfe n00b
Joined: 16 Sep 2004 Posts: 3
|
Posted: Thu Sep 16, 2004 4:26 pm Post subject: |
|
|
Hey hello, sorry my bad english.
Thats a awesome script you made, congratulations!
Anyway, i have a sugestion you could implement and i'm almost sure more people would use it.
How about... a new config option:
lastscript_ESSID - for some ESSID, it would run a user made script or a shell command, but just when the interface is finally sucessfull configurated. The ideia is to allow post configuration after the interface is ready.
Ex: I would use like: lastscript_WiFi_IST="pptp-command start WiFi_IST"
I think is very usefull to start VPN client services and stuff like that.
Thanks for your time and pacience! _________________ there, there... ^_^ |
|
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
|
|
Back to top |
|
|
Sudrien Apprentice
Joined: 01 Oct 2003 Posts: 207 Location: Michigan
|
Posted: Fri Sep 17, 2004 12:22 am Post subject: |
|
|
Launched warning-free after an
echo "ifconfig_wlan0=( \" dhcp \")" >> /etc/conf.d/net
(well, ifconfig_eth1 in my case)
This is good.
in a related note, the new base layout also includes an error related to "dm-crypt" - which I haven't figured out how to stop yet.
-Sud. |
|
Back to top |
|
|
iverson0881 Apprentice
Joined: 08 Jan 2004 Posts: 285 Location: CA
|
Posted: Fri Sep 17, 2004 5:40 am Post subject: |
|
|
New baselayout stuff working great here and loving it =)
I'm not getting any of those errors from the above post when running /etc/init.d/net.ath0 restart. I'll have to see if its different (it shouldn't be) whenever i feel like rebooting.
Thanks UberLord =) and the kind Gentoo devs =) |
|
Back to top |
|
|
jrmfe n00b
Joined: 16 Sep 2004 Posts: 3
|
Posted: Fri Sep 17, 2004 2:07 pm Post subject: |
|
|
Hey, hello
UberLord wrote: | You can use the postup() function in /etc/conf.d/net for that.
A global variable called ESSID is set when wireless config has been successful - so you can test against that. |
Ok, i followed your advice, i came up with this:
Code: |
# Wireless Network related user script
eval script=\"\$\{startscript_${ESSID}\}\"
[[ -n ${script} ]] && {
einfo " User defined start script for Wireless Network ${ESSID}"
eval "${script}"
eend $?
}
|
I have startscript_WiFi_IST set in /etc/conf.d/wireless
However, this only works when i use "/etc/init.d/net.eth1 restart", that is, the interface must be allready running, and then i restart it.
This is odd, i found ESSID is only set when i have the interface restarted, i believe that wasnt your idea.
PS: What others global variable are set in the script?
MORE DEBUG INFO:
With:
Code: |
postup () {
echo "ESSID: ${ESSID}"
}
|
I start with eth1 down
Code: |
laptop-jose conf.d # /etc/init.d/net.eth1 start
* Running preup function
* Configuring wireless network for eth1
* Scanning for access points
* Found "WiFi_IST" at 00:60:B3:17:87:E2
* Connecting to "WiFi_IST" (WEP Disabled)... [ ok ]
* eth1 connected to "WiFi_IST" at 00:60:B3:17:87:E2
* in managed mode on channel 1 (WEP disabled)
* Bringing eth1 up...
* eth1 dhcp [ ok ]
* eth1 received address 10.1.9.160
* Adding routes
* -host wifi.localnet eth1[ ok ]
* Running postup function
ESSID:
|
Then i restart
Code: |
laptop-jose conf.d # /etc/init.d/net.eth1 restart
* Running predown function
* Removing wireless configuration from eth1... [ ok ]
* Bringing eth1 down...
* Releasing DHCP lease for eth1 [ ok ]
* Stopping eth1 [ ok ]
* Running preup function
* Configuring wireless network for eth1
* Scanning for access points
* Found "WiFi_IST" at 00:60:B3:17:87:E2
* Connecting to "WiFi_IST" (WEP Disabled)... [ ok ]
* eth1 connected to "WiFi_IST" at 00:60:B3:17:87:E2
* in managed mode on channel 1 (WEP disabled)
* Bringing eth1 up...
* eth1 dhcp [ ok ]
* eth1 received address 10.1.9.160
* Adding routes
* -host wifi.localnet eth1 [ ok ]
* Running postup function
ESSID: WiFi_IST
|
Anyway, if i have eth1 down and "/etc/init.d/net.eth1 restart", it doesnt set ESSID
Thanks for all! _________________ there, there... ^_^ |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nevil n00b
Joined: 07 Jul 2002 Posts: 11
|
Posted: Fri Sep 17, 2004 3:33 pm Post subject: Problem working with pump |
|
|
I'm having problems getting it to work with pump. I don't receive an IP address.
My config file looks like this
------
retries 3
device eth0 {
}
device wlan0 {
nodns
nogateway
}
------
Installed udhcp and it worked instantly. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Sudrien Apprentice
Joined: 01 Oct 2003 Posts: 207 Location: Michigan
|
Posted: Fri Sep 17, 2004 5:54 pm Post subject: |
|
|
Sudrien wrote: |
in a related note, the new base layout also includes an error related to "dm-crypt" - which I haven't figured out how to stop yet. |
iverson0881 wrote: |
I'm not getting any of those errors from the above post when running /etc/init.d/net.ath0 restart. I'll have to see if its different (it shouldn't be) whenever i feel like rebooting. |
Yeah, I'm still getting used to not having to reboot... It's in /etc/init.d/checkfs
-Sud. |
|
Back to top |
|
|
jrmfe n00b
Joined: 16 Sep 2004 Posts: 3
|
Posted: Fri Sep 17, 2004 6:19 pm Post subject: |
|
|
UberLord wrote: |
I have a fix - find the wireless_configure() function and remove the word ESSID from the line starting with the word "local" |
Fix confirmed now working as it should...
Thanks for all! _________________ there, there... ^_^ |
|
Back to top |
|
|
iverson0881 Apprentice
Joined: 08 Jan 2004 Posts: 285 Location: CA
|
Posted: Fri Sep 17, 2004 9:57 pm Post subject: |
|
|
Code: | * Setting up dm-crypt mappings...
/sbin/runscript.sh: line 277: [: Failed to setup a mapping or swap device.: integer expression expected [ !! ]
/sbin/runscript.sh: line 296: return: Failed to setup a mapping or swap device.: numeric argument required |
hehe nevermind then I'm getting it as well. Well I do have a swap partition assigned in fstab (i don't know if this is the same as the swap device) but it is there and hardly ever used. |
|
Back to top |
|
|
sl70 Guru
Joined: 18 Jun 2002 Posts: 451 Location: Saitama, JP
|
Posted: Sat Sep 18, 2004 3:20 am Post subject: |
|
|
Thanks to Uberlord for the awesome script. However, I'm having problems getting two encryptions keys working. In the setup for my access point (a gentoo machine running hostap) I have:
Code: | iwconfig wlan0 essid SNL key xxxxxxxxxxxxxxxxx key yyyyyyyyyyyyyyyyyyy
|
In /etc/conf.d/wireless I have:
Code: | key_SNL="[1] xxxxxxxxxxxxxxxxxx enc restricted [2] yyyyyyyyyyyyyyyyyy enc restricted" |
But I found I can only get a connection if I include only one encryption key.
Here's what shows up in my log when I try with two keys:
Code: | Sep 17 21:34:39 nasubi eth0: authenticate with AP 00:09:5b:11:d0:c6 CHAN=3
Sep 17 21:34:39 nasubi eth0: TX authentication (alg=1 transaction=1 status=0 Success)
Sep 17 21:34:39 nasubi eth0: RX authentication (alg=1 transaction=2 status=0 Success)
Sep 17 21:34:39 nasubi eth0: TX authentication (alg=1 transaction=3 status=0 Success)
Sep 17 21:34:40 nasubi eth0: authentication with AP 00:09:5b:11:d0:c6 CHAN=3 timed out
|
The access point log shows this:
Code: | Sep 17 21:26:57 brian wlan0: 00:04:e2:83:f3:7c auth_cb - frame was not ACKed
Sep 17 21:31:57 brian wlan0: STA 00:04:e2:83:f3:7c did not ACK activity poll frame
Sep 17 21:31:58 brian wlan0: sending disassociation info to STA 00:04:e2:83:f3:7c(last=83576015, jiffi
es=83877015)
Sep 17 21:31:59 brian wlan0: sending deauthentication info to STA 00:04:e2:83:f3:7c(last=83576015, jif
fies=83878015)
Sep 17 21:31:59 brian wlan0: Could not find STA 00:04:e2:83:f3:7c for this TX error |
( also tried it without the enc restrcted, and with various other little permutations but with no luck.) Am I doing something badly wrong? |
|
Back to top |
|
|
|