WPA wireless networking ral0

This is my first attempt at a full-blown FreeBSD install that will act as a web server. I've run into a problem with the wireless networking with a Rosewill g300ex wireless nic. It uses the ral chipset and the generic kernel recognizes the nic. However, I've been unable to connect it to my wireless access point. The access point is configured for wpa-personal with AES encryption. Neither dhcp nor static IPs work. Thanks in advance for any help.

That being said here is my /boot/loader.conf:

Code:
if_ral_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
/etc/rc.conf:

Code:
defaultrouter="192.168.11.1"
hostname="freebsd.xxxx.local"

ifconfig_vr0="inet 192.168.11.110  netmask 255.255.255.0"
sshd_enable="YES"
wlans_ral0="wlan0"
ifconfig_wlan0="SYNCDHCP WPA ssid xxxx mode 11g channel 8"

/etc/wpa_supplicant.conf:

Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="xxxx"
key_mgmt=WPA-PSK
group=CCMP
psk="nopsksoupforyou"
}

ifconfig

Code:
ral0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether ff:ff:ff:ff:ff:ff
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: associated
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=82808<VLAN_MTU,WOL_UCAST,WOL_MAGIC,LINKSTATE>
        ether 00:16:17:10:1f:f2
        inet 192.168.11.110 netmask 0xffffff00 broadcast 192.168.11.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether ff:ff:ff:ff:ff:ff
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: no carrier
        ssid xxxx channel 8 (2447 MHz 11g)
        country US authmode WPA1+WPA2/802.11i privacy ON deftxkey UNDEF
        txpower 0 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250
        roam:rssi 7 roam:rate 5 protmode CTS roaming MANUAL bintval 0
 
WLAN0 has a "no carrier" status. That means that wpa_supplicant is failing. If that fails DHCP and everything else will fail too.

Fix the issue with wpa_supplicant first, you need to be connected before getting/setting an IP address.
 
Try with removing "group" from network configuration. Then manually run
Code:
#wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
and see what you get.
 
So I made the suggested changes. Below is my current configuration:

/etc/rc.conf
Code:
 ifconfig_vr0="inet 192.168.11.110  netmask 255.255.255.0"
sshd_enable="YES"
wlans_ral0="wlan0"
ifconfig_wlan0="SYNCDHCP"

/etc/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="hammer"
key_mgmt=WPA-PSK

psk="abalone781"
}

When I ran # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf the output I received:

Code:
freebsd# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.
ioctl[SIOCS80211, op 103, len 128]: Device not configured
Failed to initiate AP scan.

ifconfig
Code:
ral0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether ff:ff:ff:ff:ff:ff
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=82808<VLAN_MTU,WOL_UCAST,WOL_MAGIC,LINKSTATE>
        ether 00:16:17:10:1f:f2
        inet 192.168.11.110 netmask 0xffffff00 broadcast 192.168.11.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether ff:ff:ff:ff:ff:ff
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 1 (2412 MHz 11b)
        country US authmode WPA1+WPA2/802.11i privacy OFF txpower 0 bmiss 7
        scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
        roam:rate 1 bintval 0

As you can see it doesn't pick up the ssid from wpa_supplicant.conf. By the way, I did not change the ether address to ff:.

As a side note heres my uname -a:
Code:
FreeBSD freebsd.xxxx.local 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011
     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
 
Only leave
Code:
network={
ssid="hammer"
psk="abalone781"
}
in wpa_supplicant.
Make sure there isn't wlan0 already created. If it is,
Code:
#ifconfig wlan0 destroy

Then try running all again manually:
Code:
# ifconfig wlan0 create wlandev vr0
# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
Make sure wlan0 is up..
 
ral0 is the correct interface. The driver may have problems with this particular card.

Incidentally, tabs are free, and make /etc/wpa_supplicant.conf easier to read.
 
Thanks so far for everyone's suggestions. I've gone a different route though. I've replaced the ralink chipset wireless card with an atheros chipset wireless card. The card is recognized by the system and I've made the suggested changes.

Here is my scan:

Code:
#ifconfig wlan0 scan 
0x08071b000...  00:1d:73:b4:6c:e3    8   54M -53:-96  100 EPS  WPA WME MESHCONF HTCAP ATH

/etc/wpa_supplicant.conf

Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
        ssid="pick"
        psk="lobster650"
        }

/etc/rc.conf
Code:
sshd_enable="YES"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
ifconfig_vr0="inet 192.168.11.110  netmask 255.255.255.0"
defaultrouter="192.168.11.1"
hostname="xxx.xxx"

So what sticks out to me is the ascii for my ssid. I verified the MAC address that shows in the scan is the MAC address of my router. And as of now I'm still unable to retrieve an address via dhcp.

Code:
#ifconfig
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:22:b0:69:60:7f
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: associated
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=82808<VLAN_MTU,WOL_UCAST,WOL_MAGIC,LINKSTATE>
        ether 00:16:17:10:1f:f2
        inet 192.168.11.110 netmask 0xffffff00 broadcast 192.168.11.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:22:b0:69:60:7f
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 5 (2432 MHz 11g)
        regdomain FCC3 indoor ecm authmode WPA1+WPA2/802.11i privacy ON
        deftxkey UNDEF txpower 21 bmiss 7 scanvalid 450 bgscan bgscanintvl 300
        bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS wme burst
        roaming MANUAL
 
When using DHCP with the wireless, don't set a defaultrouter in /etc/rc.conf. As far as the SSID goes, I'd check the access point. Are other machines or operating systems successfully attached to it? Does it have the worse-than-useless "hidden SSID" mode enabled?
 
As a genius Kazakhstanian once said "Great Success!" So I reloaded the firmware on my router as well as reconfiguring all the wireless settings on the router. A quick reboot of the server and fingers being crossed I ran dhclient wlan0 and successfully pulled an address. I then configured wlan0 with a static ip address and could successfully ping the static address. Then the true test I was able to successfully connect via ssh.

A side note ifconfig wlan0 scan still returns an ascii ssid. Must be something to do with my Buffalo router with dd-wrt

Regardless thanks all for your help.
 
Just checked here. With an Atheros card and dd-wrt on the router, the SSID displays correctly. Don't know what's causing it to appear in hex above.
 
Back
Top