LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 08-01-2007, 07:33 AM   #1
ceashton
Member
 
Registered: Nov 2006
Distribution: Slackware 12.2
Posts: 36

Rep: Reputation: 15
Wireless configuration... nearly there!


Hello all,

I am having trouble configuring my wireless network interface (RaLink RT2500) on a fresh install of Slackware 12.0 (kernel was the default huge-smp, 2.6.21.5-smp). I had trouble compiling some of the devices modules, but I found the cvs available from serial-monkey compiled and installed fine. The module appears to load fine:

Code:
root@dinosaur:~# lsmod | grep rt2500
rt2500                180836  0
I found my pass key through:

Code:
root@dinosaur:~# wpa_passphrase MY_ESSID MY_ASCII_PASS_KEY
network={
        ssid="MY_ESSID"
        #psk="MY_ASCII_PASS_KEY"
        psk=****64*characters*long*****
}
I configure /etc/wpa_supplicant.conf:

Code:
# See /usr/doc/wpa_supplicant-0.5.7/wpa_supplicant.conf.sample
# for many more options that you can use in this file.

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
  scan_ssid=0
  ssid="MY_ESSID"
  proto=WPA
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP WEP104 WEP40
  psk=****64*characters*long*****
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
# You'll need a recent version of wireless-tools for this!
network={
  ssid="any"
  key_mgmt=NONE
  priority=2
}
and /etc/rc.d/rc.inet1.conf:

Code:
...
IFNAME[4]="ra0"
#IPADDR[4]=""
#NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]=MY_ESSID
WLAN_MODE[4]=Managed
WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
WLAN_CHANNEL[4]="11"
#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=****64*characters*long*****"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="rt2500"
#WLAN_WPAWAIT[4]=30
...
I then run the following commands:

Code:
root@dinosaur:~# ifconfig ra0 up
root@dinosaur:~# wpa_supplicant -D rt2500 -i ra0 -c /etc/wpa_supplicant.conf -Bw 
root@dinosaur:~# dhcpcd ra0
root@dinosaur:~#
The final command hangs for about 1 min before finishing, reporting no error. However, when I run ifconfig, the interface ra0 is not present. I'm sure that the card works with Linux and that most of the network settings are correct, as it previously worked under Slackware 10.1 and 11. I'm sure the network settings haven't changed and that the network is up and running, as I am able to connect with a second computer. The only thing I have knowingly changed between the previous working configuration, is in /etc/rc.d/rc.inet1.conf where the old config file had the line WLAN_WPADRIVER[4]="ra2500" - I believe this was a typo when making my notes.

When I reboot the machine it hangs for a while, then prints the following message many times:

Code:
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
I'm not really sure what I'v done differently to previous instalations, so any help would be very much appreciated.

Many thanks

Chris
 
Old 08-01-2007, 12:25 PM   #2
ceashton
Member
 
Registered: Nov 2006
Distribution: Slackware 12.2
Posts: 36

Original Poster
Rep: Reputation: 15
Some more information...

Whilst trying different configurations, I noticed that restarting the network produced the following:

Code:
root@dinosaur:~# /etc/rc.d/rc.inet1 restart
/etc/rc.d/rc.inet1:  ra0 information: 'Any ESSID'
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
similar to the where the system hangs when booting. Where has 'Any ESSID' come from. Further more, when I investigate the network adaptor with iwconfig, I get

Code:
root@dinosaur:~# iwconfig ra0
ra0       RT2500 Wireless  ESSID:"HomeLn"  Nickname:"dinosaur"
          Mode:Managed  Frequency=2.412 GHz  Bit Rate=54 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality:0  Signal level:187  Noise level:177
          Rx invalid nwid:0  invalid crypt:0  invalid misc:0

root@dinosaur:~#
So here we see the ESSID is set correctly, but for some reason the encryption key is turned off. Up until this point, I haven't changed anything in /etc/rc.d/rc.wireless.conf. However I couldn't help noticing the line

Code:
## NOTE : Comment out the following five lines to activate the samples below ...
## --------- START SECTION TO REMOVE -----------
## Pick up any Access Point, should work on most 802.11 cards
*)
    INFO="Any ESSID"
    ESSID="any"
   ;;
## ---------- END SECTION TO REMOVE ------------
Suspecting it is these lines that are incorrectly setting my ESSID to 'Any ESSID' when running /etc/rc.d/rc.inet1 restart, I commented them out. Running /etc/rc.d/rc.inet1 restart then resulted in further incorrect parameters, as my adaptor is caught by a later case statement in /etc/rc.d/rc.wireless.conf. My next step was to make /etc/rc.d/rc.wireless non-executable, as this script calls /etc/rc.d/rc.wireless.conf. This didn't work. Next was to make /etc/rc.d/rc.wireless.conf non-readable. The result was the same as before.

Code:
root@dinosaur:~# /etc/rc.d/rc.inet1 restart
/etc/rc.d/rc.inet1:  ra0 information: 'Any ESSID'
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
...
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Polling for DHCP server on interface ra0:
dhcpcd: MAC address = 00:11:50:63:34:39
root@dinosaur:~#
which again doesn't work. I thought the whole point of configuring /etc/rc.d/rc.inet1 and /etc/wpa_supplicant.conf was that all the conguration was contained in just these two files? mmm, what to do next?

Chris
 
Old 08-01-2007, 01:10 PM   #3
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
Try changing the wpa_supplicant command to use the wext driver.
Example:

Code:
/wpa_supplicant -w -c/etc/wpa_supplicant.conf -Dwext -ira0
You should be able to see the authentication messages (or errors). If this works, then try dhcpcd ra0. Assuming all is well, now move onto inet1.conf.
 
Old 08-01-2007, 04:14 PM   #4
ceashton
Member
 
Registered: Nov 2006
Distribution: Slackware 12.2
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks for the reply,

I've tried your suggestion, and I get the following output

Code:
root@dinosaur:~# ifconfig ra0 up
root@dinosaur:~# wpa_supplicant -w -c/etc/wpa_supplicant.conf -Dwext -i ra0
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 7 value 0x1 - ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 -
I'm afraid I'm not sure I really understand what that means. I thought in the past I passed the option -D rt2500 to indicate I wanted to use that module. After a little googling, it seems that, and I quote from http://www.natecarlson.com/blog/2005...rading-to-108/

Quote:
I finally figured it out - the new kernel supports Wireless Extensions version 18, which support WPA natively, and the ipw2200 drivers have been updated to use these WPA calls instead of it’s own. So, you need to change the ‘-Dipw’ on your wpa_supplicant startup line to ‘-Dwext’.
So I guess you are suggesting I don't need the rt2500 module, right?

Not sure what to do now!

I have been restarting networking with the command rc.inet1 restart, but as I essentially don't know what I am doing, sometimes I reboot, and very occasionally things work. So I think great, I'll reboot just to make sure, and then it all goes to pot again! For a while I suspected I wasn't taking a note of everything I was doing, so I rebooted 10 times without changing any network settings. This is what I found:

(Reboot #) (Successful wireless connection)
1 -> no
2 -> yes
3 -> no
4 -> yes
5 -> yes
6 -> no
7 -> no
8 -> no
9 -> no
10 -> no

Just to remind you, this wireless card worked fine under Slack 11, and I am currently able to wirelessly access the internet through the router from a second computer, so I guess the router is working fine. Just to eliminate any any signal strength issues, I have moved the computer, such that it is right next to the wireless router - still no luck!

I'm not sure what the above reboot situation means.

Once again, thanks for the response.

Chris
 
Old 08-01-2007, 06:31 PM   #5
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
You need the rt2500 module, yes, but wpa_supplicant uses wext to interact with it.

The error indicates a bad, not loaded or incompatible driver or firmware.
 
Old 08-01-2007, 07:17 PM   #6
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Are you using Pat's wpa_supplicant package?

I might be wrong, but I think that that particular package doesn't include support for any "non-standard" wireless drivers.

In my experience, I've found that wpa_supplicant must be compiled with support for your particular driver (Atheros/madwifi in my case).

Lately, (out of sheer laziness), I've been using Alien Bob's wpa_supplicant package, because it includes "better than standard" driver support.

Alternatively, you might wanna look into the sources for this package on the Slackware CD/DVD/website and see if you can change a few things in the slackbuild script to get the driver support you need.
 
Old 08-02-2007, 04:18 PM   #7
ceashton
Member
 
Registered: Nov 2006
Distribution: Slackware 12.2
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks for the replies. I've not had chance to look at this today until now. My current line of attack, is to compile the latest cvs rt2500 module, and compile rt2500 support into wpa_supplicant... this is a bit new to me, so it may take some time.

Thanks for the help, and I'll let you know how it goes!

Chris
 
Old 08-02-2007, 07:26 PM   #8
ceashton
Member
 
Registered: Nov 2006
Distribution: Slackware 12.2
Posts: 36

Original Poster
Rep: Reputation: 15
Hello again,

The short answer: It's fixed, I removed wpa_supplicant.


The long answer... I checked out Alien Bob's slackware pages... besides having a great name, he also gives out some good information!

I removed all trace of yesterday's rt2500 installation (manually) and wpa_supplicant (using pkgtool). I then downloaded the latest rt2500 cvs module (rt2500-cvs-2007080215) from serial monkey. I wasn't sure how to compile in support for rt2500 into wpa_supplicant, so after a bit of reading:

http://alien.slackbook.org/dokuwiki/...ackware:rt2xxx

http://madwifi.org/wiki/UserDocs/802.11i

http://hostap.epitest.fi/wpa_supplicant/

and of the README in wpa_supplicant-0.5.8.tar.gz, I gave up. I should mention that the README in wpa_supplicant-0.5.8.tar.gz gives quite specific advice on how to compile in support to wpa_supplicant-0.5.8 for several wireless chip manufactures, but not realtek.

Just to remind you, the computer now has the rt2500 module installed with configuration files as described in my initial post, but no wpa_supplicant. Just for the hell of it, I rebooted, and would you believe it, it worked! So I rebooted 12 times, and reset the wireless access point 3 times, and each time we had success. So I installed wpa_supplicant included with slackware 12.0 and have rebooted another 10 times, resetting the wireless access point 3 times. In this test I only successfully connected 2 times, similar to the success rate in my third post in this thread. Finally I un-installed wpa_supplicant and everything works just fine again.

So I guess there is some kind of conflict between the rt2500 module and wpa_supplicant. Somewhere I've read that rt2500 doesn't require wpa_supplicant and the README says you can use it's own wireless configuration file (/etc/Wireless/RT2500STA/RT2500STA.dat), but nowhere have I read that there is a conflict. So that was my solution, remove wpa_supplicant from the computer!

Many thanks to 2Gnu and rkelsen for your help and suggestions.

Chris
 
Old 08-02-2007, 09:09 PM   #9
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by ceashton
I checked out Alien Bob's slackware pages... besides having a great name, he also gives out some good information!
Yep. His slackware packages are pretty good too.
Quote:
Originally Posted by ceashton
Somewhere I've read that rt2500 doesn't require wpa_supplicant and the README says you can use it's own wireless configuration file
Very interesting. I'll be keeping that in mind for future reference.

It'd be a different world if all the other wireless hardware vendors offered this level of support for Linux.

Glad to hear you got it sorted.
 
  


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
Wireless configuration SergeSolo Mandriva 1 04-03-2006 05:03 AM
Wireless Configuration affairless Linux - Wireless Networking 5 08-09-2005 10:09 AM
Wireless configuration houmie Linux - Laptop and Netbook 5 03-14-2005 08:12 AM
wireless configuration help Rhatlinux Yoper 6 10-09-2004 11:09 PM
Wireless configuration wseberger Linux - Laptop and Netbook 1 10-05-2004 06:03 PM

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

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

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