You are not logged in.
Okay, please ignore this if it is one of those typical things that everyone's been asking about.
I've created a profile from my home network (uses WEP and DHCP). I basically just copied the example file (wep.example) and modified the existing lines without adding any new lines. SCAN="yes" is also in the file.
When I run netcfg2 myprofile, it says "association failed". I check the iwconfig output and I see that the AP's MAC is set to None (or empty or something, I'm at work now). So I iwlist ath0 scan, and then assign the MAC manually with iwconfig ath0 ap XX:XX:XX:XX:.... and then dhcpcd ath0. It works. So, my question is, how do I make netcfg2 assign the AP's MAC to the interface?
Last edited by foxbunny (2008-04-16 10:08:55)
Offline
Here's my network profile:
CONNECTION="wireless"
DESCRIPTION="Home network for the foxen"
INTERFACE=ath0
SCAN="yes"
SECURITY="wep"
ESSID="FOXENBOXEN"
KEY="s:<censored>"
IP="dhcp"
Offline
It should be unnecessary to assign the AP's MAC manually, this is done automatically during association (by the hardware or driver). However, some/most drivers don't work with hidden SSID, so assigning the AP MAC manually may help in these cases.
Offline
My SSID is not hidden, afaik. At least it shows up in scans, which I guess means it's not hidden. Or you meant some other form of hiding I'm unaware of? Also, every GUI tool I've tried will correctly bring up the interface and establish connection (including KWifiManager and WLAssistant). That's why this is so strange to me. Anyway, this is now solved (kinda), but if you can tell my how to do this with netcfg2 correctly, I'd be very grateful.
Offline
What's in this:
KEY="s:<censored>"
? Is it the hex value? Because if so, you don't need the 's:'.
Is your hostname the same in rc.conf and hosts? Do you have a ! in front of ath0 in the interfaces line in rc.conf? Also in rc.conf: does your gateway line have the address of your router, and does gateway have a ! in front of it in the routes line?
Offline
Okay, to clarify stuff. I have wireless WORKING. Just not with netcfg2.
I have a script that goes like this:
#!/bin/bash
sudo ifconfig ath0 up
sudo iwconfig ath0 mode managed essid ESSID key s:thisismykey channel6 ap XX:XX:XX:XX:XX:XX
sudo dhcpcd -nd ath0
When I call this script, the network is up and I can ping all machines on both my lan and outside it (gateway included). And yes, ath0 is disabled in the rc.conf. But I don't think I need to set the gateway in routes, nor do I think that'd solve this particular issue, will it?
Offline
Look at /etc/network.d/examples/complete.example and you'll see the IWOPTS setting. Add that to your profile with the channel and ap parameters.
Offline
must be a typo in that example. Thanks for pointing that out
the _correct_ option is
WEP_OPTS=""
http://projects.archlinux.org/git/?p=ne … 94b18162b9
Last edited by iphitus (2008-04-17 22:41:31)
Offline
Okay, now I'm confused...
Should I add IWOPTS or WEP_OPTS?
Also, I need to add this:
WEP_OPTS/IWOPTS="ap XX:XX:XX:XX:XX:XX channel 6" ?
FYI, I've already tried IWOPTS with ap only and it didn't work... If I add the options, do I disable SCAN?
Offline
WEP_OPTS="ap XX:XX:XX:XX:XX:XX channel 6"
iwopts is a typo in one of the example configs.
Last edited by iphitus (2008-04-18 13:12:39)
Offline
Oh, that makes sense now. I'll try that as soon as I get home.
BTW, it usually happens that when I suspend to RAM, I can no longer connect. I've tried to ifconfig ath0 down and release the dhcp IP and some such stunts, but no luck. How can I "restart" my interface after suspending to RAM? Can netcfg2 also take care of that?
Offline
This is what I do when I've lost connection:
$ /etc/rc.d/net-profiles stop
$ netcfg2 <profile-name>
Offline
Ok, so here's the iwconfig output before I do anything (on a freshly booted system).
ath0 IEEE 802.11b ESSID:"" Nickname:""
Mode:Managed Channel:0 Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power:0 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=0/70 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Then I try to call netcfg2 with modification advised by iphitus.
:: fox up [BUSY] - DHCP IP lease attempt failed [FAIL]
The reason for failure is time out.
Here's iwconfig after the failed netcfg2 attempt:
ath0 IEEE 802.11g ESSID:"" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: 00:1D:0F:E7:B1:F6
Bit Rate:0 kb/s Tx-Power:17 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=0/70 Signal level=-99 dBm Noise level=-99 dBm
Rx invalid nwid:75 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Then I run my custom script, which contains this:
#!/bin/bash
sudo ifconfig ath0 up
sudo iwconfig ath0 mode managed essid FOXENBOXEN key s:<censored> channel 6 ap 00:1D:0F:E7:B1:F6
sudo dhcpcd -nd ath0
This works. Output of iwconfig after this is:
ath0 IEEE 802.11g ESSID:"FOXENBOXEN" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: 00:1D:0F:E7:B1:F6
Bit Rate:18 Mb/s Tx-Power:17 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=45/70 Signal level=-50 dBm Noise level=-95 dBm
Rx invalid nwid:75 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Offline
WEP_OPTS="ap XX:XX:XX:XX:XX:XX channel 6"
iwopts is a typo in one of the example configs.
so does that mean that there is no IWOPTS and that it should be changed to WEP_OPTS instead for any or all of the example profiles?
Offline
If you are still having the same issue.
I was having this exact same problem with my wireless connections. Unless I manually brought the interface up before running the script, my interface would not authenticate with the access point.
Add this to the bottom of the network profile that you are using.
PRE_UP="ifconfig <interface> down && ifconfig <interface> up"
Here is my profile, it works like a charm now.
CONNECTION="wireless"
DESCRIPTION="Oakland University Wireless Network"
INTERFACE=ath0
DHCP_TIMEOUT=10
SCAN="yes"
SECURITY="none"
ESSID="grizznet"
IP="dhcp"
TIMEOUT=10
PRE_UP="ifconfig ath0 down && ifconfig ath0 up"
Offline