Finished: CALL FOR TESTERS Ralink wireless run(4) usb driver for FreeBSD

-- Update on Jan 29, 2010 --

The run(4) driver has been committed to FreeBSD 9-CURRENT.

The driver works with
RT2700U == RT2770 MAC/BBP + RT2720 (1T2R) or RT2750 (dual-band 1T2R) radio
RT2800U == RT2870 MAC/BBP + RT2820 (2T3R) or RT2850 (dual-band 2T3R) radio
RT3000U == RT3070 MAC/BBP + RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio
list of known devices are posted at thread #3


For the 11n support, try following driver. (Due to multiple updates in 80211 stack, 11n support is only available in HEAD or 9 RELEASE)

for 9-RELEASE rev 225013 or newer, and 10-CURRENT
11n_rc3


For older version (before being committed to the tree) try followings.

for 8.2-RELEASE
The driver is included.

for 8.1-RELEASE and 9-CURRENT older than rev 211314
8.1_REL

for 8.0-RELEASE users
8.0_REL_eos,
or run-8.0-REL_final.tar.bz2 << You can click this.
Support for this release has been ended. Please upgrade to 8.1 if practical.

[NB]
Under heavy traffic, Tx may stall. If you experience this issue, please apply patches for EHCI-hangs.
You need to re-build kernel, but with KERNFAST,# make buildkernel KERNCONF=[i]YOUR_CONF[/i] KERNFAST=1
it should take only a few minutes.
Patched files, sys/dev/usb/controller/ehci.h and sys/dev/usb/controller/ehci.c, are included in 8.1_REL version.

If you are setting up AP with 8.2-PRERELEASE, apply this patch, or panic.
http://svn.freebsd.org/viewvc/base?view=revision&revision=217511


for 7.2 users View attachment run-7.2_final.tar.bz2 << You can click this.
The final version
I have upgraded all my boxes to 8.0 or CURRENT, so I cannot do anything for 7.2 driver. "Final" means no more update, not complete. But it supports STA mode and h/w encryption. Hope this is good enough until upgrading to 8.

Thank you for testing and reporting problems.

-- Followings are original post. Left it here for log purpose --
Hello every one!

I'm porting run (ru'N' not ru'M') driver View attachment run.tar.bz2, and I've made it work (-encryption). Actually, I'm posting this by using that driver. You can find a list of supported devices here.
http://www.openbsd.org/cgi-bin/man....anpath=OpenBSD+Current&arch=amd64&format=html

It hasn't support encryption yet and has some issues, but I thought it is better than nothing and decided to share. If anyone want to try it out, download tar ball and read README in it.

I'm planning to make encryption work. But, I am an ex-MECHANICAL engineer and I installed very first FreeBSD little over a year ago. So, don't expect too much. It will take several weeks. Or, you can help me out.


-- updated on Nov 10, 2009 --
Now, the driver for CURRENT (and 8 RC) is available at thread #28 (One posted here is for 7.)

-- updated on Nov. 28, 2009 --
-- FIX -- FIX -- FIX -- View attachment run-fix.tar.bz2
Some packet loss/drop and memory leak were identified and fixed. (The perfomance has been improved, too.) Details are on RELEASE_NOTES included.

For those wondering about HOSTAP support, here is the word from the original author. (If you don't know who he is, check how many wireless drivers he has written.)
http://old.nabble.com/Re:-Linksys-WUSB600N-and-Access-Point-p21332878.html
I was looking forward to HOSTAP mode by myself. I might play with it, but don't hope for miracles.
 

Attachments

  • run-8.0-REL_final.tar.bz2
    82 KB · Views: 1,105
Thanks for your work!
Please also file a PR with the new driver and send a mail to current@freebsd.org so it can be rewviewed by a few developers.
 
Thanks for your comment. I'll do that.

I'm not only new to FreeBSD, but new to whole open source stuff. Applicate for info on right procedure.


----
Following is just for a search optimization.
I thought people most likely search with the product's name.

The driver should work with following adapters:

Airlink101 AWLL6090
ASUS USB-N11
ASUS WL-160N
Belkin F5D8051 ver 3000
Belkin F5D8053
Belkin F5D8055
Belkin F6D4050 ver 1
Buffalo WLI-UC-AG300N
Buffalo WLI-UC-G300N
Buffalo WLI-UC-GN
Corega CG-WLUSB2GNL
Corega CG-WLUSB2GNR
Corega CG-WLUSB300AGN
Corega CG-WLUSB300GNM
D-Link DWA-130 rev B1
D-Link DWA-140
DrayTek Vigor N61
Edimax EW-7711UAn
Edimax EW-7711UTn
Edimax EW-7717Un
Edimax EW-7718Un
Gigabyte GN-WB30N
Gigabyte GN-WB31N
Gigabyte GN-WB32L
Hawking HWDN1
Hawking HWUN1
Hawking HWUN2
Hercules HWNU-300
Linksys WUSB54GC v3
Linksys WUSB600N v1 and v2
Mvix Nubbin MS-811N
Planex GW-USMicroN
Planex GW-US300MiniS
Sitecom WL-182
Sitecom WL-188
Sitecom WL-301
Sitecom WL-302
Sitecom WL-315
SMC SMCWUSBS-N2
Sweex LW303
Sweex LW313
Unex DNUR-81
Unex DNUR-82
ZyXEL NWD210N
ZyXEL NWD270N

The driver supports following Ralink chipsets.
RT2700U == RT2770 MAC/BBP + RT2720 (1T2R) or RT2750 (dual-band 1T2R) radio
RT2800U == RT2870 MAC/BBP + RT2820 (2T3R) or RT2850 (dual-band 2T3R) radio
RT3000U == RT3070 MAC/BBP + RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio


--update Jan 29, 2010--
An experimental status on WUSB600N v2 bas been lifted. Thank you for every one taking risks for testing the driver.
-- updated on Jan 09, 2010 --
A support for WUSB600N v2 has experimentally been added to current driver. Please see the first post for details.
-- added on Dec 02, 2009 --
*1) For Linksys WUSB600N, they now have ver. 1 (plain rectangular shape) and ver. 2 (wedge like shape). Since they have different driver for each version, if_run most likely won't work with ver.2.
 
Hostap?

Hi,

I occasionally have the need for an AP-supporting USB WiFi device, and I've had bad experiences with rum.

Do run devices and the driver properly support the AP mode?
 
Hello ivoras,

Unfortunately, no. The device doesn't support for a hostap mode (no beacon tx by h/w).


--update--
I'll move on to CURRENT since that's where the actions are. Everything might work well fine on 8 as well. Stay tuned.

Happy thanks giving.
(It is a thanks giving weekend in Canada.)
 
great to see that this driver is being ported! good work
can't wait to test the driver...

firmare compiles fine but I can not compile the src under 9-current

Have you already made the jump to 9-current? I cannot compile it successful under current release
 
finally, I saw the light, Been looking for this driver for Freebsd long time.. hopefully could get it worked on 7-stable.keep waiting it updates

thanks a lot....
 
PseudoCylon said:
Hello ivoras,

Unfortunately, no. The device doesn't support for a hostap mode (no beacon tx by h/w).


--update--
It seems 7.x doesn't work well with h/w en/decryption.
http://www.freebsd.org/cgi/cvsweb.c....c?rev=1.23;content-type=text/x-cvsweb-markup
So, I'll move on to CURRENT. Everything might work well fine on 8. Stay tuned.

Happy thanks giving.
(It is a thanks giving weekend in Canada.)

I'm sure that rt2870 chip supports transmition of beacons in h/w
because i know the linux reference driver very good and
it works on linux. I think rt2860 supports sending of beacons
because rt2860 openbsd driver supoorts HOSTAP mode.
 
Hello,

All answers in one post.

cannot compile under current 9
It shouldn't. The driver I posted is for 7.2 release. That's why I'm porting it to current at this moment.

HOSTAP mode
I checked their codes, and I've found out that openbsd's PCI based RT2860 chipset driver does support HOSTAP mode. But, for some reason, it is committed from if_run. Both drivers were written by the same person, so I guess HOSTAP mode doesn't work on usb dongle. But, I will give it a shot and see what's gonna happen.

waiting for updates...
There are big changes in ieee80211 and usb stack between 7 and 8. So, it is a quite job on re-writing a driver for usb wireless adapters. And I haven't made current working. (first compiled current kernel failed to boot.) It will take a while. So, stay tuned.
 
PseudoCylon said:
Hello,

All answers in one post.

cannot compile under current 9
It shouldn't. The driver I posted is for 7.2 release. That's why I'm porting it to current at this moment.

HOSTAP mode
I checked their codes, and I've found out that openbsd's PCI based RT2860 chipset driver does support HOSTAP mode. But, for some reason, it is committed from if_run. Both drivers were written by the same person, so I guess HOSTAP mode doesn't work on usb dongle. But, I will give it a shot and see what's gonna happen.

waiting for updates...
There are big changes in ieee80211 and usb stack between 7 and 8. So, it is a quite job on re-writing a driver for usb wireless adapters. And I haven't made current working. (first compiled current kernel failed to boot.) It will take a while. So, stay tuned.

rt2870 supports sending of beacons in h/w because the reference driver from Ralink for linux uses this feature. Furthermore,
beacon sending is also necessary for IBSS mode. :)
 
NAC said:
oh, that's a good news, what driver did you use? if_run usb driver ? or another one? thanks

nope, i implemented my own driver.
i'm currently learning on my own how wlan and 802.11 stack works.
 
PseudoCylon said:
Cool! How did you do it?


Update
The if_run driver has been compiled on current. Hunting for bugs.

Where do you have problems with WEP ?

I had also big problems with WEP at the beginning.

The following things are important:

* Install WEP key in both key tables (shared and pairwise),
because if you install it only in pairwise you won't be able
to receive multicast and broadcast packets, and dhclient will not work !!!

* After you received an packet in your rx interrupt that was decrypted by hardware (flag in rx desc), you should set M_WEP flag in the variable m_flags of mbuf, because net80211 will silently drop data packets decrypted by hardware if you do not do it.

I figured it out by myself through reading the net80211 code :)
Some documentation will be helpful.

* And you should install new key only after the association was successfull, because if you install a WEP key before an association, you won't have valid WCID !!!

I hope it can help you.

If you have specific questions then don't hesitate ans ask me,
i will try to help you.

I'm currently working on AES-CCMP.
 
I'm currently testing AES-CCMP, i'm able to receive and decrypt multicast and brooadcast packets but it seems that the AP don't
understand my unicast packets to it :-(
 
AES-CCMP still doesn't work.
I'm currently developing a driver for rt2860 PCI card (only monitor mode) from Linksys so i can sniff packets coming from rt2870 USV card and analyze it
on freebsd.
 
PseudoCylon / egorenar: Make sure you post patches somewhere, so that users/developers can test your drivers.
 
joel@ said:
PseudoCylon / egorenar: Make sure you post patches somewhere, so that users/developers can test your drivers.

I will post my driver as soon as AES-CCMP and/or TKIP will work.
Till now only WEP does work. I will try to make it work till the end of this week.
 
Be patient! FreeBSD newbie + ex-mechanical engineer is working here.

When I get it to work, members of this forums will be the first ones to know it.

Condition of the driver for current is now upgraded from crashing like windows to receiving frame.

Here is my plan
1) make driver for current work
2) fix driver for 7.2 (I bet egorenar will do it before I finish off one for current.) But, things didn't go as I expected. So, I made fix by myself. Please see the first post for update. (added on Jan 09, 2010)
3) port it to 8.0


Sorry NAC, src code is the only thing I have.
NAC said:
howto document available ?
I really want to get my Ralink RT2870 worked.
thanks :)
 
  • Thanks
Reactions: NAC
Indeed, we should be patient.

I get the impression that a lot of progress is being made :) and that we can test it soon on our own hardware.

I also get the impression that the development of the driver is turning into a race/competition between PseudoCylon and egorenar. Although competition is not necessarily a bad thing, I think more and faster progress can be made in this case by working together.

Keep u the good work, guys !
 
Good news, guys !!!
AES-CCMP is finally working with wpa_supplicant !!! :)
I'm currently surfing with it !!!
TKIP is still not working properly.

I implemented rt2860 driver (only monitor mode) and could
analyze with it packets sent by rt2870 chip. It helped me to find a bug in my driver.
I have 2 NICs, Linksys WUSB600N with rt2870 chip and Linksys WMP600N with rt2860 chip.

Next i will try to make TKIP work and then 802.11n.

:e :e :e
 
Back
Top