LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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-12-2010, 04:57 AM   #1
kvichak
LQ Newbie
 
Registered: Feb 2004
Posts: 3

Rep: Reputation: 0
Slack 13 on Ralink 802.11n PCI card - WPA won't cooperate


Normally I try to figure these things out myself - that's 90% of the fun of Linux, but I've been beating my head against the wall for a few days, so....

I have an older 32-bit PC with a new Ralink AWD102N PCI adapter (this is the one with the "RL2860sta" driver). Running Slackware 13, 32-bit. Notably, Win2000 on another partition works fine with this hardware. In addition, when I first started setting up Slack 13, I went with no encryption, and the Ralink card works great under Slack 13. But now I'm trying to get Slack 13 with wpa to work, and I am running out of ideas.

I have been using Alien Bob's wireless and WPA guide (http://alien.slackbook.org/dokuwiki/...ckware:network) and have tried to follow it to the letter (I have also tried many variations of his recommended config to see if there is an effect - no joy). Here is my ifconfig -a:

#####################################################################
bash-3.1# ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1560 (1.5 KiB) TX bytes:1560 (1.5 KiB)

ra0 Link encap:Ethernet HWaddr 00:b0:8c:01:a6:e4
inet addr:169.254.207.151 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::2b0:8cff:fe01:a6e4/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:19195 errors:0 dropped:0 overruns:0 frame:0
TX packets:3649 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3996164 (3.8 MiB) TX bytes:0 (0.0 B)
Interrupt:17[/COLOR]
#######################################################################

Here is my /etc/rc.d/rc.inet1.conf:

#######################################################################
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
#IPADDR[0]=""
#NETMASK[0]=""
#USE_DHCP[0]=""
#DHCP_HOSTNAME[0]=""

# Config information for eth1:
#IPADDR[1]=""
#NETMASK[1]=""
#USE_DHCP[1]=""
#DHCP_HOSTNAME[1]=""

# Config information for eth2:
#IPADDR[2]=""
#NETMASK[2]=""
#USE_DHCP[2]=""
#DHCP_HOSTNAME[2]=""

# Config information for eth3:
#IPADDR[3]=""
#NETMASK[3]=""
#USE_DHCP[3]=""
#DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="yes"

## Example config information for wlan0. Uncomment the lines you need and fill
## in your data. (You may not need all of these for your wireless network)
IFNAME[0]="ra0"
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="here I enter the value returned by cmd 'hostname'"
#DHCP_KEEPRESOLV[0]="yes"
#DHCP_KEEPNTP[0]"yes"
#DHCP_KEEPGW[0]="yes"
#DHCP_IPADDR[0]=""
#WLAN_ESSID[0]=
#WLAN_MODE[0]Managed
#WLAN_RATE[0]="54M auto"
#WLAN_CHANNEL[0]="auto"
#WLAN_KEY[0]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[0]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK="PSK from my router"
WLAN_WPA[0]="wpa_supplicant"
WLAN_WPADRIVER[0]="wext"
#WLAN_WPAWAIT[0]=30
####################################################################

Here is my wpa_supplicant.conf:

###################################################################
# See /usr/doc/wpa_supplicant-0.6.9/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
#country=US

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=0
ssid="My ESSID"
proto=WPA RSN
key_mgmt=WPA-PSK WPA-EAP
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk="the PSK from my router"
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
#network={
# key_mgmt=NONE
# priority=0
#}
#####################################################################

Per Bob's instructions, at the command prompt, I issue:

/etc/rc.d/rc.inet1 ra0_stop

and

/etc/rc.d/rc.inet1 ra0_start

Slack responds with:

Polling for DHCP server on ra0
err, ra0; timed out
err, ra0 lease information file '/etc/dhcpc/dhcpcd-ra0.info' does not exist
warn ra0; using IPV4LL address 169.254.207.151

But this is not true! Here is my /etc/dhcpc/dhcpcd-ra0.info file that Slackware cannot seem to find:

#################################################################
IPADDR='169.254.207.151'
NETMASK='255.255.0.0'
NETWORK='169.254.0.0'
BROADCAST='169.254.255.255'
LEASEDFROM='0'
LEASETIME='20'
RENEWALTIME='10'
REBINDTIME='17'
INTERFACE='ra0'
CLASSID='dhcpcd 3.2.3'
CLIENTID='ff:00:00:00:02:00:01:00:01:13:07:83:64:00:b0:8c:01:a6:e4'
DHCPCHADDR='00:b0:8c:01:a6:e4'
###################################################################


So why is the system not seeing this file? And why is the address of "169.254.207.151" being written into the /etc/dhcpc/dhcpcd-ra0.info file?

The dhcp server, my Netgear router, is setup to issue IP addresses in the range 192.168.0.0 to 192.168.0.254, so the IP in the .info file is definitely out of that range. I have tried writing an IP in the routers range, e.g. 192.168.0.10, into the dhcpcd-ra0.info file, but when I stop and start the rc.inet1 file, Slack just writes back over the .info file, putting 169.254.207.151 back in to it. I can't ping the router - get network unreachable.

BTW, I do have a /var/state/dhcp/dhcpd.leases file, but it's empty.

Anyone have any ideas?

Another BTW - I have Mandriva 2010 on a nearly identical PC, with an identical Ralink PCI card, and it runs wireless wpa just fine.

Thanks ahead of time for any help

Regards,
kvichak
 
Old 02-13-2010, 02:17 PM   #2
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
You know, I like all those scripts, but when they work.
So I suggest to do step by step.
1. Turn interface up.
2. Check if you can scan your AP
3. Try to associate with it.
4. Manually start dhcp client.
 
Old 02-13-2010, 10:02 PM   #3
kvichak
LQ Newbie
 
Registered: Feb 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for responding nimnull. I'm a little confused on how to do what you're recommending. When I run wpa_supplicant and start /etc/rc.d/rc.inet1 per Alien Bob's procedure, the wpa program says it's scanning for an AP, but can't find one. It also says it is trying to associate with the AP, and says that it has.

Bu T think you are recommending that I do this step by step. I presume this means stop and then start /etc/rc.d/rc.inet1, or perhaps I could "ifconfig ra0 down" and then ifconfig up" - correct?

I'm not sure how to manually scan the AP. I can puing it, but how do I scan it?

And I don't know a command to associate with it.

Can you provide me some detail, i.e. what commands to enter at the prompt to implement what you are recommending?
 
Old 02-13-2010, 10:20 PM   #4
nuxrl
Member
 
Registered: Jun 2006
Location: NY, USA
Distribution: Slackware, Arch
Posts: 176

Rep: Reputation: 35
Code:
#ifconfig ra0 up
to bring the interface up;

#iwlist ra0 scan
to scan the access points nearby;

#iwconfig ra0 essid your_ap channel your_channel
then,

#wpa_supplicant -i ra0 -D wext c /etc/wpa_supplicant.conf 
to associate with your ap

#iwconfig 
to check if it's successful
If needed, you can turn on the debug option in wpa_supplicant or use wpa_cli to watch the events. The value of "psk" in wpa_supplicant.conf should be the passphrase, not the key from the router. You can use,

Code:
#/usr/sbin/wpa_passphrase your_essid your_key
to generate the psk.
 
  


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
LXer: Encore 802.11n PCI Wireless Adapter LXer Syndicated Linux News 0 01-08-2010 03:30 PM
D-Link System DWA-140 802.11n Adapter [ralink rt2870] - Not recognized dlinux Slackware 11 12-27-2009 11:19 PM
Can I upgrade my Linux laptop to 802.11N by buying a Mini PCI card ? joel.bourquard Linux - Wireless Networking 3 09-19-2009 01:33 PM
Medion Akoya - 802.11n wireless LAN card zenta Linux - Wireless Networking 4 06-18-2009 01:12 PM
D-Link DWA-140 802.11n USB (with Ralink RT2870 chispet) driver probs andywest Linux - Hardware 2 06-12-2008 12:40 PM


All times are GMT -5. The time now is 12:43 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