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

egorenar

Active Member

Reaction score: 20
Messages: 199

But i still have problems with WME (QoS).
Trying to fix it.

The driver for rt2860 chip is also working now in monitor mode and very stable.
It helps me a lot to test my rt2870 chip driver.
 
OP
PseudoCylon

PseudoCylon

Active Member

Reaction score: 19
Messages: 151

if_run for CURRENT update

Hello everyone!

if_run for CURRENT update

Here are good news and bad news.

The bad news is I've been working on h/w encryption for almost a week but I have no idea what's wrong. (I cannot write keys onto h/w; usb kicks me out.) I don't know how long it will take to fix it.

The good news is I added s/w encryption and it works with wep, wpa 1/2.

I haven't installed X on current yet, so I couldn't test too much, only ping and fetch. But, it should work fine under STA mode. Please read README included.

I added provable code for h/w beacon. If you are brave, you can try it out. (I haven't tested it by myself yet.)

And here is another bad news. It's 3 o'clock in the morning! Gaaa, I gotta go bed.


-- updated on Nov. 28, 2009 --
Fix has been released and available at the very first thread
 

Attachments

OP
PseudoCylon

PseudoCylon

Active Member

Reaction score: 19
Messages: 151

Eyemaster said:
unfortunately, your driver results in kernel trap when I plug in the hercules HWNUm-300 mini :( (also when I define SIX in if_runvar.h)

I added product ID 0x031 to usbdevs and compiled your driver.
when I load if_run kernel trap occurs

any idea for a fix?

GUILLEMOT HERCULES <0x06f8>
HWNUm-300 PRODUCT 0xe031
http://www.hercules.com/uk/wifi/bdd/p/104/hercules-wireless-n-usb-mini-hwnum-300-/
Hi Eyemaster, Thank you for trying out the driver.

I think HWNU-300 and HWNUm-300 uses different chipset. They have different windows diver for each products.

But, when it panic, you see a messeg;
run0: could not allocate USB transfers, err=USB_ERR_NO_PIPE
try replace lines from 349 to 414 (inclusive) with followings
Code:
static const struct usb_config run_config[RUN_N_XFER] = {
    [RUN_BULK_TX_BE] = {
	.type = UE_BULK,
	.endpoint = UE_ADDR_ANY,
	.ep_index = 0,
	.direction = UE_DIR_OUT,
	.bufsize = RUN_MAX_TXSZ,
	.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
	.callback = run_bulk_tx_callback,
	.timeout = 5000,
    },
    [RUN_BULK_TX_BK] = {
	.type = UE_BULK,
	.endpoint = UE_ADDR_ANY,
	.direction = UE_DIR_OUT,
	.ep_index = 1,
	.bufsize = RUN_MAX_TXSZ,
	.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
	.callback = run_bulk_tx_callback,
	.timeout = 5000,
    },
    [RUN_BULK_TX_VI] = {
	.type = UE_BULK,
	.endpoint = UE_ADDR_ANY,
	.direction = UE_DIR_OUT,
	.ep_index = 2,
	.bufsize = RUN_MAX_TXSZ,
	.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
	.callback = run_bulk_tx_callback,
	.timeout = 5000,
    },
    [RUN_BULK_TX_VO] = {
	.type = UE_BULK,
	.endpoint = UE_ADDR_ANY,
	.direction = UE_DIR_OUT,
	.ep_index = 3,
	.bufsize = RUN_MAX_TXSZ,
	.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
	.callback = run_bulk_tx_callback,
	.timeout = 5000,
    },
#ifdef SIX
    [RUN_BULK_TX_HCCA] = {
	.type = UE_BULK,
	.endpoint = UE_ADDR_ANY,
	.direction = UE_DIR_OUT,
	.ep_index = 4,
	.bufsize = RUN_MAX_TXSZ,
	.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
	.callback = run_bulk_tx_callback,
	.timeout = 5000,
    },
    [RUN_BULK_TX_PRIO] = {
	.type = UE_BULK,
	.endpoint = UE_ADDR_ANY,
	.direction = UE_DIR_OUT,
	.ep_index = 5,
	.bufsize = RUN_MAX_TXSZ,
	.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
	.callback = run_bulk_tx_callback,
	.timeout = 5000,
    },
#endif	/* SIX */
    [RUN_BULK_RX] = {
	.type = UE_BULK,
	.endpoint = UE_ADDR_ANY,
	.direction = UE_DIR_IN,
	.bufsize = RUN_MAX_RXSZ,
	.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
	.callback = run_bulk_rx_callback,
    }
};
- Warning - Warning - Waring -
Forcing to run a device with wrong driver sounds very bad to me. Please make sure your device has the right chipset, before attempting.

Also, defining SIX causes more trouble. Undef SIX. When everything works, then define SIX and see if it works.
 

eMxyzptlk

New Member


Messages: 18

I'm running 8-RC2 (amd64), I just finished installing it actually

I can't kldload if_run

Code:
# kldload if_run
kldload: can't load if_run: Exec format error
but I didn't get any warnings/errors while compiling, any ideas ?
 

eMxyzptlk

New Member


Messages: 18

I forgot to tell you what I have in dmesg when the error above occurs

Code:
link_elf_obj: symbol _mtx_assert undefined
linker_load_file: Unsupported file type
 
OP
PseudoCylon

PseudoCylon

Active Member

Reaction score: 19
Messages: 151

Hello eMxyzptlk,

It is for CURRENT 9, so might not work on 8 RC.

But try this: change the last line of if_runvar.h,
#define RUN_LOCK_ASSERT(sc, t) mtx_assert(&(sc)->sc_mtx, t)
to
Code:
#define RUN_LOCK_ASSERT(sc, t)	(void)0
Again it shouldn't work on 8 RC. If it doesn't work wait 'till I port it to 8. If it works, I won't have to port. Lucky me.

If it works, next time compiling custom kernel, adding options "INVARIANTS" AND "INVARIANT_SUPPORT" (or removing both) in kernel config file (and compile kernel) should fix the problem.

Please let me know how it goes.
 

eMxyzptlk

New Member


Messages: 18

Hey,

i just tried that patch, it compiled okay, loaded kay, but when I tried to set the country to FR
Code:
# ifconfig run0 country FR
ifconfig: unable to get regulatory domain info: invalid argument
nothing in dmesg..

Next I tried to put the device up, the pc hanged for couple of seconds and it rebooted.

Next I tried to put the device up
 
OP
PseudoCylon

PseudoCylon

Active Member

Reaction score: 19
Messages: 151

Try this.
Code:
#kldload if_run
#ifconfig wlan create wlandev run0
#ifconfig wlan0 country FR
wlan thing is new to 8. Once you create wlan0, use wlan0 instead of run0, i.e ifconfig wlan0 ssid xxxx, ifconfig wlan0 up, etc. You only need to use run0 when creating wlan.
To unload, do
Code:
#ifconfig wlan0 down
#ifconfig wlan0 destroy
#kldunload if_run
or you can just turn off the computer.

And please check if FR is listed in
Code:
#ifconfig wlan0 list countries
after ifconfig wlan create wlandev run0 if you haven't done so.
 

eMxyzptlk

New Member


Messages: 18

That actually worked, but the driver is really unstable, I was able to associate with an open ssid, and I tried pinging another PC wired, I got 70% loss..

What next?

P.S: I have the same chip as you (WUSB54GC ver.3)
 

eMxyzptlk

New Member


Messages: 18

Forget what I said, I'm actually browsing with it now..

Earlier I tried to connect to the FreeWifi Hotspot (If you don't know what it is, it is an access point broadcasted by every Freebox ( http://www.free.fr ) allowing people with a free connection to browse the Net wherever they go.. Somehow that did not work, but I brought back my stored wifi access point and setup it to broadcast an open wifi with MAC Filtering, it works like a charm this way.

I need to first learn how to use WPA with FreeBSD and I then will try with the main access point currently broadcasting a WPA-PSK protected wifi, I'll tell you what happens next..
 
OP
PseudoCylon

PseudoCylon

Active Member

Reaction score: 19
Messages: 151

That's good.

I guess it was an environmental issue. There are bunch of gadget emitting 2.4ghz band these days. I checked other driver and code for 8 and 9 are identical.

Once you write a config file just run
# wpa_supplicani -B -i wlan0 -c 'your_config_file'
after setting country code. It should work.

P.S.
At the time of writing, WUSB54GC is not compatible with windows 7. (Lincsys has only released drivers for more expensive devices like WUSB600N.) FreeBSD is truly windows incapable!
 

Eyemaster

New Member


Messages: 12

This might be a bit off topic but maybe useful so...

I got a official confirmation about chipset in HWNum-300 from Hercules:
"We inform you that the chipset of the USB N mini key HWNUm-300 is Realtek RTL8192SU."

This means that in contrast to Hercules prod ID 0x0e30 HWNu-300 with the RT2870 chipset, Hercules prod ID 0x0e31 HWNum-300 contains the RTL8192SU chipset.

@PseudoCylon : So, you can now ignore my reports about your driver

Anyone working on a FreeBSD driver for the RTL8192SU chipset, by any chance?

I think there is already a driver for RTL8192SU under linux :
http://www.linuxhq.com/kernel/file/drivers/staging/rtl8192su/index.html
 

egorenar

Active Member

Reaction score: 20
Messages: 199

Good news, guys.
QoS(WME) is finally working with rt2870 chip.
It was an important step towards 802.11n because
QoS is mandatory in 802.11n !!!
 

gnoma

Active Member

Reaction score: 21
Messages: 197

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.
egorenar sorry for the question but how did you install WMP600N ???
I am using FreeBSD 7.2 and I still can't install that card. Tryed with this driver but noting happens...
pls it you have a time check this topic http://forums.freebsd.org/showthread.php?t=8391
Thank you :)
 

egorenar

Active Member

Reaction score: 20
Messages: 199

gnoma said:
egorenar sorry for the question but how did you install WMP600N ???
I am using FreeBSD 7.2 and I still can't install that card. Tryed with this driver but noting happens...
pls it you have a time check this topic http://forums.freebsd.org/showthread.php?t=8391
Thank you :)
Hi,

if_run driver does not support rt2860 chip, it is an USB driver.
WMP600N is a PCI card !!!

I have implemented my own driver for WMP600N. WMP600N has rt2860 chip. My driver is not complete yet, i use it only in monitor mode, that means it can only receive packets but not send yet, but you can use it for example with wireshark without any problems.
Currently, i' m working on 802.11n mode for rt2870 chip and use
WMP600N to analyze packets which are sent by WUSB600N.

It's not difficult to implement sending packets for WMP600N,
i guess i can make it work in a weekend or so. But currently,
i'm concentrating on WUSB600N. I planned to finish WMP600N
driver later. I will try to implement packet sending for WMP600N
on this weekend if i have time.

I myself find WMP600N better than WUSB600N. It has 2 large antennas and is easier to program than USB driver.

I can provide you with my rt2860 driver for WMP600N if you want. It works only on FreeBSD 7.2.

:e :e :e
 

gnoma

Active Member

Reaction score: 21
Messages: 197

I'll be very grateful if you provide this driver:)
I am planing to use this card as AP in my office but I'll not use any encription... hope it works :)
thank you.
 

egorenar

Active Member

Reaction score: 20
Messages: 199

gnoma said:
I'll be very grateful if you provide this driver:)
I am planing to use this card as AP in my office but I'll not use any encription... hope it works :)
thank you.
Here is the driver.
As i said earlier, now only monitor mode is implemented.
Packet sending is not supported yet, but you can sniff WLAN
with wireshark.

How to use:

1. Extract the archive

Code:
$ tar xvjf rt2860_fbsd72.tar.bz2
2. Change into the extracted directory and execute "make"

Code:
$ cd rt2860_fbsd72
$ make
3. Now load the kernel module (as root !!!)

Code:
# kldload ./rt2860.ko
4. Now you should be able to see the NIC rt28600

Code:
$ ifconfig

In case you have problems with my driver, don't hesitate to contact me.
 

Attachments

gnoma

Active Member

Reaction score: 21
Messages: 197

Thank you egorenar you are the men!!!
I'll test tomorrow at the work place. And I realy hope u finish the full driver with no problems... Don't meen to rush you if it sounds like that :( but I have realy no more options and you bring me a hope! :D If it works well you are my personal jesus :p
Thank you very much.
 

gnoma

Active Member

Reaction score: 21
Messages: 197

Code:
# ifconfig rt28600 up scan
SSID            BSSID              CHAN RATE   S:N     INT CAPS
D-link          00:19:5b:54:cc:c2    6   54M -88:-95  119 EP   WPA
CHVHOME         00:1a:70:9d:62:0e    9   54M -89:-95  100 EP   WPA
belkin54g       00:17:3f:44:32:30   11   54M -89:-95  100 EP   WPA
BTC-ADSL        00:1e:73:59:5d:bf    3   54M -88:-95  100 E
It works great :)
Thank you :p
YOU ARE THE MAN!!!
I guess I can not connect any network with this driver or make an AP.(AP is the target idea)
So I can't wait for the fill driver :) I am sure it will be something great.

Thank you egorenar :p
YOU ARE THE MAN!!!
 
Top