After some consideration, I decided to finally get rid of all the network cables from my house and buy a USB Wireless adapter for my desktop PC (which happens to be a dual-boot with W7 and Slackware-current x64 (Slackware 13.37 was released about two months ago).

I went to the store and bought an inexpensive TP-LINK TL-WN727N USB Wireless adapter for this task.

I fired up the Windows OS and got it working pretty fast: plug in - update driver - search for the wireless network - enter key - connect. The basic stuff.

Ralink Technology. Well... after some Googling around I blacklisted the rt2800usb
and rt2x00usb modules (in /etc/modprobe.d/blacklist.conf) and installed the rt-2870-firmware package (it was not installed). Then I rebooted my box, to make sure everything was fine. It was.

Now, the hard part (for me at least). Make the adapter link with my router.

Some Googling and some trial and error later I came up up with this solution:

ifconfig wlan0 up

iwconfig wlan0 ap 1C:BD:B9:XX:XX:XX

iwconfig wlan0 key s:myrouterpassword

dhcpcd wlan0

The above solution stands if I type them one by one.

I've attempted putting them into rc.local without success - dhcpcd fails to retrieve a valid IP address from the router.

I've attempted adding the relevant details to rc.inet1.conf - again a failure

I have not attempted to make a bash script and run it when needed.

My question: How can/should I configure my system to link up with my router automatically? (and no wicd please)

Should not it be on? Or at least something else than off? Considering that I have a working connection to my router (I'm using it to post this very message).

Thank you.

kkmic

06-22-2011 12:14 PM

Well, is there no Slackware user with a wireless card in his machine around? :(

TobiSGD

06-22-2011 12:16 PM

Of course there are. But I am running wicd and don't have to bother with stuff like that, so I don't know much about it.

Robert.Thompson

06-22-2011 02:00 PM

Sorry, using wicd too!

jkirchner

06-22-2011 02:51 PM

I think the slow response is due to us using wicd. I use it as well. I am curious, is there a reason you do not want to use it? I find it works well and has given me little trouble at all. I have Slackware on 2 laptops and a wireless dektop as well and it never seems to fail me.

audriusk

06-22-2011 03:31 PM

I've done this in the past a few times, before I discovered wicd. I believe that iwconfig key is for WEP only, though I may be wrong here. What I used was wpa_supplicant for WPA/WPA2. It connects to wifi router and does all the authentication. If it was successful, then dhcpcd can be used to retrieve network settings.

Now I don't bother with this anymore and just use wicd. :)

kkmic

06-23-2011 02:24 AM

My router is set to use WPA2 encryption IIRC. And I am able to connect to my router using just ifconfig, iwconfig and dhcpcd (and iwlist to get the AP address). I have outlined the procedure in the my first post.

The only "extra" stuff I need is to have my box connect to my router at boot time (just as my old wired connection used to).

Well, fine, since everyone is a wicd user, then tell me how should I set up wicd to connect at boot time?

I want connection at boot time since I spend quite a lot of time in the console, and I need to have internet access before booting up the graphical mode.

Mike_M

06-23-2011 04:55 AM

Quote:

Originally Posted by kkmic
(Post 4393440)

My router is set to use WPA2 encryption IIRC. And I am able to connect to my router using just ifconfig, iwconfig and dhcpcd (and iwlist to get the AP address). I have outlined the procedure in the my first post.

The only "extra" stuff I need is to have my box connect to my router at boot time (just as my old wired connection used to).

Well, fine, since everyone is a wicd user, then tell me how should I set up wicd to connect at boot time?

I want connection at boot time since I spend quite a lot of time in the console, and I need to have internet access before booting up the graphical mode.

You need to use wpa_supplicant to connect to an access point using WPA/WPA2. My guess is you're AP doesn't require a WPA key, otherwise you should not have been able to connect using the steps in your original post.

Have a look in /etc/rc.d/rc.inet1.conf for examples of configuration options for wireless interfaces. If you are using WEP, pay attention to the WLAN_KEY[$index_number]= line. If you're using WPA/WPA2 pay attention to the WLAN_WPA[$index_number]= line and notice how it is set to "wpa_supplicant". Look in /etc/wpa_supplicant.conf for examples how to authenticate using WPA/WPA2. Configuring those two files correctly should be enough to get you connected at boot time.

You should login to your AP's web administration (if it has one) and verify the settings. You can also use the command "iwlist wlan0 scanning" and look for the output related to your access point. That should tell you what security options are enabled.

kkmic

06-23-2011 05:07 AM

Thing is that I remember during my trial and error sessions that I have not always iwconfig wlan0 key:mywirelesspassword yet somehow I was able to connected to the router.

I was puzzled by this but I dismissed it as an error on my part at that time.

I will double check this when I'll return home and post a iwlist wlan0 scan result for my router. I have a D-Link DIR-600.

audriusk

06-23-2011 08:39 AM

Quote:

Originally Posted by kkmic
(Post 4393440)

Well, fine, since everyone is a wicd user, then tell me how should I set up wicd to connect at boot time?

I want connection at boot time since I spend quite a lot of time in the console, and I need to have internet access before booting up the graphical mode.

AFAIK wicd doesn't need GUI to function, it's a daemon. GUI part is just a client that connects to the daemon. There's also wicd-curses client which works in console.

To connect on boot, mark "Automatically connect to this network" for your home network in wicd. That's how my laptop connects to my wifi router every time I boot it.

That indicates your access point does require a WPA key to connect. Unless something has changed recently with iwconfig, it should only support WEP keys. I get the impression we're missing some bits of information. When you do have a working connection on the computer in question, check if any wpa_supplicant processes are running ("ps ax|grep wpa_supplicant" or similar).

kkmic

06-26-2011 03:00 PM

I have a working connection to my router.ps ax|grep wpa_supplicant returns only this:

Then it would seem you are not authenticating with WPA/WPA2. If that is not a concern for you, then you may want to go about editing /etc/rc.d/rc.inet1.conf, and ignoring the wpa_supplicant configuration, so that you can get your wireless network operational at boot time without. If lack of WPA authentication is a concern for you then you'll have to figure out why your AP is not requiring it.

kkmic

06-27-2011 04:27 AM

And this mean what?

That the router is configured to require a WPA key yet it accepts unauthenticated connections?

I'll post a screen shot with the configuration panel of my router the next time I have the opportunity, maybe it will shed some light on the matter.