Ralink RT2800 driver

# pciconf -lv

Code:
none4@pci0:3:0:0:	class=0x028000 card=0x1453103c chip=0x30901814 rev=0x00 hdr=0x00
    vendor     = 'Ralink Technology, Corp.'
    class      = network

Is there any way to get this wireless working in 8.1?
 
Ok, I decided not to wait for this driver. Can someone recommend me WNIC for laptop, which has good support in FreeBSD?
 
No luck with ndis, and btw. card is Ralink RT3090, integrated on the motherboard. x(
 
Give more useful info:
What you did and what happened and what you expected to happen. Please provide useful details.
 
ZmAY said:
- and tried with ndis, but after i compile and try to kldload module, i get exec format error

What exactly you did with ndisgen, are you using right source (kernel and world and source are in sync?).

Also note that 8.1 have broken amd64 support for NDIS, use at least 8.2
 
Ok, to report some things..
- I upgraded to 8.2
- ndis then worked

Code:
# ifconfig wlan0 scan
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
Belkin_Pre-...  00:11:50:22:b4:16    1   54M -87:-96  100 E   
Kerberos        00:1e:e5:64:ff:43    6   54M -46:-96  100 EP   RSN
Amis9790242072  00:26:44:55:c5:c0    6   54M -89:-96  100 EP   WPA
brenkus         02:30:b4:a9:1c:80    7   54M -88:-96  100 EPS 
brenkus_1       02:30:b4:a9:1c:81    7   54M -86:-96  100 EPS  RSN
MSI             00:13:d3:7f:92:b1   11   54M -82:-96  200 ES  
hafner          00:1d:7e:55:ec:5d   11   54M -88:-96  100 EPS  WPA

I tried all possible versions, WEP, WPA, WPA2, without security. In some cases I could obtain IP address by running dhcp, but no data could be transferred.

Now I am trying to connect to my home network, which is Kerberos, WPA2.

/etc/wpa_supplicant.conf
Code:
network={
ssid="Kerberos"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk="xxxxxxx"
priority=2
}

then I try manually with
[cmd=]# wpa_supplicant -dd -i wlan0 -c /etc/wpa_supplicant.conf[/cmd]

and get

Code:
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Line: 1 - start of a new network block
ssid - hexdump_ascii(len=8):
     4b 65 72 62 65 72 6f 73                           Kerberos        
proto: 0x2
key_mgmt: 0x2
pairwise: 0x18
group: 0x1e
PSK (ASCII passphrase) - hexdump_ascii(len=11): [REMOVED]
priority=2 (0x2)
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 2
   id=0 ssid='Kerberos'
Initializing interface (2) 'wlan0'
Own MAC address: e0:2a:82:18:a8:26
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wpa_driver_bsd_del_key: keyidx=0
wpa_driver_bsd_del_key: keyidx=1
wpa_driver_bsd_del_key: keyidx=2
wpa_driver_bsd_del_key: keyidx=3
wpa_driver_bsd_set_countermeasures: enabled=0
wpa_driver_bsd_set_drop_unencrypted: enabled=1
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Added interface wlan0
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Cached scan results are empty - not posting
Selecting BSS from priority group 2
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
EAPOL: disable timer tick
Received 0 bytes of scan results (4 BSSes)
Scan results: 4
CTRL-EVENT-SCAN-RESULTS 
Selecting BSS from priority group 2
Try to find WPA-enabled AP
0: 00:1e:e5:64:ff:43 ssid='Kerberos' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:1e:e5:64:ff:43 ssid='Kerberos'
Trying to associate with 00:1e:e5:64:ff:43 (SSID='Kerberos' freq=2437 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'Kerberos' wpa ie len 22 pairwise 2 group 2 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
Authentication with 00:1e:e5:64:ff:43 timed out.
Added BSSID 00:1e:e5:64:ff:43 into blacklist
No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (4 BSSes)
Scan results: 4
CTRL-EVENT-SCAN-RESULTS 
Selecting BSS from priority group 2
Try to find WPA-enabled AP
0: 00:1e:e5:64:ff:43 ssid='Kerberos' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:1e:e5:64:ff:43 ssid='Kerberos'
Trying to associate with 00:1e:e5:64:ff:43 (SSID='Kerberos' freq=2437 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'Kerberos' wpa ie len 22 pairwise 2 group 2 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_bsd_set_wpa: enabled=0
wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
Failed to disable WPA in the driver.
wpa_driver_bsd_set_drop_unencrypted: enabled=0
wpa_driver_bsd_set_countermeasures: enabled=0
No keys have been configured - skip key clearing
Removed BSSID 00:1e:e5:64:ff:43 from blacklist (clear)
Cancelling scan request

I also tried with WEP, WPA, WPA2, without security. In some cases I got IP by running dhcp, but that was it, no data could be transferred.
 
When manually running wpa_supplicant you should use -D ndis switch to use ndis driver, because bsd driver(default one) in NDISulator is not yet completely usable (only wep actually works in 100% cases).

What happens if you run ndis_events(8) before running wpa_supplicant (with ndis driver)?

In some scenarios ndis_events makes authentication possible...

Does OPEN (no encryption at all) works?
 
0: 00:XX:XX:XX:XX:XX ssid='Kerberos' wpa_ie_len=0 rsn_ie_len=20 caps=0x411
skip - no WPA/RSN proto match

For some reasons wpa_supplicant thinks your setup/configuration is wrong, it probably is wrong.

What you get with % ifconfig wlan0 list scan?
 
Code:
# ifconfig wlan0 list scan
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
Kerberos        00:1e:e5:64:ff:43    6   54M -46:-96  100 EP   RSN
brenkus         02:30:b4:a9:1c:80    7   54M -90:-96  100 EPS 
brenkus_1       02:30:b4:a9:1c:81    7   54M -89:-96  100 EPS  RSN
hafner          00:1d:7e:55:ec:5d   11   54M -89:-96  100 EPS  WPA
default         00:1f:1f:23:43:ac   11   54M -88:-96  100 EP   MESHCONF MESHCONF HTCAP WPA WPS
Belkin_Pre-...  00:11:50:22:b4:16    1   54M -86:-96  100 E

Code:
# cat /etc/wpa_supplicant.conf 

network={
ssid="Kerberos"
pairwise=TKIP
group=TKIP
proto=WPA
key_mgmt=WPA-PSK
psk="xxxxxx"
}

I tried different versions od wpa_supplicant.conf. If i try with open network here is the result:

Code:
# cat /etc/wpa_supplicant.conf
network={
ssid="Kerberos"
key_mgmt=NONE
}

link

I am also watching device list on router, my laptop connects, but in like 3s disconnects, and loops.
 
Your wpa_supplicant configuration is obviously wrong: you use wpa but AP use rsn (wpa2). Try with minimal configuration: less lines better.

Is ndis_events(8) run in background? (ndis driver depends on this)
Can you disable power save in AP?

For open network you do not need to use wpa_supplicant. Just use ifconfig(8) directly.
 
Is AP running dhcp? Did you run dhclient? Is static or dynamic address in use?
Read FreeBSD handbook for more info.
 
AP is running DHCP, i did run dhclient and i obtained address, i added default route, dynamic address.
 
Code:
   1.
      # ifconfig
   2.
      re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
   3.
              options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
   4.
              ether 68:b5:99:62:18:73
   5.
              inet6 fe80::6ab5:99ff:fe62:1873%re0 prefixlen 64 scopeid 0x1
   6.
              inet 89.212.66.30 netmask 0xffff0000 broadcast 89.212.255.255
   7.
              nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
   8.
              media: Ethernet autoselect (100baseTX <full-duplex>)
   9.
              status: active
  10.
      ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
  11.
              ether e0:2a:82:18:a8:26
  12.
              media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
  13.
              status: associated
  14.
      lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
  15.
              options=3<RXCSUM,TXCSUM>
  16.
              inet 127.0.0.1 netmask 0xff000000
  17.
              inet6 ::1 prefixlen 128
  18.
              inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
  19.
              nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
  20.
      gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
  21.
              tunnel inet 89.212.66.30 --> 216.66.80.90
  22.
              inet6 fe80::6ab5:99ff:fe62:1873%gif0 prefixlen 64 scopeid 0x4
  23.
              inet6 2001:470:27:61e::2 --> 2001:470:27:61e::1 prefixlen 128
  24.
              nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
  25.
              options=1<ACCEPT_REV_ETHIP_VER>
  26.
      wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  27.
              ether e0:2a:82:18:a8:26
  28.
              inet6 fe80::e22a:82ff:fe18:a826%wlan0 prefixlen 64 scopeid 0x5
  29.
              inet 172.30.1.127 netmask 0xffffff00 broadcast 172.30.1.255
  30.
              nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
  31.
              media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
  32.
              status: associated
  33.
              ssid Kerberos channel 6 (2437 MHz 11g) bssid 00:1e:e5:64:ff:43
  34.
              country US authmode WPA privacy OFF txpower 0 bmiss 7 mcastrate 9
  35.
              mgmtrate 9 scanvalid 60 protmode CTS roaming MANUAL bintval 0
  36.
       
  37.
       
  38.
       
  39.
       
  40.
      # cat /etc/resolv.conf
  41.
      search t-2.net
  42.
      nameserver 84.255.209.79
  43.
      nameserver 84.255.210.79
 
I doubt you can use re0 stuff at same time with wlan0 without some extra work (bridge, etc.).

Put re0 down and try again with dhclient on wlan0.
 
It is working now yes, but not good. Pages are opening slowly or acually not, need to go to the same address like 3, 4 times before is shown... but signal is good?
 
Is it just resolving slowly or data transfer is slow? Is it still slow if you disable encryption on AP and client?

If you want to pick more advanced stuff (newer NDISulator), check https://github.com/richardpl/NDISulator pick stable branch. You will need FreeBSD source (pick right source, you should already have it - same one you are currently using - 8.2 RELEASE) and just rebuild and reinstall ndis modules and regenerate miniport driver.

On already mentioned link is Wiki page with some more documentation.
 
Back
Top