LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-21-2011, 12:28 PM   #1
kkmic
Member
 
Registered: Jul 2004
Location: Romania
Distribution: Slackware 13.0
Posts: 55

Rep: Reputation: 16
Configuring wireless network using USB Wireless adapter on Slackware-current x64


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.

Next, it was Slackware's turn.

I plugged in the adapter aaaaaannndddd.... nothing happened

Next, it was lsusb's turn. I got this:
Code:
Bus 001 Device 002: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
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:

  1. ifconfig wlan0 up
  2. iwconfig wlan0 ap 1C:BD:B9:XX:XX:XX
  3. iwconfig wlan0 key s:myrouterpassword
  4. 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)

Also:
If I do a iwconfig wlan0 I get this:
Code:
wlan0     Ralink STA  ESSID:"BlackCat"  Nickname:"RT2870STA"
          Mode:Managed  Frequency=2.452 GHz  Access Point: 1C:BD:B9:XX:XX:XX   
          Bit Rate=54 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=97/100  Signal level:-67 dBm  Noise level:-83 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
I'm puzzled by this line:
Code:
Encryption key:off
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.
 
Old 06-22-2011, 11:14 AM   #2
kkmic
Member
 
Registered: Jul 2004
Location: Romania
Distribution: Slackware 13.0
Posts: 55

Original Poster
Rep: Reputation: 16
Well, is there no Slackware user with a wireless card in his machine around?
 
Old 06-22-2011, 11:16 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,598
Blog Entries: 2

Rep: Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060
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.
 
Old 06-22-2011, 01:00 PM   #4
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 13.37 -32 Bit
Posts: 578

Rep: Reputation: 48
Sorry, using wicd too!
 
Old 06-22-2011, 01:51 PM   #5
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Arch Linux
Posts: 641

Rep: Reputation: 141Reputation: 141
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.
 
Old 06-22-2011, 02:31 PM   #6
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 248

Rep: Reputation: 107Reputation: 107
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.
 
Old 06-23-2011, 01:24 AM   #7
kkmic
Member
 
Registered: Jul 2004
Location: Romania
Distribution: Slackware 13.0
Posts: 55

Original Poster
Rep: Reputation: 16
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.
 
Old 06-23-2011, 03:55 AM   #8
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
Quote:
Originally Posted by kkmic View Post
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.
 
1 members found this post helpful.
Old 06-23-2011, 04:07 AM   #9
kkmic
Member
 
Registered: Jul 2004
Location: Romania
Distribution: Slackware 13.0
Posts: 55

Original Poster
Rep: Reputation: 16
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.
 
Old 06-23-2011, 07:39 AM   #10
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 248

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by kkmic View Post
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.
 
Old 06-23-2011, 11:12 AM   #11
kkmic
Member
 
Registered: Jul 2004
Location: Romania
Distribution: Slackware 13.0
Posts: 55

Original Poster
Rep: Reputation: 16
This is the (partial) result of iwlist wlan0 scan:
Code:
          Cell 01 - Address: 1C:BD:B9:C1:6C:30
                    Protocol:802.11b/g/n
                    ESSID:"BlackCat"
                    Mode:Managed
                    Channel:9
                    Quality:52/100  Signal level:-69 dBm  Noise level:-83 dBm
                    Encryption key:on
                    Bit Rates:150 Mb/s
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
That's the section related to my router.

@Mike_M: Any relevant info there?

@audriusk: Thanks, I'll keep that in mind.
 
Old 06-23-2011, 12:37 PM   #12
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
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).
 
Old 06-26-2011, 02:00 PM   #13
kkmic
Member
 
Registered: Jul 2004
Location: Romania
Distribution: Slackware 13.0
Posts: 55

Original Poster
Rep: Reputation: 16
I have a working connection to my router.
ps ax|grep wpa_supplicant returns only this:
Code:
bash-4.1# ps ax|grep wpa_supplicant
20450 pts/3    S+     0:00 grep wpa_supplicant
 
Old 06-26-2011, 03:23 PM   #14
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
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.
 
Old 06-27-2011, 03:27 AM   #15
kkmic
Member
 
Registered: Jul 2004
Location: Romania
Distribution: Slackware 13.0
Posts: 55

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Fedora 9 and Network Adapter 3COM OfficeConnect Wireless 11g Compact USB Adapter mpharkin Linux - Newbie 1 09-20-2008 05:18 AM
Problems configuring the wireless USB adapter MN-510 kolli143 Red Hat 2 09-06-2006 03:51 PM
configuring Netgear WG111 USB wireless adapter kushalkoolwal Debian 1 04-22-2006 02:02 PM
configuring Atheros AR5001X+ Wireless Network Adapter asilentmurmur Suse/Novell 0 03-04-2005 12:18 AM


All times are GMT -5. The time now is 12:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration