LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2008, 07:47 PM   #1
tuskzor
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
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?
 
Old 02-18-2008, 04:10 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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.
 
Old 02-18-2008, 09:32 AM   #3
tuskzor
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
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?
 
Old 02-20-2008, 08:43 PM   #4
magplumber
LQ Newbie
 
Registered: Jan 2008
Posts: 11

Rep: Reputation: 0
Angry 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.
 
Old 02-20-2008, 09:34 PM   #5
tuskzor
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Atheros linux driver available other than madwifi ?? vinodl Linux - Wireless Networking 2 08-22-2007 02:29 PM
Atheros AR5005G with madwifi ewlabonte Debian 2 07-18-2007 06:13 PM
atheros madwifi install problem k4ution Linux - Wireless Networking 3 11-05-2005 04:54 PM
Need help with Madwifi/Atheros on Slack10.1 d4m Linux - Wireless Networking 1 06-26-2005 10:01 AM
wlan: atheros (madwifi) &startup-scripts?? c31c Slackware 4 02-20-2005 07:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration