LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Slackware 12, Atheros + madwifi, start-up scripts (https://www.linuxquestions.org/questions/linux-networking-3/slackware-12-atheros-madwifi-start-up-scripts-621877/)

tuskzor 02-17-2008 07:47 PM

Slackware 12, Atheros + madwifi, start-up scripts
 
I've been trying like crazy to get down the logic of all the different things involved with setting this machine up as an AP. I've got it all working, but there are some things that just don't seem to jive.

For instance, on boot when I modprobe for the ath_pci module it works fine, but it creates, by default, an interface that is set to managed mode with no ssid.

The rc.inet1 script, no matter what I put in there pertaining to essid, WEP keys, etc...never seems to configure the device properly. The IPs come out ok, but I cannot get the thing into master mode this way. Likewise with the rc.wireless script.

For me, the only way I can get this working is to create my own script that loads the module, destroys the ath0 device that it creates, then RECREATE the ath0 device with the parameters and master mode, and then use iwconfig to set the WEP key and essid, and THEN finally, allow the rc.inet1 script to set the IP address (which it does when the device is configured by iwconfig).

Any words of advice? I cannot find one single resource that tells me all the things I need to know to get this working. I mean, from my point of view, the rc.inet1 script has to use three different programs to get the wireless card up and running the way I want, is it even really smart enough to do that?

MS3FGX 02-18-2008 04:10 AM

The only wireless configuration you should be doing is under /etc/rc.d/rc.wireless.conf. You shouldn't manually edit any of the other files.

As for actually configuring wireless.conf, you could either use the default configuration that applies to all wireless cards (it is at the top of the file, make sure to uncomment it) or add/find your card's MAC OUI in the file and put the relevant commands in there.

tuskzor 02-18-2008 09:32 AM

That may be the case, but if it won't work and I can't find any information on HOW to make it work, then I'll probably edit whatever I need to, to make it work.

Besides, I'm not editing any other files. I just created my own start-up script instead of using the rc.wireless config.

Can you tell me how to use it properly with an Atheros card, wanting to run it in AP mode?

magplumber 02-20-2008 08:43 PM

annoyed and atheros
 
I'm with you all the way. I've been trying to get my atheros card to work for months with no luck. I've gotten to the point where I'm just going to dump the card and get something else. I have a USB stick wireless card, but it's just to slow, and bulky(I keep hitting the stupid thing everytime I put in a dvd.

tuskzor 02-20-2008 09:34 PM

Well mine works, so if you want some tips on how to get it working, let me know. Basically you just need to download the package for madwifi and then create your own startup script.

What my script does is modprobe the driver, at which point the driver automatically configures the device.

Then the script does a "wlanconfig ath0 destroy" to delete the device that was just created.

Then it recreates the device and runs the dhcpd daemon. The reason it does this is because I'm not sure how to get dhcpd to start AFTER my script runs, so I stopped it from starting automatically using the system rc scripts and just put the start script into MY atheros start-up script.

Also, you configure your IP settings inside of your rc.inet1.conf file because when you create the device using the wlanconfig command, the rc.inet1 script automatically puts in the IP information for the new device.

Here is the code.

Code:

# Load atheros driver
modprobe ath_pci
#
# Destroy faggy device modprobe creates...
wlanconfig ath0 destroy
#
# Create ath0 device
wlanconfig ath0 create wlandev wifi0 wlanmode ap
#
# Configure device
iwconfig ath0 essid "da_wireless" nick "routzor" key "RANDOM_STUFF"
#
# Start the DHCP Server:
if [ -x /etc/rc.d/rc.dhcpd ]; then
  . /etc/rc.d/rc.dhcpd start
fi

I guess I don't know if you are trying to use it as an AP, but that is what my situation is. I've got it setup in master mode, as an access point for other computers.


All times are GMT -5. The time now is 05:28 AM.