View Full Version : Finished: CALL FOR TESTERS Ralink wireless run(4) usb driver for FreeBSD
PseudoCylon
October 7th, 2009, 05:31
-- 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 (http://forums.freebsd.org/showpost.php?p=44278&postcount=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 (https://gitorious.org/run/run/trees/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 (http://gitorious.org/run/run/trees/8.1_REL)
for 8.0-RELEASE users
8.0_REL_eos (http://gitorious.org/run/run/trees/8.0_REL_eos),
or run-8.0-REL_final.tar.bz2 (http://forums.freebsd.org/attachment.php?attachmentid=916&stc=1&d=12783808364) << 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 (http://lists.freebsd.org/pipermail/freebsd-current/2010-October/020504.html).
You need to re-build kernel, but with KERNFAST,make buildkernel KERNCONF=YOUR_CONF KERNFAST=1
it should take only a few minutes.
Patched files (http://gitorious.org/run/run/trees/8.1_REL/dev/usb/controller), sys/dev/usb/controller/ehci.h and sys/dev/usb/controller/ehci.c, are included in 8.1_REL (http://gitorious.org/run/run/trees/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 739 << 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 426, 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.cgi?query=run&apropos=0&sektion=0&manpath=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 (http://forums.freebsd.org/showpost.php?p=47936&postcount=28) (One posted here is for 7.)
-- updated on Nov. 28, 2009 --
-- FIX -- FIX -- FIX -- 500
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.
lme@
October 7th, 2009, 16:06
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.
PseudoCylon
October 8th, 2009, 01:07
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 (http://forums.freebsd.org/showthread.php?t=7562) 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.
ivoras@
October 10th, 2009, 12:03
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?
PseudoCylon
October 11th, 2009, 05:23
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.)
Eyemaster
October 15th, 2009, 23:36
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
NAC
October 16th, 2009, 06:33
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....
egorenar
October 16th, 2009, 07:07
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.cgi/src/sys/net80211/ieee80211_crypto.c?rev=1.23;content-type=text%2Fx-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.
PseudoCylon
October 16th, 2009, 11:08
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.
egorenar
October 16th, 2009, 11:58
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. :-)
egorenar
October 24th, 2009, 17:42
cool, WEP is working now with freebsd 7.2 :-)
egorenar
October 24th, 2009, 17:44
I have tested WEP with Linksys WUSB600N.
Now i want to implement WPA and WPA2.
NAC
October 24th, 2009, 20:44
cool, WEP is working now with freebsd 7.2 :-)
oh, that's a good news, what driver did you use? if_run usb driver ? or another one? thanks
egorenar
October 25th, 2009, 08:39
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
October 25th, 2009, 10:40
cool, WEP is working now with freebsd 7.2 :-)
Cool! How did you do it?
Update
The if_run driver has been compiled on current. Hunting for bugs.
egorenar
October 25th, 2009, 12:53
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.
PseudoCylon
October 26th, 2009, 08:58
Sounds like M_WEP flag was what I needed.
egorenar
October 26th, 2009, 12:39
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 :-(
NAC
October 27th, 2009, 10:35
howto document available ?
I really want to get my Ralink RT2870 worked.
thanks :)
egorenar
October 27th, 2009, 15:36
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.
joel@
October 27th, 2009, 18:53
PseudoCylon / egorenar: Make sure you post patches somewhere, so that users/developers can test your drivers.
egorenar
October 27th, 2009, 20:48
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.
PseudoCylon
October 28th, 2009, 04:04
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 (http://forums.freebsd.org/showthread.php?t=7562) post for update. (added on Jan 09, 2010)
3) port it to 8.0
Sorry NAC, src code is the only thing I have.
howto document available ?
I really want to get my Ralink RT2870 worked.
thanks :)
Eyemaster
October 28th, 2009, 11:06
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 !
egorenar
October 29th, 2009, 21:42
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
egorenar
November 2nd, 2009, 19:07
TKIP is working now !!!
:e :e :e
egorenar
November 2nd, 2009, 19:54
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.
PseudoCylon
November 8th, 2009, 11:02
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 (http://forums.freebsd.org/showpost.php?p=44110&postcount=1)
Eyemaster
November 9th, 2009, 01:48
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-/
Eyemaster
November 9th, 2009, 02:16
I thought that HWNUm-300 had the RT2870 chipset, but I might be wrong...
PseudoCylon
November 9th, 2009, 05:57
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
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
November 9th, 2009, 19:11
I'm running 8-RC2 (amd64), I just finished installing it actually
I can't kldload if_run
# 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
November 9th, 2009, 20:09
I forgot to tell you what I have in dmesg when the error above occurs
link_elf_obj: symbol _mtx_assert undefined
linker_load_file: Unsupported file type
PseudoCylon
November 9th, 2009, 23:13
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
#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
November 10th, 2009, 07:37
Hey,
i just tried that patch, it compiled okay, loaded kay, but when I tried to set the country to FR
# 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
eMxyzptlk
November 10th, 2009, 07:47
I was able to get you a screenshot of the panic
http://twitpic.com/oz0ed
PseudoCylon
November 10th, 2009, 12:31
Try this.
#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
#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
#ifconfig wlan0 list countries
after ifconfig wlan create wlandev run0 if you haven't done so.
eMxyzptlk
November 10th, 2009, 14:09
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
November 10th, 2009, 17:30
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..
PseudoCylon
November 11th, 2009, 00:54
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
November 11th, 2009, 20:02
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
November 11th, 2009, 23:37
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
November 16th, 2009, 10:45
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
November 16th, 2009, 12:12
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
November 16th, 2009, 12:41
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
November 16th, 2009, 19:10
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
$ tar xvjf rt2860_fbsd72.tar.bz2
2. Change into the extracted directory and execute "make"
$ cd rt2860_fbsd72
$ make
3. Now load the kernel module (as root !!!)
# kldload ./rt2860.ko
4. Now you should be able to see the NIC rt28600
$ ifconfig
In case you have problems with my driver, don't hesitate to contact me.
gnoma
November 23rd, 2009, 17:04
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.
hellevil
November 23rd, 2009, 17:24
RT2770F support this driver ?
egorenar
November 25th, 2009, 06:12
RT2770F support this driver ?
Hi,
please test this driver and provide feedback.
Thanks.
gnoma
November 26th, 2009, 11:19
# 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!!!
egorenar
November 27th, 2009, 08:08
# 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!!!
Thanks, but please be patient with me, i have not much time now for this driver but i promise to continue my work.
:-)
gnoma
November 27th, 2009, 12:42
OK dude :) sorry I don't meen to rush you.
And... about that driver I don't know is it normal and do I have to make more settings about that, but when I restart my PC and type ifconfig that wi-fi card was not in the list.
Is it a driver bug or I just didn't make some settings I should do?? I don't know I just install the driver and didn't touch nothing else.
PseudoCylon
November 28th, 2009, 10:51
Hello everyone,
A fix have been released for the driver for 8.0 RELEASE and CURRENT. There were some packet loss/drop and mem leak. (The fix improves some performance too.)
Also, 40 more vender/device IDs have been added.
Get it here (http://forums.freebsd.org/showpost.php?p=44110&postcount=1)
OK dude :) sorry I don't meen to rush you.
And... about that driver I don't know is it normal and do I have to make more settings about that, but when I restart my PC and type ifconfig that wi-fi card was not in the list.
Is it a driver bug or I just didn't make some settings I should do?? I don't know I just install the driver and didn't touch nothing else.
@gnoma
Since I'm here.
Yes, you need to make more settings. If you want the driver to be loaded automatically at boot time, add
module_name_load="YES"
to /boot/loader.conf
you have to install the driver (make install), though.
and if you add
ifconfig_interface_name="WPA DHCP"
to /etc/rc.conf you should be on the network automatically.
You can find complete detail at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html
gnoma
November 28th, 2009, 16:54
OK Thank you.... then I just need to know then ame of the module that I have to add in loader.conf :)
May be it is something like
module_rt28600_load="YES"
or something?
About that fix
A fix have been released for the driver for 8.0 RELEASE and CURRENT. There were some packet loss/drop and mem leak. (The fix improves some performance too.)
Rekease 8.0 and CURRENT? That current meens 7.2?
DutchDaemon
November 28th, 2009, 17:14
CURRENT is bleeding-edge (which is now FreeBSD 9).
Reygok
November 28th, 2009, 17:46
Hi!
I'm not an expert in these things and dont understand english very well, so please, could someone just help me with this?
I have the Linksys WUSB54GC, which appears in the list, but I dont have any idea how to install these drivers. Is the "run.tar" the driver? SO what do I have to do with it.
So, great thanks in advance,
Reygok
GeorgeMitchell
November 28th, 2009, 20:37
Is the run.tar.bz2 file from the first post still the correct version for FreeBSD 7,2? And is ad hoc mode supported, or do I have to have an access point somewhere?
PseudoCylon
November 29th, 2009, 02:40
@gnoma
No, based on your post it should be
rt2860_load="YES"
@Reygok
First, you have to check the version of your device. Look at the back of the device. If the model No says "WUSB54GC" use if_rum. (It is written in very very small font. You have to look hard.) The driver comes with FreeBSD. If it says "WUSB54GC ver. 3" use if_run. Please see the first (http://forums.freebsd.org/showthread.php?t=7562) post for latest update.
@GeorgeMitchell
It is for 7.2, but ad hoc mode isn't supported. Probably the same reason the original author excluded the support.
Reygok
November 29th, 2009, 09:28
Sorry, but what do you mean by: "The driver comes with FreeBSD"?
My device says WUSB54GC, nothing else.
Thanks, Reygok
PseudoCylon
November 29th, 2009, 12:31
Sorry, I should have said "The driver is included in FreeBSD." I live in Canada, but I'm not a Canadian. I feel I'm more fluent in C than English, these days.
Anyway, rum(4) should work fine with your device. If you are using GENERIC kernel, it even compiled into the kernel. Just plug in the device and run
ifconfig
You should see "rum0" in the output. If not you need to load the driver manually. It depends which version of FreeBSD you are using. But when you run
man rum
you will see appropriate manual for your version. And the manual tells you how to use the driver as well.
Reygok
November 29th, 2009, 13:45
Okay, so I need to insall this FreeBSD? I did not know that^^
So, now, before I continue, I want to know if I can go into Wifi with my Nintendo DS when using this driver?, If not, i dont even have to install this BDS thing
DutchDaemon
November 29th, 2009, 18:57
Reygok, what are you doing on a FreeBSD forum if you a) don't run it and b) have never heard of it? Everything posted here applies to the FreeBSD operating system, not your game console.
Reygok
November 29th, 2009, 20:19
Good to know that, thanky^^ So, I'm gone...
egorenar
November 30th, 2009, 23:38
OK dude :) sorry I don't meen to rush you.
And... about that driver I don't know is it normal and do I have to make more settings about that, but when I restart my PC and type ifconfig that wi-fi card was not in the list.
Is it a driver bug or I just didn't make some settings I should do?? I don't know I just install the driver and didn't touch nothing else.
I have good news for guys who are impatient to test rt2860 :-)
I have finally implemented sending for rt2860. It's not very stable yet. Please test it and provide feedback. It's the first version of the driver with Tx support.
AP mode doesn't work yet.
And Tx watchdog happens to often for my liking.
The driver supports 802.11abg, QoS, encryption in hardware, WEP, TKIP and AES.
Installation:
Extract archive, run make and load the driver with kldload.
The driver is compiled with debug information on by default, so
i would be grateful if you could provide crash dumps with backtrace to me
should the driver crash :-) (kgdb backtraces would be nice)
I will try to fix bugs in the next days.
You will not believe me how many crashes i had while testing this driver
before i got more or less stable version :-)
Writing this post with rt2860 :-)
Thanks.
2.12.2009 Update, Tx DMA scatter added => more efficient sending of frames, avoids mbuf copying
4.12.2009
The driver is now stable. But
you should disable bgscan with "ifconfig rt28600 -bgscan" else
the link goes down after some time, don't know why.
The problem with interrupts is not solved yet.
Added statistic output, try "sysctl dev.rt2860.0.stats=1" and then "dmesg".
:e :e :e
gnoma
December 2nd, 2009, 10:59
I was unable to copy the code becos I don't see it on SSH and on the FreeBSD machine it was for short time and then it reboots.
It was something like...
interupt storm detected on "irq10"; trottiling interupt source
interupt storm detected on "irq10"; trottiling interupt source
interupt storm detected on "irq10"; trottiling interupt source
rt28600: Tx watchdog: tx_timer=0
rt28600: Tx watchdog: tx_timer=0
rt28600: Tx watchdog: tx_timer=0
interupt storm detected on "irq10"; trottiling interupt source
rt28600: Tx watchdog: tx_timer=0
And so on...
And also I want to ask if the driver is able to support an AP mode? Becos this morning I saw somehere that not every wi-fi driver in freebsd support this mode. Well I am sure at this time it doesn't but when it is complete?
egorenar
December 2nd, 2009, 11:42
I was unable to copy the code becos I don't see it on SSH and on the FreeBSD machine it was for short time and then it reboots.
It was something like...
interupt storm detected on "irq10"; trottiling interupt source
interupt storm detected on "irq10"; trottiling interupt source
interupt storm detected on "irq10"; trottiling interupt source
rt28600: Tx watchdog: tx_timer=0
rt28600: Tx watchdog: tx_timer=0
rt28600: Tx watchdog: tx_timer=0
interupt storm detected on "irq10"; trottiling interupt source
rt28600: Tx watchdog: tx_timer=0
And so on...
And also I want to ask if the driver is able to support an AP mode? Becos this morning I saw somehere that not every wi-fi driver in freebsd support this mode. Well I am sure at this time it doesn't but when it is complete?
Thanks for feedback,
yes the interface supports AP mode but driver not yet.
But i intend to implement it :-)
egorenar
December 2nd, 2009, 23:48
I was unable to copy the code becos I don't see it on SSH and on the FreeBSD machine it was for short time and then it reboots.
It was something like...
interupt storm detected on "irq10"; trottiling interupt source
interupt storm detected on "irq10"; trottiling interupt source
interupt storm detected on "irq10"; trottiling interupt source
rt28600: Tx watchdog: tx_timer=0
rt28600: Tx watchdog: tx_timer=0
rt28600: Tx watchdog: tx_timer=0
interupt storm detected on "irq10"; trottiling interupt source
rt28600: Tx watchdog: tx_timer=0
And so on...
And also I want to ask if the driver is able to support an AP mode? Becos this morning I saw somehere that not every wi-fi driver in freebsd support this mode. Well I am sure at this time it doesn't but when it is complete?
The problem is that the NIC generates an interrupt for every received or sent packet !!! I could count the interrupts with "vmstat -i" and rt2860 generates as many interrupts as system timer interrupt !!! I guess i need to do interrupt mitigation. How do i do it on FreeBSD, has somebody any ideas ???
The hardware of rt2860 chip is able to do interrupt mitigation in hardware but this feature is not documented. I tried to experiment with it, but the transfer rate becomes too low x(
3.12.2009
I have found a solution to my problem. The e1000 driver implements this.
It uses Fast IRQs and task queues to defer work which my driver does in
interrupt (similar to Linux tasklets). I will implement it soon, test
and report back :-)
3.12.2009
Implemented interrupt mitigation with task queues.
It didn't solve the problem x(
egorenar
December 4th, 2009, 22:47
I just learned that FreeBSD 8 was released. Cool :e
It is time to start porting my drivers for rt2870 and rt2860 chips to FreeBSD 8.
:e:e:e
kvchung
December 5th, 2009, 06:48
I can't wait for your rt2860 chips driver for FreeBSD 8.
I'd like to run it on my EeePC 1000H.
egorenar
December 5th, 2009, 23:03
I installed FreeBSD 8.0 today and started to port rt2860 device driver. Monitor mode is already working :e
I will try to make STA mode work on this weekend.
egorenar
December 6th, 2009, 01:15
I have good news, guys.
rt2860 STA mode with hardware encryption is working on FreeBSD 8.
:e :e :e
I ported the first version and writing this post with rt2860 driver on FreeBSD 8.
I will improve it in the next days and then you can test it
by yourself.
egorenar
December 6th, 2009, 11:37
Here is the first version of rt2860 device driver for FreeBSD 8.
It is stable and works fine on my very old PC with P4 2.5GHz.
Please test it and provide feedback.
You should deactivate bgscan with "ifconfig wlan0 -bgscan"
because it causes some problems.
Installation instruction:
1. Add following lines to rc.conf
wlans_rt28600="wlan0"
ifconfig_wlan0="WPA DHCP"
2. Restart networking
# /etc/rc.d/netif restart
3. Compile rt2860.ko KLM
$ make
4. Load rt2860.ko
# kldload ./rt2860.ko
AP mode is still work in progress.
6.12.2009
Added PCI IDs for Ralink RT2790 PCIe card.
Disabled BGSCAN because it causes problems.
So you don't have to disable it every time manually
with ifconfig.
:e :e :e
kvchung
December 6th, 2009, 14:20
I have done # kldload ./rt2860.ko
# kldstat
Id Refs Address Size Name
1 9 0xc0400000 760d70 kernel
2 1 0xc0b61000 52dc ums.ko
5 1 0xcb27f000 12000 rt2860.ko
but nothing happened
rt28600 has not been found
What else should I do ?
egorenar
December 6th, 2009, 14:22
I have done # kldload ./rt2860.ko
# kldstat
Id Refs Address Size Name
1 9 0xc0400000 760d70 kernel
2 1 0xc0b61000 52dc ums.ko
5 1 0xcb27f000 12000 rt2860.ko
but nothing happened
rt28600 has not been found
What else should I do ?
My driver currently works only for Linksys WMP600N.
I need PCI vendor and product ID of your card so
my driver could identify it and automatically load.
Try lspci -v and provide me with PCI IDs.
And in 5 minutes you can test it again.
:e
kvchung
December 6th, 2009, 14:32
# lspci -v not work
I try pciconf
pciconf -lv
...
none0@pci0:1:0:0: class=0x028000 card=0x27901814 chip=0x07811814 rev=0x00 hdr=0x00
vendor = 'Ralink Technology, Corp'
device = 'Wireless (RT2860/RT2890)'
class = network
egorenar
December 6th, 2009, 14:36
# lspci -v not work
I try pciconf
pciconf -lv
...
none0@pci0:1:0:0: class=0x028000 card=0x27901814 chip=0x07811814 rev=0x00 hdr=0x00
vendor = 'Ralink Technology, Corp'
device = 'Wireless (RT2860/RT2890)'
class = network
OK, you have a PCIe card.
VendorID=0x1814 and ProductID=0x0781
Wait a second and i will update my driver.
egorenar
December 6th, 2009, 14:48
# lspci -v not work
I try pciconf
pciconf -lv
...
none0@pci0:1:0:0: class=0x028000 card=0x27901814 chip=0x07811814 rev=0x00 hdr=0x00
vendor = 'Ralink Technology, Corp'
device = 'Wireless (RT2860/RT2890)'
class = network
OK, i updated the driver, you can try it again
and provide feedback. I could not test my driver with this device
so there is a possibility that some problems can occur.
:e
kvchung
December 6th, 2009, 15:56
It can find the device now
when I klkload, I get these message in dmesg
# kldload ./rt28600.ko
rt28600: <RT2790 PCIe> mem 0xfbef0000-0xfbefffff irq 19 at device 0.0 on pci1
rt28600: attaching
rt28600: EEPROM rev=0x0102
rt28600: EEPROM mac address=00:22:43:42:25:27
rt28600: EEPROM RF rev=0x0003, paths=1T2R
rt28600: EEPROM NIC config: Tx AGC control=0
rt28600: EEPROM country code=1/7
rt28600: EEPROM freq offset=0x1c
rt28600: EEPROM led cntl=0x01, LEDs=0xffff/0x9ad9/0xc8cc
rt28600: EEPROM LNA gains=0x00/0xff
rt28600: invalid EEPROM LNA gain: 2
rt28600: invalid EEPROM LNA gain: 3
rt28600: EEPROM Tx power compensation deltas=0(2MHz), 0(5MHz)
rt28600: EEPROM Tx power compensation #0=0x66663333(20MHz), 0x66663333(40MHz/2GHz), 0x66663333(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #1=0x66666666(20MHz), 0x66666666(40MHz/2GHz), 0x66666666(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #2=0x33333333(20MHz), 0x33333333(40MHz/2GHz), 0x33333333(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #3=0x66663333(20MHz), 0x66663333(40MHz/2GHz), 0x66663333(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #4=0xffff6666(20MHz), 0xffff6666(40MHz/2GHz), 0xffff6666(40MHz/5GHz)
rt28600: EEPROM TSSI 2GHz: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, step=255
rt28600: EEPROM TSSI 5GHz: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, step=255
rt28600: MAC/BBP RT2860 (rev 0x28720200), RF RT2720
rt28600: skip channel 10, could not find extension channel
rt28600: skip channel 11, could not find extension channel
rt28600: skip channel 12, could not find extension channel
rt28600: skip channel 13, could not find extension channel
rt28600: skip channel 14, could not find extension channel
rt28600: [ITHREAD]
wlan0: Ethernet address: 00:22:43:42:25:27
rt28600: initializing
rt28600: loading 8051 microcode
rt28600: 8051 microcode was successfully loaded
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
and I started to scan
It can list th APs
# ifconfig wlan0 up list scan
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
NCTU-Wireless 00:0b:86:9c:31:80 1 11M -143:-95 60 ES
0 00:02:6f:22:00:ae 1 54M -137:-95 100 ES
NCTU_NOD lab 00:22:b0:94:c8:f7 6 54M -138:-95 100 ES MESHCONF MESHCON
F WPS HTCAP WME
Kan Cheng T... 00:23:6c:8d:f5:97 11 54M -136:-95 100 E HTCAP WME
y955188 00:1f:1f:47:c0:64 11 54M -154:-95 100 EP MESHCONF MESHCON
F HTCAP RSN WME
NCTU-HOT-1-G 00:90:4b:bd:f4:30 11 54M -141:-95 100 ES
NCTU-HOT-1-A 00:90:4b:bd:f4:40 13 54M -142:-95 100 ES
ndlit 00:12:7f:ca:f0:a0 4 54M -138:-95 100 ES
ndl-ap2 00:1f:9e:c0:19:c0 8 54M -138:-95 100 EPS WME
Personal 00:24:8c:ec:20:dc 1 54M -145:-95 100 EPS RSN
guest 00:12:7f:ca:f3:a0 10 54M -137:-95 100 ES
NCTU-Wireless 00:0b:86:9c:4b:30 11 11M -138:-95 60 ES
but wlan0 still no carrier
# ifconfig
...
rt28600: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:22:43:42:25:27
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:22:43:42:25:27
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid NCTU-Wireless channel 5 (2432 Mhz 11g)
country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5
protmode CTS wme burst bintval 0
Sorry, this is my first time using wireless lan on freebsd...
egorenar
December 6th, 2009, 15:59
It can find the device now
when I klkload, I get these message in dmesg
# kldload ./rt28600.ko
rt28600: <RT2790 PCIe> mem 0xfbef0000-0xfbefffff irq 19 at device 0.0 on pci1
rt28600: attaching
rt28600: EEPROM rev=0x0102
rt28600: EEPROM mac address=00:22:43:42:25:27
rt28600: EEPROM RF rev=0x0003, paths=1T2R
rt28600: EEPROM NIC config: Tx AGC control=0
rt28600: EEPROM country code=1/7
rt28600: EEPROM freq offset=0x1c
rt28600: EEPROM led cntl=0x01, LEDs=0xffff/0x9ad9/0xc8cc
rt28600: EEPROM LNA gains=0x00/0xff
rt28600: invalid EEPROM LNA gain: 2
rt28600: invalid EEPROM LNA gain: 3
rt28600: EEPROM Tx power compensation deltas=0(2MHz), 0(5MHz)
rt28600: EEPROM Tx power compensation #0=0x66663333(20MHz), 0x66663333(40MHz/2GHz), 0x66663333(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #1=0x66666666(20MHz), 0x66666666(40MHz/2GHz), 0x66666666(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #2=0x33333333(20MHz), 0x33333333(40MHz/2GHz), 0x33333333(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #3=0x66663333(20MHz), 0x66663333(40MHz/2GHz), 0x66663333(40MHz/5GHz)
rt28600: EEPROM Tx power compensation #4=0xffff6666(20MHz), 0xffff6666(40MHz/2GHz), 0xffff6666(40MHz/5GHz)
rt28600: EEPROM TSSI 2GHz: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, step=255
rt28600: EEPROM TSSI 5GHz: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, step=255
rt28600: MAC/BBP RT2860 (rev 0x28720200), RF RT2720
rt28600: skip channel 10, could not find extension channel
rt28600: skip channel 11, could not find extension channel
rt28600: skip channel 12, could not find extension channel
rt28600: skip channel 13, could not find extension channel
rt28600: skip channel 14, could not find extension channel
rt28600: [ITHREAD]
wlan0: Ethernet address: 00:22:43:42:25:27
rt28600: initializing
rt28600: loading 8051 microcode
rt28600: 8051 microcode was successfully loaded
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
and I started to scan
It can list th APs
# ifconfig wlan0 up list scan
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
NCTU-Wireless 00:0b:86:9c:31:80 1 11M -143:-95 60 ES
0 00:02:6f:22:00:ae 1 54M -137:-95 100 ES
NCTU_NOD lab 00:22:b0:94:c8:f7 6 54M -138:-95 100 ES MESHCONF MESHCON
F WPS HTCAP WME
Kan Cheng T... 00:23:6c:8d:f5:97 11 54M -136:-95 100 E HTCAP WME
y955188 00:1f:1f:47:c0:64 11 54M -154:-95 100 EP MESHCONF MESHCON
F HTCAP RSN WME
NCTU-HOT-1-G 00:90:4b:bd:f4:30 11 54M -141:-95 100 ES
NCTU-HOT-1-A 00:90:4b:bd:f4:40 13 54M -142:-95 100 ES
ndlit 00:12:7f:ca:f0:a0 4 54M -138:-95 100 ES
ndl-ap2 00:1f:9e:c0:19:c0 8 54M -138:-95 100 EPS WME
Personal 00:24:8c:ec:20:dc 1 54M -145:-95 100 EPS RSN
guest 00:12:7f:ca:f3:a0 10 54M -137:-95 100 ES
NCTU-Wireless 00:0b:86:9c:4b:30 11 11M -138:-95 60 ES
but wlan0 still no carrier
# ifconfig
...
rt28600: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:22:43:42:25:27
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:22:43:42:25:27
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid NCTU-Wireless channel 5 (2432 Mhz 11g)
country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5
protmode CTS wme burst bintval 0
Sorry, this is my first time using wireless lan on freebsd...
Hm, did you modified your rc.conf as i said and of cause you need to configure your wpa_supplicant. Did you do this ?
PS: you can write to my ICQ account and i can help you faster.
kvchung
December 6th, 2009, 16:04
Not yet configure my wpa_supplicant,
I'm going to try it
lme@
December 7th, 2009, 16:50
Just one suggestion:
Could you please re-name the driver?
It is really odd to have device names with more that one digit at the end...
egorenar
December 7th, 2009, 19:51
I have started to port my rt2870 device driver to FreeBSD 8.
I think in 2 days you can test the first working version.
:e :e :e
gnoma
December 8th, 2009, 15:51
OK Then I guess I have to upgrade to BSD 8 :)
But still wondering about the Access point mode of your driver?
Is it supporter or for now you are just makeing it for client modes?
egorenar
December 9th, 2009, 08:16
OK Then I guess I have to upgrade to BSD 8 :)
But still wondering about the Access point mode of your driver?
Is it supporter or for now you are just makeing it for client modes?
Don't worry, i will support both FreeBSD 7.2 and FreeBSD 8.
FreeBSD 8 version of rt2860 device driver is not better than
FreeBSD 7.2 version of the driver. But FreeBSD 8 supoorts VAPs
and rt2860 chip supports 8 VAPs in hardware, so if you want to
use the newest 802.11 stack features then upgrade to FreeBSD 8.
:-)
And yes, i will try to make AP mode working in the next days.
:e:e:e
dDMC
December 10th, 2009, 02:45
Hi,
@ egorenar I compiled your driver & can kldload it but i dont get any device in my ifconfig, dmesg shows insertion of ugen device, my usb wifi stick is Edimax EW-7711UTn. Any ideas ?
@ PseudoCylon, I compiled your drivers too, can get them to load & can see run0 device, Are you planning on adding h/w encryption ? as i'm having troubles with wpa_supplicant, i can get it working ok without encryption. I'm using PC-BSD gallileo which is 7.2 based.
The thread is hard to follow at times as it also contains posts relating to other RT chips & drivers.
But all good stuff.
PseudoCylon
December 10th, 2009, 04:48
Hi dDMC
My driver for 7.2 doesn't support any encryption. (updated on Jan 09, 2010: but, now it supports. Please see the first (http://forums.freebsd.org/showthread.php?t=7562) post for details.) Since I already upgraded to 8.0, there won't be any update on driver for 7.2. Once they upgrade PC-BSD to 8, my driver should work.
I'm still tweaking the driver for 8.0 and current. Update is coming.
egorenar
December 10th, 2009, 09:36
Hi,
@ egorenar I compiled your driver & can kldload it but i dont get any device in my ifconfig, dmesg shows insertion of ugen device, my usb wifi stick is Edimax EW-7711UTn. Any ideas ?
@ PseudoCylon, I compiled your drivers too, can get them to load & can see run0 device, Are you planning on adding h/w encryption ? as i'm having troubles with wpa_supplicant, i can get it working ok without encryption. I'm using PC-BSD gallileo which is 7.2 based.
The thread is hard to follow at times as it also contains posts relating to other RT chips & drivers.
But all good stuff.
Hi,
i need USB vendor and product IDs of your device.
So i can add them to my driver.
Try "lsusb -vv" and post here the IDs.
If you have the device (0x7392,0x7718) or (0x7392,0x7717) then you are lucky
and my driver should support it. :-)
7392:7711 means you have rt3070 chip in your device and my driver doesn't support this chip.
:e :e :e
dDMC
December 10th, 2009, 21:02
yes my chip is 0x7711 & 0x7392, so thats why i dont see anything in ifconfig :)
dDMC
December 10th, 2009, 22:24
PseudoCylon, is it still possible to run wpa_supplicant on top of the run0 interface ?
I've been trying WPA-PSK & TKIP but get a IOCTL SIOCS80211 op19 len 60 invalid argument error.
egorenar
December 11th, 2009, 00:35
Good news guys :-)
I ported the first version of rt2870 device driver to FreeBSD 8.
It is not very stable yet but hardware encryption works (WEP, TKIP, AES). I will try to make it stable and then upload it here.
:e :e :e
PseudoCylon
December 11th, 2009, 13:43
PseudoCylon, is it still possible to run wpa_supplicant on top of the run0 interface ?
I've been trying WPA-PSK & TKIP but get a IOCTL SIOCS80211 op19 len 60 invalid argument error.
That's because the driver doesn't support any encryption.
But, I have fixed the driver. It is just a band-aid fix, but it handles h/w encryption (WEP 1/2 AES/TKIP). So, wpa_supplicant should work with fixed driver, now.
Hope this is good enough while waiting for PC-BSD 8 release. One for 8 and current is solid one. If your device runs on my driver, it will most definitely run on 8's, too. No need for searching the driver.
How to use
just replace the if_run.c then compile and load.
no need to do any thing with firmware (runfw) not even unloading it if it's already loaded.
-- updated on Jan 09, 2010 --
Or go to the first (http://forums.freebsd.org/showthread.php?t=7562) post for the latest update.
egorenar
December 12th, 2009, 20:57
I promised rt2870 device driver for FreeBSD 8 and here it is.
It is quite stable now. I tested TKIP and AES hardware encryption
and QoS works fine. AP mode is still not working, trying to make it work :-)
Please send me your bug reports and feedback.
I would appreciate it. Thanks.
Currently surfing with it on FreeBSD 8 :-)
Installation:
1. Extract archive
2. run "make"
3. Load rt2870.ko module with kldload
Have fun.
:e :e :e
mathuin
December 13th, 2009, 11:22
This worked beautifully! Thank you so much! I'm looking forward to testing it over the next few days...
egorenar
December 13th, 2009, 11:35
This worked beautifully! Thank you so much! I'm looking forward to testing it over the next few days...
Yeah, please send me your feedback and bug reports.
Thanks.
:e
egorenar
December 13th, 2009, 14:12
OK Then I guess I have to upgrade to BSD 8 :)
But still wondering about the Access point mode of your driver?
Is it supporter or for now you are just makeing it for client modes?
Hi, i have good news for you. I implemented AP mode for rt2860 and rt2870 chip devices and first tests were successfull. I could associate with AP and AES works :e It is the first working version
with AP mode and i will try to test it more before i upload it here. So be patient :-)
Association, authentication and WPA handshake works !!! :-)
:e :e :e
egorenar
December 13th, 2009, 20:44
Here is the rt2870 device driver with HOSTAP mode :e
Please test it and report back any bugs and problems.
I only tested association and WPA handshake.
DHCPD works also.
First tests were very good :-)
Thanks for feedback in advance.
19.12.2009
Fixed bug in HOSTAP mode with association id == 0
I tested the driver now and it is quite stable, could download large files in HOSTAP mode :-)
:e :e :e
gnoma
December 14th, 2009, 11:28
Thank you about the driver :) I realy can't wait to see it, sounds realy good but...
# ls
@ rt2870_eeprom.h rt2870_rf.h
Makefile rt2870_io.c rt2870_rxinfo.h
bus_if.h rt2870_io.h rt2870_rxwi.h
device_if.h rt2870_led.c rt2870_softc.h
machine rt2870_led.h rt2870_txinfo.h
opt_usb.h rt2870_read_eeprom.c rt2870_txwi.h
rt2870.c rt2870_read_eeprom.h rt2870_ucode.h
rt2870.sh rt2870_reg.h usbdevs.h
rt2870_debug.h rt2870_rf.c
#
#
# make
Warning: Object directory not changed from original /usr/home/gnoma/New.Folder/rt2870_fbsd8
cc -O2 -fno-strict-aliasing -pipe -DRT2870_DEBUG -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000
--param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -mno-align-long-strings -mpreferred-stack-boundary=2
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-
prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c rt2870_io.c
In file included from rt2870_io.h:21,
from rt2870_io.c:18:
rt2870_softc.h:144: error: field 'vap' has incomplete type
rt2870_io.c: In function 'rt2870_io_vendor_req':
rt2870_io.c:383: error: storage size of 'usb_req' isn't known
rt2870_io.c:384: error: 'usb_error_t' undeclared (first use in this function)
rt2870_io.c:384: error: (Each undeclared identifier is reported only once
rt2870_io.c:384: error: for each function it appears in.)
rt2870_io.c:384: error: expected ';' before 'error'
rt2870_io.c:391: warning: left-hand operand of comma expression has no effect
rt2870_io.c:392: warning: left-hand operand of comma expression has no effect
rt2870_io.c:393: warning: left-hand operand of comma expression has no effect
rt2870_io.c:395: error: 'error' undeclared (first use in this function)
rt2870_io.c:396: warning: passing argument 1 of 'usbd_do_request_flags' from incompatible pointer type
rt2870_io.c:396: warning: passing argument 2 of 'usbd_do_request_flags' from incompatible pointer type
rt2870_io.c:396: warning: passing argument 4 of 'usbd_do_request_flags' makes integer from pointer without a cast
rt2870_io.c:396: warning: passing argument 6 of 'usbd_do_request_flags' makes integer from pointer without a cast
rt2870_io.c:396: error: too many arguments to function 'usbd_do_request_flags'
rt2870_io.c:383: warning: unused variable 'usb_req'
*** Error code 1
Stop in /usr/home/gnoma/New.Folder/rt2870_fbsd8.
#
Is this normal???
egorenar
December 14th, 2009, 11:30
Thank you about the driver :) I realy can't wait to see it, sounds realy good but...
# ls
@ rt2870_eeprom.h rt2870_rf.h
Makefile rt2870_io.c rt2870_rxinfo.h
bus_if.h rt2870_io.h rt2870_rxwi.h
device_if.h rt2870_led.c rt2870_softc.h
machine rt2870_led.h rt2870_txinfo.h
opt_usb.h rt2870_read_eeprom.c rt2870_txwi.h
rt2870.c rt2870_read_eeprom.h rt2870_ucode.h
rt2870.sh rt2870_reg.h usbdevs.h
rt2870_debug.h rt2870_rf.c
#
#
# make
Warning: Object directory not changed from original /usr/home/gnoma/New.Folder/rt2870_fbsd8
cc -O2 -fno-strict-aliasing -pipe -DRT2870_DEBUG -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000
--param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -mno-align-long-strings -mpreferred-stack-boundary=2
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-
prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c rt2870_io.c
In file included from rt2870_io.h:21,
from rt2870_io.c:18:
rt2870_softc.h:144: error: field 'vap' has incomplete type
rt2870_io.c: In function 'rt2870_io_vendor_req':
rt2870_io.c:383: error: storage size of 'usb_req' isn't known
rt2870_io.c:384: error: 'usb_error_t' undeclared (first use in this function)
rt2870_io.c:384: error: (Each undeclared identifier is reported only once
rt2870_io.c:384: error: for each function it appears in.)
rt2870_io.c:384: error: expected ';' before 'error'
rt2870_io.c:391: warning: left-hand operand of comma expression has no effect
rt2870_io.c:392: warning: left-hand operand of comma expression has no effect
rt2870_io.c:393: warning: left-hand operand of comma expression has no effect
rt2870_io.c:395: error: 'error' undeclared (first use in this function)
rt2870_io.c:396: warning: passing argument 1 of 'usbd_do_request_flags' from incompatible pointer type
rt2870_io.c:396: warning: passing argument 2 of 'usbd_do_request_flags' from incompatible pointer type
rt2870_io.c:396: warning: passing argument 4 of 'usbd_do_request_flags' makes integer from pointer without a cast
rt2870_io.c:396: warning: passing argument 6 of 'usbd_do_request_flags' makes integer from pointer without a cast
rt2870_io.c:396: error: too many arguments to function 'usbd_do_request_flags'
rt2870_io.c:383: warning: unused variable 'usb_req'
*** Error code 1
Stop in /usr/home/gnoma/New.Folder/rt2870_fbsd8.
#
Is this normal???
Do you compile on FreeBSD 7.2. Because this version is for FreeBSD 8 :-)
egorenar
December 14th, 2009, 11:31
And here is the rt2860 device driver for FreeBSD 8 with HOSTAP mode
and interrupt mitigation to improve performance :-)
Please send your feedback to me and bug reports. Thanks.
19.12.2009
Fixed bug in HOSTAP mode with association id == 0
:e :e :e
gnoma
December 14th, 2009, 11:50
Ops. I realy did it on freebsd 7.2
Sorry I don't have the time to upgrade to fbsd8 right now. May be tomorrow I'll test it.
rossgohlke
December 22nd, 2009, 21:34
I was very excited to find this thread, but I need help getting rt2870 working.
Interface: Cisco (Linksys) WUSB600N, Version 2.0 (wedge-like shape).
It was first attached to a Windows machine, with hardware encryption enabled.
OS: amd64 FreeBSD-STABLE csup'd on 2009-12-19
System: AMD Opteron 1207
Module compiles without error, but when I load the module, I get this:
%tail -f /var/log/messages
Dec 22 12:09:49 putnam root: Unknown USB device: vendor 0x1737 product 0x0079 bus uhub1
Any help would be greatly appreciated.
egorenar
December 22nd, 2009, 22:25
I was very excited to find this thread, but I need help getting rt2870 working.
Interface: Cisco (Linksys) WUSB600N, Version 2.0 (wedge-like shape).
It was first attached to a Windows machine, with hardware encryption enabled.
OS: amd64 FreeBSD-STABLE csup'd on 2009-12-19
System: AMD Opteron 1207
Module compiles without error, but when I load the module, I get this:
%tail -f /var/log/messages
Dec 22 12:09:49 putnam root: Unknown USB device: vendor 0x1737 product 0x0079 bus uhub1
Any help would be greatly appreciated.
Hm, you have new Linksys WUSB600N v2, i have tested my driver only with v1. It is easy to adjust the driver so it will also be loaded for WUSB600N v2, but i don't know if the driver will work.
But you can try it.
Edit rt2870.c and add the following line:
static const struct usb_device_id rt2870_usb_devid[] =
{
{ USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600N) }, /* Linksys WUSB600N */
+ { USB_VP(USB_VENDOR_LINKSYS4, 0x0079) }, /* Linksys WUSB600N v2 */
{ USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA140) }, /* D-Link DWA-140 */
{ USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA160AREVB) }, /* D-Link DWA-160A Rev. B */
{ USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2770F) }, /* Asus RT2770F */
};
After that, recompile the driver and post your feeback here please.
Thanks.
UPDATE
Sorry, but my rt2870 driver will not work with your NIC because WUSB600N v2
has another chipset (RT3572) :-(
See this link: http://forums.remote-exploit.org/backtrack-4-non-working-hardware/29502-rt3572-wusb600n-v2.html
rossgohlke
December 22nd, 2009, 23:55
Wow, thanks the for quick response and for the link.
Should I try ndis_wrapper?
Keep up the great work.
egorenar
December 23rd, 2009, 07:40
Wow, thanks the for quick response and for the link.
Should I try ndis_wrapper?
Keep up the great work.
i don't know about ndis but there is already a Linux driver fot this chipset on Ralink web site. I know the Linux driver for rt2870 very well and it is very similar to rt3572, but EEPROM is quite different :e I guess i could port my rt2870 driver
for rt3572, but i don't have any rt3572 hardware so i could test the driver.
PseudoCylon
December 23rd, 2009, 13:54
I have added support for WUSB600N ver.2. My driver supports some RT30XX chips to begin with.
I don't have the device with that chipset. I cannot test. It may works, or may not work at all. Try it at your own risk! Don't blame me if your device get toasted.
-- updated on Jan 09, 2010 --
Please go to the first (http://forums.freebsd.org/showthread.php?t=7562) post for the latest update.
rossgohlke
December 23rd, 2009, 15:40
I'm not able to load the if_run.
% make
Warning: Object directory not changed from original /stg/sfw/dld/run-test/sys/modules/usb/run
:> opt_usb.h
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/usbdevs2h.awk @/dev/usb/usbdevs -h
cc -O2 -pipe -funroll-loops -DWITNESS -DINVARIANT_SUPPORT -DINVARIANTS -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@
-I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -fno-omit-frame-pointer
-mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables
-ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-
prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /stg/sfw/dld/run-test/sys/modules/usb/run
/../../../dev/usb/wlan/if_run.c
ld -d -warn-common -r -d -o if_run.ko if_run.o
:> export_syms
awk -f /sys/conf/kmod_syms.awk if_run.ko export_syms | xargs -J% objcopy % if_run.ko
objcopy --strip-debug if_run.ko
# make install
install -o root -g wheel -m 555 if_run.ko /boot/kernel
kldxref /boot/kernel
# kldload if_run
kldload: can't load if_run: Exec format error
Also, README needs small edit:
- %cd sys/modules/usb/runfw
+ %cd sys/modules/runfw
Any ideas? I have a custom kernel installed, as well as ccache. I also tried this make command:
#env -i make -j8 -DALWAYS_CHECK_MAKE -DNOCCACHE KERNCONF=TUNED
rossgohlke
December 23rd, 2009, 15:52
A ha! I changed Makefile
-CFLAGS += -DWITNESS -DINVARIANT_SUPPORT -DINVARIANTS
+#CFLAGS += -DWITNESS -DINVARIANT_SUPPORT -DINVARIANTS
#kldload if_run
1) After created wlan device, please run
#ifconfig wlan0 country
with proper country code, before doing anything.
This gives me pause. I'm going to man ifconfig first...
rossgohlke
December 23rd, 2009, 16:05
It loaded!
#kldload if_run
#ifconfig
run0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:25:9c:0a:77:90
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
#ifconfig wlan create wlandev run0
#ifconfig wlan0 list countries
#ifconfig wlan0 country US
#ifconfig
run0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:25:9c:0a:77:90
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:25:9c:0a:77:90
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 1 (2412 Mhz 11b)
regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7
scanvalid 60 wme bintval 0
README should be updated with first command.
#ifconfig wlan create wlandev run0
Now, to configure it...
Thanks for all the help!
DutchDaemon
December 23rd, 2009, 19:59
rossgohike, please use proper posting tags:
http://forums.freebsd.org/showthread.php?t=8816
PseudoCylon
December 24th, 2009, 04:28
Is it working now? Let me know how the driver doing.
I guess I have to update README file, too.
Thanks for taking risks (oops testing the driver).
GeorgeMitchell
December 26th, 2009, 01:48
I have added support for WUSB600N ver.2. My driver supports some RT30XX chips to begin with.
I don't have the device with that chipset. I cannot test. It may works, or may not work at all. Try it at your own risk! Don't blame me if your device get toasted.
1. I'm running with a GENERIC kernel, so I had to change the definition of RUN_LOCK_ASSERT to the empty string.
2. After plugging in my Zonet ZEW2500P (04), my log said:
Dec 25 19:28:16 milk kernel: ugen2.2: <Ralink> at usbus2
Dec 25 19:28:16 milk kernel: run0: <.0> on usbus2
Dec 25 19:28:16 milk kernel: run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO
1T1R), address 00:a1:b0:c0:25:e8
Dec 25 19:28:16 milk kernel: run0: You are using firmware RT2870.
3. When I typed "ifconfig run0 country US", I got:
ifconfig: unable to get regulatory domain info: Invalid argument
4. When I typed "ifconfig run0 up", the system immediately crashed. The crash summary is at:
http://www.m5p.com/~george/core.txt.0
What do you suggest I do next? (And thanks for all the work!)
PseudoCylon
December 26th, 2009, 06:34
You need to create wlan0, first.
After kldload if_run, do
ifconfig wlan create wlandev run0
ifconfig wlan0 country US
ifconfig wlan0 up
Once you create wlan0, use wlan0 instead of run0. This is new for 8.0.
I definitely need to update README, after holidays.
Merry Christmas.
joel@
December 29th, 2009, 14:51
Making this one sticky.
TheBiggestGnome
December 30th, 2009, 08:59
Hm, did you modified your rc.conf as i said and of cause you need to configure your wpa_supplicant. Did you do this ?
PS: you can write to my ICQ account and i can help you faster.
I am having a similar issue. I have edited rd.conf as you said with:
wlans_rt28600="wlan0"
ifconfig_wlan0="ssid KretNet WPA DHCP"
and have also used your supplied config as well [ifconfig_wlan0="WPA DHCP" with the same results.
when I restart netif, I get the errors:
wlan0: Ethernet address: 00:1e:e5:e8:d5:4f
ifconfig: DHCP: bad vaule
rt28600 initializing
/etc/rc.d/wpa_supplicant: Warning: /etc/wpa_supplicant.conf is not readable
/etc/rc.d/wpa_supplicant: Warning:failed precmd routine for wpa_supplicant
Starting Network lo0
lo0 flags=8049(UP,LOOPBACK,RUNNING,MULTICAST) metric 0 mtu 16384
options=3(RXCSUM,TXCSUM)
inet6 fe80::1%1o0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
You'll have to excuse any silly errors as I'm still pretty new to FreeBSD
egorenar
December 30th, 2009, 10:03
I am having a similar issue. I have edited rd.conf as you said with:
wlans_rt28600="wlan0"
ifconfig_wlan0="ssid KretNet WPA DHCP"
and have also used your supplied config as well [ifconfig_wlan0="WPA DHCP" with the same results.
when I restart netif, I get the errors:
wlan0: Ethernet address: 00:1e:e5:e8:d5:4f
ifconfig: DHCP: bad vaule
rt28600 initializing
/etc/rc.d/wpa_supplicant: Warning: /etc/wpa_supplicant.conf is not readable
/etc/rc.d/wpa_supplicant: Warning:failed precmd routine for wpa_supplicant
Starting Network lo0
lo0 flags=8049(UP,LOOPBACK,RUNNING,MULTICAST) metric 0 mtu 16384
options=3(RXCSUM,TXCSUM)
inet6 fe80::1%1o0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
You'll have to excuse any silly errors as I'm still pretty new to FreeBSD
Hi,
you also have to configure WPA supplicant properly.
What looks your /etc/wpa_supplicant.conf like ?
lme@
December 30th, 2009, 11:56
I think you cannot mix "ssid foo" and "WPA". You define the ssid and the wpa key in /etc/wpa_supplicant.conf and the supplicant takes care of connecting to the right network.
TheBiggestGnome
December 30th, 2009, 17:49
Hi,
you also have to configure WPA supplicant properly.
What looks your /etc/wpa_supplicant.conf like ?
because I have to manually type out anything from the other pc, what exactly are you looking for?
I'll provide you with the first few lines:
#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/wpa_supplicant,v 1.6.2.2.2.1 2009/10/25 01:10:29 kensmith Exp$
#
# PROVIDE: wpa_supplicant
# REQUIRE: mountcritremote
# KEYWORD: nojail nostart
. /etc/rc.subr
. /etc/network.subr
name="wpa_supplicant"
rcvar=
ifn="$2"
egorenar
December 30th, 2009, 20:58
because I have to manually type out anything from the other pc, what exactly are you looking for?
I'll provide you with the first few lines:
#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/wpa_supplicant,v 1.6.2.2.2.1 2009/10/25 01:10:29 kensmith Exp$
#
# PROVIDE: wpa_supplicant
# REQUIRE: mountcritremote
# KEYWORD: nojail nostart
. /etc/rc.subr
. /etc/network.subr
name="wpa_supplicant"
rcvar=
ifn="$2"
I assume you want to use WPA or WPA2 with your NIC :-)
You have to edit /etc/wpa_supplicant.conf.
Here is an example of /etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="my_network"
proto=RSN WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="secret_password"
}
Change ssid "my_network" to your network ssid and
psk "secret_password" to your password.
Then restart netif as root with
# /etc/rc.d/netif restart
See also this link:
http://www.freebsd.org/doc/en/books/handbook/network-wireless.html
TheBiggestGnome
December 30th, 2009, 21:05
I assume you want to use WPA or WPA2 with your NIC :-)
You have to edit /etc/wpa_supplicant.conf.
Here is an example of /etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="my_network"
proto=RSN WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="secret_password"
}
Change ssid "my_network" to your network ssid and
psk "secret_password" to your password.
Then restart netif as root with
# /etc/rc.d/netif restart
See also this link:
http://www.freebsd.org/doc/en/books/handbook/network-wireless.html
and if its just an open network without any kind of security, do i need to add all of the WPA/TKIP stuff?
I'll see what I can find in the handbook, as well
TheBiggestGnome
December 30th, 2009, 21:31
Apparently, you cen't edit until one has so many posts under their belt.
So, I don't need to configure WPA, because well, I don't use it. I have edited rc.conf to reflect that:
ifconfig_wlan0="ssid NETWORK_HERE DHCP"
Now the only issue I have is:
Status: no carrier
egorenar
December 30th, 2009, 22:34
No security at all, it is not a good idea :-)
What NIC do you have ?
And what says ifconfig ?
TheBiggestGnome
December 30th, 2009, 22:43
the WMP600N, with your rt28600 loaded, hopefully correct
# ifconfig
.....
rt28600: flags=8843(UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST) metric 0 MTU 2290
ether 00:1E:E5:E8:D5:4F
media: IEEE 802.11 Wireless Ethernet autoselect mode 11a
status: associated
wlan0: flags=8843(UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST) METRIC 0 MTU 1500
ether: 00:1e:e5:e8:d5:4f
media IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid KretNet channel 132 (5660 Mhz 11a)
country US authmode OPEN privacy OFF txpower 0 bmiss 7 mcastrate 6
mgmtrate 6 scanvaild 60 wme burst bintval 0
egorenar
December 30th, 2009, 22:52
You can also use wpa_supplicant with a network without securiry.
Example:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="my_network"
key_mgmt=NONE
}
Try this config, it should work. I don't know how to associate with
a network without WPA supplicant.
But it is not a good idea to use no security.
WMP600N supports WPA2-AES in hardware and my driver works well with it.
I have the same NIC and it works fine with WPA2.
But it is of course your decision :-)
TheBiggestGnome
December 30th, 2009, 23:16
You can also use wpa_supplicant with a network without securiry.
Example:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="my_network"
key_mgmt=NONE
}
Try this config, it should work. I don't know how to associate with
a network without WPA supplicant.
But it is not a good idea to use no security.
WMP600N supports WPA2-AES in hardware and my driver works well with it.
I have the same NIC and it works fine with WPA2.
But it is of course your decision :-)
Alright, after /etc/rc.d/netif restart:
rt28600: flags=8802<BROADCAST,SIMPLEX,MULTICAST) metric 0 mtu 2290
ether 00:1e:e5:e8:d5:4f
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ifconfig: interface wlan0 does not exist
wlan0: Ethernet address: 00:1e:e5:e8:d5:4f
Starting wpa_supplicant
Starting Network lo0
.....
[root@~/rt2860_fbsd8]# Dec 30 16:05:05 wpa_supplicant[3785]: Failed to initialize control interface '/var/run/wpa_supplicant'. You may have
another wpa_suplicant process already running or the file left by an unclean termination of wpa_supplicant in which case you will need to
manually remove this file before starting wpa_supplicant again.
Dec 30 16:05:05 wpa_supplicant[3785] Failed to disable WPA in the driver
rt28600 initializing
egorenar
December 30th, 2009, 23:20
Alright, after /etc/rc.d/netif restart:
rt28600: flags=8802<BROADCAST,SIMPLEX,MULTICAST) metric 0 mtu 2290
ether 00:1e:e5:e8:d5:4f
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ifconfig: interface wlan0 does not exist
wlan0: Ethernet address: 00:1e:e5:e8:d5:4f
Starting wpa_supplicant
Starting Network lo0
.....
[root@~/rt2860_fbsd8]# Dec 30 16:05:05 wpa_supplicant[3785]: Failed to initialize control interface '/var/run/wpa_supplicant'. You may have
another wpa_suplicant process already running or the file left by an unclean termination of wpa_supplicant in which case you will need to
manually remove this file before starting wpa_supplicant again.
Dec 30 16:05:05 wpa_supplicant[3785] Failed to disable WPA in the driver
rt28600 initializing
These log messages are OK, but you didn't post the complete log.
What says ifconfig now ?
TheBiggestGnome
December 30th, 2009, 23:24
WOOOOOOOOO!
YAY! IT WORKS!
Thank you so much!
Now, this will connect every time the system boots, correct?
egorenar
December 30th, 2009, 23:28
WOOOOOOOOO!
YAY! IT WORKS!
Thank you so much!
Now, this will connect every time the system boots, correct?
You are welcome. Please send me back bug and problem reports.
Thanks.
It should connect at the system boot if you add the following
line to rc.conf:
rt2860_wlans="wlan0"
ifconfig_wlan0="WPA DHCP"
And you should also copy rt2860.ko module to /boot/kernel/
and add the following line to /boot/loader.conf:
rt2860_load="YES"
gnoma
December 31st, 2009, 12:40
So what's up with the WMP600n driver for 7.2?
Any news? :)
Thanks and happy new year to all!
egorenar
December 31st, 2009, 12:45
So what's up with the WMP600n driver for 7.2?
Any news? :)
Thanks and happy new year to all!
Hi,
follow this link and there you will find the driver with AP mode for FreeBSD 7.2:
http://forums.freebsd.org/showthread.php?t=7010&page=3
:e :e :e
greyulv
January 2nd, 2010, 12:53
Hello, egorenar. Does the 7.2 version of your driver work for 7.2 stable under PC-BSD 7.1.1?
Following the thread 7562
greyulv
January 2nd, 2010, 13:08
Now following link for post 129.
gnoma
January 5th, 2010, 22:01
egorenar
I've just installed rt2860 on freebsd7.2.
It worked good and I did that in /boot/loader.conf
rt2860_load="YES"
and in /etc/rc.conf
ifconfig_rt28600="inet 192.168.1.2 netmask 255.255.255.0 ssid example mode 11g mediaopt hostap"
and I copy the rt2860.ko file in /boot/kernel/
and when I reboot...
login: rt28600: Tx watchdog timeout: resetting
rt28600: stopping
and it stands on pause, no keyboard respons. I can't ivent login.
I reboot 2-3 times and then I removed the card from the PCI slot so I can run the machine. I don't know if I wrong something becos I also have a LAN card on 192.168.1.1(natd enable) could it be a problem?
Thancks and have verry happy and successful 2010 year and keep up the good work :)
egorenar
January 6th, 2010, 10:05
egorenar
I've just installed rt2860 on freebsd7.2.
It worked good and I did that in /boot/loader.conf
rt2860_load="YES"
and in /etc/rc.conf
ifconfig_rt28600="inet 192.168.1.2 netmask 255.255.255.0 ssid example mode 11g mediaopt hostap"
and I copy the rt2860.ko file in /boot/kernel/
and when I reboot...
login: rt28600: Tx watchdog timeout: resetting
rt28600: stopping
and it stands on pause, no keyboard respons. I can't ivent login.
I reboot 2-3 times and then I removed the card from the PCI slot so I can run the machine. I don't know if I wrong something becos I also have a LAN card on 192.168.1.1(natd enable) could it be a problem?
Thancks and have verry happy and successful 2010 year and keep up the good work :)
Thanks for feedback.
I didn't test loading the driver at boot time.
I will see what i can do.
:e :e :e
egorenar
January 6th, 2010, 15:42
egorenar
I've just installed rt2860 on freebsd7.2.
It worked good and I did that in /boot/loader.conf
rt2860_load="YES"
and in /etc/rc.conf
ifconfig_rt28600="inet 192.168.1.2 netmask 255.255.255.0 ssid example mode 11g mediaopt hostap"
and I copy the rt2860.ko file in /boot/kernel/
and when I reboot...
login: rt28600: Tx watchdog timeout: resetting
rt28600: stopping
and it stands on pause, no keyboard respons. I can't ivent login.
I reboot 2-3 times and then I removed the card from the PCI slot so I can run the machine. I don't know if I wrong something becos I also have a LAN card on 192.168.1.1(natd enable) could it be a problem?
Thancks and have verry happy and successful 2010 year and keep up the good work :)
I fixed the bug :e
Please test again.
Here is the new version:
http://forums.freebsd.org/showthread.php?p=55365#post55365
GeorgeMitchell
January 7th, 2010, 01:33
You need to create wlan0, first.
After kldload if_run, do
ifconfig wlan create wlandev run0
ifconfig wlan0 country US
ifconfig wlan0 up
Once you create wlan0, use wlan0 instead of run0. This is new for 8.0.
I definitely need to update README, after holidays.
Merry Christmas.
Thanks again! I was delighted to discover that this even works in hostap and station mode, as long as I don't try to encrypt. Once I enable hostapd and wpa_supplicant, the station no longer associated with the hostap, and the hostap says, "run0: device timeout" about as often (I assume) as the station tries to scan for it. Any suggestions? (This is with two rt3070s.)
PseudoCylon
January 7th, 2010, 08:11
That's because support for hostap mode is still work-in-progress.
When chipset sends beacons it behave badly. Currently, I'm looking into Ralink's source code and trying to find some solutions.
Actually, rt2xxx and rt3xxx chips are very similar but not exactly the same. The driver might work fine with rt2xxx chipset, but hostap mode on rt3xxx looks grim so far. But, see what I can find out. (NB: A FreeBSD newbie is writing a driver without any datasheet. It will take a while.)
gnoma
January 7th, 2010, 08:57
egorenar
I've just installed rt2860 on freebsd7.2.
It worked good and I did that in /boot/loader.conf
Code:
rt2860_load="YES"and in /etc/rc.conf
Code:
ifconfig_rt28600="inet 192.168.1.2 netmask 255.255.255.0 ssid example mode 11g mediaopt hostap"and I copy the rt2860.ko file in /boot/kernel/
and when I reboot...
Code:
login: rt28600: Tx watchdog timeout: resetting
rt28600: stoppingand it stands on pause, no keyboard respons. I can't ivent login.
I reboot 2-3 times and then I removed the card from the PCI slot so I can run the machine. I don't know if I wrong something becos I also have a LAN card on 192.168.1.1(natd enable) could it be a problem?
Thancks and have verry happy and successful 2010 year and keep up the good work
egorenar
The same thing keep showing with the new driver :(
I am using WMP600N if it matters to you and my MB is a little older so I it works with ACPI disabled. Any ideas?
egorenar
January 7th, 2010, 11:10
egorenar
The same thing keep showing with the new driver :(
I am using WMP600N if it matters to you and my MB is a little older so I it works with ACPI disabled. Any ideas?
I could reproduce this problem now. I'm trying to find a solution.
Thanks for feedback. It seems i found another bug yesterday :e
egorenar
January 7th, 2010, 12:35
egorenar
The same thing keep showing with the new driver :(
I am using WMP600N if it matters to you and my MB is a little older so I it works with ACPI disabled. Any ideas?
Please test the driver again. Thanks for feedback, it is important for me. :-)
gnoma
January 7th, 2010, 13:18
It still does the same thing on system start.
Delete the old archive end unarchived dir, delete the old rtl2860.ko file in /boot/kernel, extract the archive again, run "make" and copy the rt2860.ko in /boot/kernel, (I didn't load it becos the card is removed from the slot so I can start the machine normaly)then shutdown, place the card and start.
login: ro rt28600: Tx watchdog timeout: resetting
rt28600: stopping
I didn't touch the x.conf files.
May be I miss something, may be the problem is there???
/boot/loader.conf:
rt2860_load="YES"and in /etc/rc.conf
/etc/rc.conf:
ifconfig_rt28600="inet 192.168.1.2 netmask 255.255.255.0 ssid example mode 11g mediaopt hostap"
egorenar
January 7th, 2010, 13:34
It still does the same thing on system start.
Delete the old archive end unarchived dir, delete the old rel2860.ko file in /boot/kernel, extract the archive again, make and copy the rt2860.ko in /boot/kernel. I didn't touch the x.conf files.
May be I miss something, may be the problem is there???
/boot/loader.conf:
rt2860_load="YES"and in /etc/rc.conf
/etc/rc.conf:
ifconfig_rt28600="inet 192.168.1.2 netmask 255.255.255.0 ssid example mode 11g mediaopt hostap"
I only tested it manually. I loaded the driver, configured the interface and started hostapd. And it worked.
What system do you have ?
egorenar
January 7th, 2010, 13:45
It still does the same thing on system start.
Delete the old archive end unarchived dir, delete the old rtl2860.ko file in /boot/kernel, extract the archive again, run "make" and copy the rt2860.ko in /boot/kernel, (I didn't load it becos the card is removed from the slot so I can start the machine normaly)then shutdown, place the card and start.
login: ro rt28600: Tx watchdog timeout: resetting
rt28600: stopping
I didn't touch the x.conf files.
May be I miss something, may be the problem is there???
/boot/loader.conf:
rt2860_load="YES"and in /etc/rc.conf
/etc/rc.conf:
ifconfig_rt28600="inet 192.168.1.2 netmask 255.255.255.0 ssid example mode 11g mediaopt hostap"
Yes, you are right, the problem is still there. Strange.
If i load the driver manually and configure it then it works fine. But if the driver is autoloaded at boot time then the problem is there. I will try to find a solution for this problem.
Did you try to configure the NIC manually ?
gnoma
January 7th, 2010, 13:55
I did only with the first driver becos after that I couldn't start the PC with the card in the slot, and it worked fine. If u want I can comment that line in /boot/loader.conf and then start and see if the problem is during setting the interface from /etc/rc.conf or the problem is during boot and driver loading and check if loaded driver on boot works with manual ifconfig-ing.
egorenar
January 7th, 2010, 16:20
I did only with the first driver becos after that I couldn't start the PC with the card in the slot, and it worked fine. If u want I can comment that line in /boot/loader.conf and then start and see if the problem is during setting the interface from /etc/rc.conf or the problem is during boot and driver loading and check if loaded driver on boot works with manual ifconfig-ing.
I tested the rt2860 driver in AP mode on FreeBSD 8 and it works fine,
it doesn't matter if you configure it manually or the driver
is loaded automatically at boot time. But on FreeBSD 7.2 it only works if you configure it manually. I will try to fix it but i don't know when.
:e :e :e
gnoma
January 7th, 2010, 17:26
Well okay then it is not a problem to configure it manualy :) the driver is still great :P thank you
Dein
January 7th, 2010, 18:19
Thank you Egorenar for your greate WORK.
Which magic words should be used to setup Dlink DWA-140 (rt2870) in 802.11n hostap mode? Now it works perfectly in 11g/11b mode.
home/Dein/>uname -a
FreeBSD qbic.home 8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1
The driver is great.
egorenar
January 7th, 2010, 19:16
Thank you Egorenar for your greate WORK.
Which magic words should be used to setup Dlink DWA-140 (rt2870) in 802.11n hostap mode? Now it works perfectly in 11g/11b mode.
home/Dein/>uname -a
FreeBSD qbic.home 8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1
The driver is great.
Sorry, but 802.11n mode is still work in progress :e
Are you using your NIC in HOSTAP mode ?
Dein
January 7th, 2010, 19:38
Sorry, but 802.11n mode is still work in progress
Are you using your NIC in HOSTAP mode ?
Only in the test zone :) In production zone still using h/w access point.
egorenar
January 8th, 2010, 13:30
Only in the test zone :) In production zone still using h/w access point.
And please do not forget to send me feedback and bug reports.
It is importnat for me so i could improve the driver.
:e :e :e
Dein
January 8th, 2010, 19:32
It looks like I found some crash scenario.
1. Config:
HostAP mode 11g
hostap.conf
hw_mode=g
interface=wlan0
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=3
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
#### IEEE 802.11 related config ####
ssid=freebsd
macaddr_acl=0
auth_algs=1
#### IEEE 802.1X related config ####
ieee8021x=0
#### WPA/IEEE 802.11i config #####
wpa=3
wpa_passphrase=11111111
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
2. Notebook (asus eee) connected via wifi from Windows Home to freebsd. Signal level fine. Starting
3. Go far from AP till signal lost.
4. Returning to coverage...
5. Freebsd crashed with:
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
Sleeping thread (tid 100053, pid 0) owns a non-sleepable lock
panic: sleeping thread
cpuid = 0
P.S. mmm do you have any bugtracking system like JIRA or bugzilla?
egorenar
January 8th, 2010, 20:13
It looks like I found some crash scenario.
1. Config:
HostAP mode 11g
hostap.conf
hw_mode=g
interface=wlan0
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=3
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
#### IEEE 802.11 related config ####
ssid=freebsd
macaddr_acl=0
auth_algs=1
#### IEEE 802.1X related config ####
ieee8021x=0
#### WPA/IEEE 802.11i config #####
wpa=3
wpa_passphrase=11111111
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
2. Notebook (asus eee) connected via wifi from Windows Home to freebsd. Signal level fine. Starting
3. Go far from AP till signal lost.
4. Returning to coverage...
5. Freebsd crashed with:
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
Sleeping thread (tid 100053, pid 0) owns a non-sleepable lock
panic: sleeping thread
cpuid = 0
P.S. mmm do you have any bugtracking system like JIRA or bugzilla?
Does it happen every time you do it ?
Crash dump would be most useful for me. Did your system save
the crash dump ? Unfortunately, i cannot test this scenario by myself because i have only one PC and a hardware AP :-(
An i don't have any bugtracking system but you can send everything to my email account.
egorenar
January 9th, 2010, 15:04
It looks like I found some crash scenario.
1. Config:
HostAP mode 11g
hostap.conf
hw_mode=g
interface=wlan0
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=3
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
#### IEEE 802.11 related config ####
ssid=freebsd
macaddr_acl=0
auth_algs=1
#### IEEE 802.1X related config ####
ieee8021x=0
#### WPA/IEEE 802.11i config #####
wpa=3
wpa_passphrase=11111111
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
2. Notebook (asus eee) connected via wifi from Windows Home to freebsd. Signal level fine. Starting
3. Go far from AP till signal lost.
4. Returning to coverage...
5. Freebsd crashed with:
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
Sleeping thread (tid 100053, pid 0) owns a non-sleepable lock
panic: sleeping thread
cpuid = 0
P.S. mmm do you have any bugtracking system like JIRA or bugzilla?
I could reproduce this error by simply restarting hostapd daemon.
# /etc/rc.d/hostapd restart
I'm working now on a solution.
UPDATE
I have found a solution. Whe i'm done implementing it, i will upload the new version
of driver. The problem is LOCKING in 802.11 stack :-(
UPDATE
Bug fixed, new version here http://forums.freebsd.org/showpost.php?p=55365
:e :e :e
gnoma
January 10th, 2010, 08:54
ergorenar the driver is great, now works just fine. I tryed this scenario to go out of range and I had no problems. After manualy ifconfig ofcorse.
I tryed a heavy download, gaming, all night constant pinging and there was no problem. It works great. I guess I am to lazy do migrate on BSD8 so I can make it on boot ifconfig-ing but it is still great.
Thank you! You are the man!
egorenar
January 10th, 2010, 11:13
ergorenar the driver is great, now works just fine. I tryed this scenario to go out of range and I had no problems. After manualy ifconfig ofcorse.
I tryed a heavy download, gaming, all night constant pinging and there was no problem. It works great. I guess I am to lazy do migrate on BSD8 so I can make it on boot ifconfig-ing but it is still great.
Thank you! You are the man!
Thanks for feedback. I appreciate it.
The problem you mentoned appears only with rt2870 device driver.
And you are using rt2860 device driver.
And i'm investigating the problem with autoloading on FreeBSD 7.2
:e :e :e
joel@
January 29th, 2010, 08:27
The run(4) driver, ported from OpenBSD by PseudoCylon, has now been committed to FreeBSD 9-CURRENT.
PseudoCylon
February 14th, 2010, 08:44
There are updates on the driver for 8.0 and CURRENT. (The same driver still works on both.) The driver is posted at the first thread.
Most of updates apply to RT3572 chipset. Also, new firmware is required (included in the tarball) by this updates. Please update both driver and firmware.
And, some patches to RT30XX chipset.
Details are on RELEASE_NOTES included.
PseudoCylon
March 4th, 2010, 09:26
Supports for HOSTAP mode has been added, and it's been working for 80+ hours straight. Try it out.
As usual, you can get it at the first thread.
freenaswrls
March 7th, 2010, 19:16
does anyone know how to get this driver working with freenas?
GeorgeMitchell
March 7th, 2010, 23:52
Supports for HOSTAP mode has been added, and it's been working for 80+ hours straight. Try it out.
As usual, you can get it at the first thread (run-8.0-REL_3.tar.bz2 (http://forums.freebsd.org/attachment.php?attachmentid=776&d=1267842698))
HOSTAP mode works great! Thanks very much!
PseudoCylon
March 8th, 2010, 02:30
@freenaswrls
Sorry, not from me. I'm quite handful with CURRENT and 8.0. I only know one individual trying to make it work on pfSense. That's about it. You would be luckier if you post questions at their forums/mailing list. They are listed here
@GeorgeMitchell
High Five! Thank you for testing.
freenaswrls
March 8th, 2010, 20:09
@freenaswrls
Sorry, not from me. I'm quite handful with CURRENT and 8.0. I only know one individual trying to make it work on pfSense. That's about it. You would be luckier if you post questions at their forums/mailing list. They are listed here
okay, thanks a lot!
bsdfan
March 21st, 2010, 06:31
thanks for your work.
I got a usb rt2870 and had checked out head kernel code.
I can see run0 interface.
when I try wpa_supplicant -i run0 -c ./homewireless.conf -ddd
wpa_supplicant log shows
ioctl[SIOCG80211, op 98, len 32]: Invalid argument
wpa_driver_bsd_init: failed to get device capabilities: Invalid argument
Failed to initialize driver interface.
.....
should I upgrade wpa_supplicant? Or something else wrong?
homewireless.conf:
nework={
ssid="home"
psk="xxxxxx"
}
thanks.
PseudoCylon
March 21st, 2010, 15:12
when I try wpa_supplicant -i run0 -c ./homewireless.conf -ddd
First you need to create wlan with
ifconfig wlan create wlandev run0
Then,
wpa_supplicant -B -i wlan0 -c ./homewireless.conf
You only need to use run0 when creating wlan. Once wlan is created, use wlan0 instead of run0. i.e ifoncif wlan0 up, ifconfig wlan0 down, e.t.c. This is new to 8.0. Here are more details.
bsdfan
March 22nd, 2010, 01:19
thanks!
I figured that out too after I read document.
but with 9.0-CURRENT kernel but 8.0 release userland, not sure why wpa_supplicant got all of scan ssid "", although I can see the mac is from my ap but the ssid is empty and ifconfig can scan correctly.
I will try a full 9.0 -current.
thanks again!
PseudoCylon
March 23rd, 2010, 02:12
but with 9.0-CURRENT kernel but 8.0 release userland, not sure why wpa_supplicant got all of scan ssid "", although I can see the mac is from my ap but the ssid is empty and ifconfig can scan correctly.
You've might already swiched to CURRENT, but are you saying
ifconfig wlan0 list scan
shows correct SSID on CURRENT, but all empty SSID on 8.0? (Though, you get correct BSSID on both, CURRENT and 8.0.)
bsdfan
March 24th, 2010, 15:05
No.
Actually I compiled head kernel source on 8.0 release so I had 9.0-current kernel on 8.0 release userland.
"ifconfig wlan0 list scan" does show correct essid but the scan results from wpa_supplicant didn't(many empty ssids) so I thought it must be something changed in 802.11 stack but wpa_supplicant didn't follow yet.
then I downloaded 9.0-current iso(it was compiled in feb.2010) and install it, update kernel source to head and recompile kernel(it will have your run support), now wpa_supplicant can show ssid correctly.
now it can work with wpa_supplicant on 9.0-current although there are other filesystem bugs with 9.0-current so I have to go back to 8.0 and recompile world!
thank you very much!
bsdfan
March 25th, 2010, 21:49
It seems that there is a problem with 5G, 2.4G seems ok. When I scan a 5.765G(chan 153), it can't find it and it takes many times to find once but it seems Linux can easily find it.
thanks
PseudoCylon
March 26th, 2010, 05:39
First, 11n support hasn't been added, yet. But...
You can speed up scanning process on 5G channels with
ifconfig wlan0 outdoor
This will limit scanning on channels 149 and above. Due to regulatory constraints, this might not work, i.e. in US. Then, set mode to 11a
ifconfig wlan0 mode 11a
This will skip scanning on b/g channels. Otherwise, it scans from channel 1. With "outdoor" option, device will scan + assoc (with 11a + chan 153 AP) in a few second.
bsdfan
March 27th, 2010, 03:53
thanks for reply.
can I know what is necessary for 11n?
>Due to regulatory constraints, this might not work, i.e. in US. Then, set mode to 11a
Is this limited by the hardware? I enabled the debug info from linux driver and I see country code is in eeprom's parameter.
good to know the "mode 11a"
PseudoCylon
March 27th, 2010, 10:36
can I know what is necessary for 11n?
To be quick, make list of channels and tell h/w to use it and to behave as 11n device.
Is this limited by the hardware? I enabled the debug info from linux driver and I see country code is in eeprom's parameter.
No. It is limited by s/w. Those ifconfig options are little cheats to finish scan quicker. So, the device can find chan 153 quicker. (Without any cheat, scanning all available channels (1 to 173) should be finished within 10 sec.)
bsdfan
March 31st, 2010, 15:15
I found some bugs in registers setting and I will post later after I verified.
PseudoCylon
April 1st, 2010, 11:53
Thanks. I'm looking forward to having a patch.
I have found some bugs, too. Check the repository (http://dev.nasreddine.com/gitweb/?p=run.git;a=summary), just in case.
bsdfan
April 1st, 2010, 17:45
Thanks. I'm looking forward to having a patch.
I have found some bugs, too. Check the repository (http://dev.nasreddine.com/gitweb/?p=run.git;a=summary), just in case.
thanks!
one question is why you change it from 8 to 10? according to Linux 2870 driver, pAd->EEPROMDefaultValue[0-18], first 3 is nic1,2, country region, but in LInux driver code it only read 8 uint16t from eeprom, and the left 8 will be 0.
so what is the real number of bbps setting?
/* read vender BBP settings */
1395 for (i = 0; i < 10; i++) {
1396 run_srom_read(sc, RT2860_EEPROM_BBP_BASE + i, &val);
1397 sc->bbp[i].val = val & 0xff;
1398 sc->bbp[i].reg = val >> 8;
1399 DPRINTF("BBP%d=0x%02x\n", sc->bbp[i].reg, sc->bbp[i].val)
thanks,
PseudoCylon
April 2nd, 2010, 07:34
one question is why you change it from 8 to 10? according to Linux 2870 driver, pAd->EEPROMDefaultValue[0-18], first 3 is nic1,2, country region, but in LInux driver code it only read 8 uint16t from eeprom, and the left 8 will be 0.
so what is the real number of bbps setting?Short answer is 19.
There are 19 short values to read.pAd->EEPROMDefaultValue[0-18][0-18] means 19 slots. My driver and linux driver agree with it.
My code reads word at a time, so I need to loop 10 times. (Looping 9½ times won't work.)
Linux driver should look likepAd->EEPROMDefaultValue[0] = nic1;
pAd->EEPROMDefaultValue[1] = nic2;
pAd->EEPROMDefaultValue[2] = country;
for(i = 0; i < 8; i++){
read_eeprom16(aAd, EEPROM_BBP_BASE + i*2, tmp);
pAd->EEPROMDefaultValue[i + 3] = tmp;
}reads first 3 bytes and then loop 8 times to read 4th to 19th byte. (3 + word x 8 = 19 bytes)
g_willikers
April 8th, 2010, 22:45
-- 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 (http://forums.freebsd.org/showpost.php?p=44278&postcount=3)
Here are the latest releases of drivers. (last update Mar 04, 2010)
for CURRENT users
As joel@ has announced for me, the driver has been committed (r203134). All you have to do is to synchronize your source (http://www.freebsd.org/doc/en/books/handbook/synching.html). (for the latest release, check out my git repository, see below)
for 8.0 users run-8.0-REL_3.tar.bz2 (http://forums.freebsd.org/attachment.php?attachmentid=776&d=1267842698) << You can click this.
Or, you can git at git://dev.nasreddine.com/run.git or http view (http://dev.nasreddine.com/gitweb/?p=run.git;a=summary) (Please fetch 'hostap_rc' branch.)
for 7.2 users 739 << 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 426, 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.cgi?query=run&apropos=0&sektion=0&manpath=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 (http://forums.freebsd.org/showpost.php?p=47936&postcount=28) (One posted here is for 7.)
-- updated on Nov. 28, 2009 --
-- FIX -- FIX -- FIX -- 500
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.
Greetings,
I have some questions about procedure in the README file in the run-8.0-REL_3.tar.bz2
archive.
First, I am dual-booting win2k3 enterprise LVE && freebsd-8. I will have no internet access
for FreeBSD until I get my ENCORE ENUWI-N3 dongle to work in FreeBSD.
The software CD that came with it installed rt2870.sys. I tried egorenar's driver
(http://forums.freebsd.org/showthread.php?p=76769). But he advised me to use the "run" driver. So here I am. :)
# uname -a
FreeBSD l400.ultimatedns.NET 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009
root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
#usbconfig dump_device_desc
ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen0.2: <802.11 n WLAN Ralink> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x203d
idProduct = 0x1480
bcdDevice = 0x0101
iManufacturer = 0x0001 <Ralink>
iProduct = 0x0002 <802.11 n WLAN>
iSerialNumber = 0x0003 <1.0>
bNumConfigurations = 0x0001
I know this may sound stupid. But being as I have to keep bouncing back-and-forth (reboting)
between windows and freebsd. I want to make sure I don't make this more difficult than
it needs to be.
According the the README:
How to use
----------
0) read Ralink license at
sys/contrib/dev/run/LICENSE
1) over write usbdevs
%cd sys/dev/usb
#cp usbdevs /usr/src/sys/dev/usb/
(or where ever your src files are)
2) make firmware
%cd sys/modules/runfw
%make
#make install
3) make driver
%cd sys/modules/usb/run
%make
#make install
4) load firmware
#kldload runfw
(Optional: Driver will load fw for you as long as fw is installed.)
5) load driver
#kldload if_run
6) create wlan (new to FreeBSD 8.0)
#ifconfig wlan create wlandev run0
#ifconfig wlan0 country XX
substitute "XX" with proper country code. The list of available
country code can be viewed by running
%ifconfig wlan0 list countries
The default country is US. So, if you live in north America region,
setting country code doesn't matter.
7) configure it for your needs, for example, "ifconfig wlan0 up",
"wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf", etc.
My copy of the archive run-8.0-REL_3.tar.bz2 has no "sys" folder in it. Yet, I assume
I need to copy (and overwrite) files located in my "sys" && "src/sys" tree - yes?
When referring to sys && src can you please reference "archive" folder vs "system" folder,
so it is real clear which one is which?
Thank you for all your time and consideration.
Thank you also, for all your hard work on this driver.
--Chris (g_willikers)
g_willikers
April 9th, 2010, 00:02
Greetings again,
It worked! :)
OK, for anyone else that may have had the same question I did;
If you replace every occurrence of:
%cd sys/...
with
%cd run/...
(assuming the root of the archive) it will all work as described.
Given that I was not able to plan for the migration to wireless, but abruptly forced to,
I'll now have to figure out how to make use of it. :)
FWIW here's the output from the two commands listed in the README, in case it helps anyone
else with this dongle:
kldload runfw
firmware: 'runfw' version 1: 8192 bytes loaded at 0xc2c9054c
#kldload if_run
run0: <1.0> on usbus0
run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address XX:XX:XX:XX:XX:XX
run0: firmware RT2870 loaded
run0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
run0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36M
bps 48Mbps 54Mbps
NOTE: XX:XX:... has been masked out
Thank you for all your hard work on this driver, PseudoCylon!
--Chris (g_willikers)
g_willikers
April 9th, 2010, 01:34
Greetings again,
Apologies for the repeated (excessive?) posts. But I'm attempting to get as much info as
possible before rebooting to freebsd, where I am not able to view these forums and
all the info in them. That said;
According to the README:
4) load firmware
#kldload runfw
(Optional: Driver will load fw for you as long as fw is installed.)
After I rebooted, the driver was not loaded (did not show up in messages during verbose boot)
Do I need to load it via /boot/loader.conf? eg; fw_load="YES"
Or do I need to create /etc/rc.conf indicators that I'm using run/wlan0 etc, where it will
then get loaded?
Speaking if rc.conf entries;
Assuming a WEP setup, would the following get the job done?
ifconfig wlan create wlan0 ssid <my_ssid> wepmode on wepkey <my_wepkey> weptxkey 1 up
and if so,
How would I best translate that to rc.conf entr(y|ies)?
Thanks again, and apologies for the niose. I'll happily post a consolidated how-to
to help others when I get this sorted out. :)
--Chris
g_willikers
April 9th, 2010, 02:31
OK
I used the following:
/boot/loader.conf
if_run_load="YES"
runfw_load="YES"
which loaded the drivers/devices
at the tty0
ifconfig wlan create wlandev run0 ssid <my_ssid> wepmode on wepkey <my_wepkey> \
weptxkey 1 up
which made my dongle start blinking. But never logged in, or assigned an address.
I'm sure I need more information for /etc/rc.conf but don't know how to address
the device. Should it be if_run0?
Sorry, but after reading a great deal of material, I'm still not quite sure of all the
answers.
Thank you for all your time and consideration.
--Chris
g_willikers
April 9th, 2010, 04:50
Greetings,
Well, I think I've been able to sort most of it out.
Adding the following to /etc/rc.conf:
wlans_run0="wlan0"
wlan_wep_load="YES"
ifconfig_wlan0="ssid <my_net> wepmode on weptxkey 1 wepkey <my_key> DHCP"
results in the following:
ifconfigrun0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether XX:XX:XX:XX:XX:XX
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether XX:XX:XX:XX:XX:XX
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid <my_net> channel 11 (2462 Mhz 11g)
country US authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit
txpower 0 bmiss 7 scanvalid 60 protmode CTS wme bintval 0
NOTE: XX:XX:... has been used to mask the ether
<my_net> is a mask for my actual network
<my_key> is a mask for my actual WEP key
channel 11 varies, as it polls all the channels. So sending another ifconfig will likely result in a different channel showing.
That said; I'm not able to link up (make a connection) - no carrier
Can anyone suggest something I'm missing?
I know WEP isn't the best choice. But until I can actually connect, WEP should at least
be the simplest (lowest denominator) choice.
FWIW this is an 802.11n dongle
Thank you for all your time and consideration.
--Chris
PseudoCylon
April 9th, 2010, 07:23
Hello,
Sorry for typo in README. I'll update it.
First, my driver doesn't support N yet. (I need more time to add it.) So, make sure your AP is compatible with G mode.
With RT3070 you need to unplug the device every time the device is brought down. And depend on the computer you are using, rebooting won't help. (shutdown and power on is OK) So, When you reboot, you might need to unplug the device. (This is RT3070 specific problem.)
To eliminate all the variables, when you reboot to FreeBSD, try
ifconfig wlan0 destroy
unplug and re-plug-in the device because /etc/rc.conf will bring it up. Also, /boot/loader.conf should load the driver. I assume the driver is loaded. So, just try,
ifconfig wlan create wlandev run0
ifconfig wlan0 ssid <my_net> wepmode on weptxkey 1
ifconfig wlan0 up
Forget about wepkey for now.
ifconfig wlan0
should say "associated" Might take 10-15 sec.wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether XX:XX:XX:XX:XX:XX
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: associated
ssid <my_net> channel 11 (2462 Mhz 11g)
country US authmode OPEN privacy ON deftxkey 1 wepkey 0-bit
txpower 0 bmiss 7 scanvalid 60 protmode CTS wme bintval 0Encryption kicks in after association. First you want to associate with an AP. When you see "associated"
ifconfig wlan0 wepkey 1:0x<my_hex_key>
dhclient wlan0
Then should see something likeDHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.0
bound to 192.168.0.1 -- renewal in 43200 seconds.
If you want to automate the loading process, wpa_supplicant with ether wep or wpa would works better. But see if manual load work for now.
g_willikers
April 9th, 2010, 09:02
Greetings PseudoCylon, and thank you very much for your informative reply.
I followed your instructions, but was unable to connect.
FWIW
/boot/loader.conf
runfw_load="YES"
if_run_load="YES"
The address in my /etc/rc.conf file is defaultrouter. which is the one assigned
by my upstream (wireless provider) - it's DHCP.
After following your instructions (before sending the wepkey), issuing ifconfig wlan0
returns:
# ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether XX:XX:XX:XX:XX:XX
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid <my_net> channel 10 (2457 Mhz 11g)
country US authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit
txpower 0 bmiss 7 scanvalid 60 protmode CTS wme bintval 0
followed by
# dhclient wlan0
wlan0: no link .............. giving up
Here's additional output
# ifconfig
xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9<RXCSUM,VLAN_MTU>
ether XX:XX:XX:XX:XX:XX
media: Ethernet autoselect (100baseTX)
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 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
run0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether XX:XX:XX:XX:XX:XX
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether XX:XX:XX:XX:XX:XX
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid <my_net> channel 6 (2437 Mhz 11g)
country US authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit
txpower 0 bmiss 7 scanvalid 60 protmode CTS wme bintval 0
I should probably note that this is on a freshly installed FreeBSD-8.0 from the CD.
As I have no access to the internet from FreeBSD, I can't install/update anything.
So if I am required to build anything, I'll need to download a package from Winblows,
and copy it to my USB memstick, then mount that in FreeBSD ... you get the picture. :)
Anyway thought that might be worth noting.
Is there anything you (or anyone else) can think of/suggest? I'd really hate
to have to make Linux - or worse, Windows, be the gateway for all of the FreeBSD servers
I have had running for years now. Please help, I beg you.
Thank you for all your time and consideration.
--Chris
PseudoCylon
April 9th, 2010, 10:49
The address in my /etc/rc.conf file is defaultrouter. which is the one assigned
by my upstream (wireless provider) - it's DHCP.So, you are trying to connect your wireless internet provider with USB dongle. Are all of setting, ssid and wep, matches what provider supplied? After
ifconfig wlan0 up (forget about all other options)
wait for 15 sec. or so. (Give device time to scan all channels.) Then, can you show me the out put of
ifconfig wlan0 list scan
There must be your provider's ssid on the list, even though you cannot connect.
If I'm misunderstanding, please tell me what you are connecting to.
Is there anything you (or anyone else) can think of/suggest? I'd really hate to have to make Linux - or worse, Windows, be the gateway for all of the FreeBSD servers I have had running for years now. Please help, I beg you.Are you trying to set up FreeBSD router? If so, it depends on how much traffic you have. There are lots of options. You don't need to worry. Just focus on make the device work, now.
g_willikers
April 9th, 2010, 11:10
So, you are trying to connect your wireless internet provider with USB dongle. Are all of setting, ssid and wep, matches what provider supplied? After
ifconfig wlan0 up (forget about all other options)
wait for 15 sec. or so. (Give device time to scan all channels.) Then, can you show me the out put of
ifconfig wlan0 list scan
There must be your provider's ssid on the list, even though you cannot connect.
If I'm misunderstanding, please tell me what you are connecting to.
Thank you very much PseudoCylon, for your reply.
Doing a ifconfig wlan0 list scan does show my upstream "hotspot".
I'll run it, and provide it's output for you.
Are you trying to set up FreeBSD router? If so, it depends on how much traffic you have. There are lots of options. You don't need to worry. Just focus on make the device work, now.
No. I'm not trying to mess with anything except to get connected by the wireless
for now. :)
I'll report back with what I get from these instructions.
Thank you again for your response, PseudoCylon.
--Chris
PS the wepkey I am using while booted to Windows is text not hex.
I use a text wepkey in FreeBSD too. Should I convert the characters to hex?
Thanks again.
g_willikers
April 9th, 2010, 11:41
Hello again PseudoCylon,
Here's what I did
ifconfig wlan0 destroy
ifconfig wlan create wlandev run0
ifconfig wlan0 ssid <my_net> wepmode on weptxkey 1
ifconfig wlan0 up
waited 2.5 minutes
ifconfig wlan0 list scan
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
<my_net> XX:XX:XX:XX:XX:XX 1 54M -14:-15 50 EP
Annie's House 00:1f:f3:01:d7:53 6 54M -52:-89 100 EPS RSN HTCAP WPA WME
SuperG 00:1d:6a:e1:1b:5f 6 54M -48:-85 100 ES WPS
CraigersPC 00:24:b2:5e:a0:73 3 54M -47:-83 100 EPS RSN WPA WME HTCAP ATH WPS
Does any of this provide clues?
Thanks for all your time and consideration.
--Chris
g_willikers
April 9th, 2010, 16:48
Hello again, PseudoCylon.
Truth be known, it may be the wepkey that's the issue. While booted to Winblows, the
configuration accepts (and is using) a pure ASCII string for the wepkey.
However, the AP - and presumably the commands I'm passing; assume I'm passing
a 104bit hex string. I may be way off here (2 days working on this w/o sleep)
but I translated the ASCII string I use to connect, into the hex counterparts, using
the hex equivalents for example the capital letter A would be 41, the
number 7 would be 37. So, if my entire wepkey was A7, I would
enter 4137 for the wepkey. However, I know that the ASCII string needs
to be a minimum of 5 characters (which I use). SO I guess my question is:
Am I converting the ASCII to HEX correctly? It doesn't seem like a long enough HEX
string to amount to 104bits.
Just thought I'd mention it.
Thanks for all your time and consideration.
--Chris
g_willikers
April 9th, 2010, 20:27
OK I generated 4 64bit keys based on the ASCII string I use as my WEP key.
I fed each of them on the cli as:
ifconfig wlan0 wepkey 1:<64bit_key#1>
ifconfig wlan0 wepkey 1:<64bit_key#2>
ifconfig wlan0 wepkey 1:<64bit_key#3>
ifconfig wlan0 wepkey 1:<64bit_key#4>
but no joy.
I even setup a /etc/wpa_supplicant.conf file with the 4 different
wep_key0= entries, and tried that, but still no luck.
Everything showed correct in ifconfig wlan0 output but the line that read
no carrier. The light on the USB dongle blinks away, but that's all. sigh...
Anyway, if you can think of anything, I'd love to hear it. :)
Thanks for all your time and consideration.
--Chris
g_willikers
April 9th, 2010, 21:49
Well, I managed to get an association through wpa_supplicant.
But it was only for a short time and it renegotiated because I was
never able to receive an address. So it threw multicast related errors
and when ifconfig wlan0 showed association, it also showed
address 0.0.0.0. :(
So I'm still trying to find a cure/lead. But haven't figured where to
find it.
Best wishes.
--Chris
g_willikers
April 9th, 2010, 22:18
Greetings again,
Am I missing something here, or is there something in the ifconfig(8) create command
that I'm (we're) missing here. For example, you indicated I issue:
ifconfig wlan create wlandev run0
For example would it make sense to use something like this in /etc/rc.conf:
wlans_run0="wep0 sta"
or would that be better created with the
ifconfig create wlandev run0 sta command
Just some thoughts, as I try to make the run driver work...
--Chris
PseudoCylon
April 10th, 2010, 02:47
I see. My driver won't work on one microsoft wy. You need to move away form it.
OK, first thing first. You might want to comment out/delete lines you added to /etc/rc.conf and forget about it for now. That's step 692. We are at step one.
First, you need to associate with AP. Otherwise, nothing works.Well, I managed to get an association through wpa_supplicant. But it was only for a short time and it renegotiated because I was never able to receive an address. So it threw multicast related errors and when ifconfig wlan0 showed association, it also showed address 0.0.0.0.This is a good thing. as long as ifconfig say "associated" it is OK. It most likely a need-to-re-plug-in issue, you couldn't associate before.
Now, wepkey. You don't need to convert ascii to hex. But, ascii key works on windows usually won't work on freebsd. You can try it, but if it won't work, you might need to get hex wep key from your provider. Also, make sure default tx key index agrees with your provider. If not, it won't work. If need to update wpa_supplicant.conf, update first and run wpa_supplicant.
Then
dhclient wlan0
wpa_supplicant won't do dhcp business.
If it won't work, please tell me,
it doesn't associate and nothing in ifconfig wlan0 list scan,
it doesn't associate but your provider is listed on list scan, or
it associates but dhclient doesn't get IP address.
These are all different issues. And what's in wpa_supplicant.conf
g_willikers
April 12th, 2010, 04:53
I see. My driver won't work on one microsoft wy. You need to move away form it.
OK Update: I took your advice and spent most of the weekend moving to 443 BSD wy.
Thank you for the advice, this is a much nicer neighborhood. I haven't
seen one Trojan, or Virus in the neighborhood - not one!
OK, first thing first. You might want to comment out/delete lines you added to /etc/rc.conf and forget about it for now. That's step 692. We are at step one.
Done
First, you need to associate with AP. Otherwise, nothing works.This is a good thing. as long as ifconfig say "associated" it is OK. It most likely a need-to-re-plug-in issue, you couldn't associate before.
OK you mentioned an issue about this early in this thread. As I understand it, if there
seems a problem I need to unplug it, then enter ifconfig wan0 destroy, then plug
the USB dongle back in - correct?
Now, wepkey. You don't need to convert ascii to hex. But, ascii key works on windows usually won't work on freebsd. You can try it, but if it won't work, you might need to get hex wep key from your provider. Also, make sure default tx key index agrees with your provider. If not, it won't work. If need to update wpa_supplicant.conf, update first and run wpa_supplicant.
I converted my ASCII wepkey via: http://www.wepkey.com/
Which produced 4 64bit keys, and a 128bit key. While I can login to my "hotspot"
(Sierra Wireless w801 (http://www.sierrawireless.com/productsandservices/AirCard/Mobile%20Hotspots.aspx)) and change the encryption type (WEP,WPA,WPA2,etc...) but WEP seems to have the least variables, and therefore the
easiest to use for testing.
So I made 4 entries in wpa_supplicant.conf using all 4 64bit keys, which should
equal my ASCII equivalent. Then I issued
# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
Which at several points indicated an association in the status field,
otherwise no carrier
Then
dhclient wlan0
wpa_supplicant won't do dhcp business.
If it won't work, please tell me,
it doesn't associate and nothing in ifconfig wlan0 list scan,
it doesn't associate but your provider is listed on list scan, or
it associates but dhclient doesn't get IP address.
These are all different issues. And what's in wpa_supplicant.conf
Thank you for your continued help, and advice PseudoCylon, I greatly appreciate it.
I'll try again w/o the /etc/rc.conf entries and report the results.
--Chris
PseudoCylon
April 12th, 2010, 08:25
I converted my ASCII wepkey via: http://www.wepkey.com/
Which produced 4 64bit keys, and a 128bit key. While I can login to my "hotspot"
(Sierra Wireless w801 (http://www.sierrawireless.com/productsandservices/AirCard/Mobile%20Hotspots.aspx)) and change the encryption type (WEP,WPA,WPA2,etc...) but WEP seems to have the least variables, and therefore the easiest to use for testing. So I made 4 entries in wpa_supplicant.conf using all 4 64bit keys, which should equal my ASCII equivalent. Then I issued # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf Which at several points indicated an association in the status field, otherwise no carrierOK. Here is the problem. You have to type in those 4 64-bit keys into your Sierra Wireless w801. Encryption isn't working because the keys in Sierra Wireless w801 and ones in wpa_supplicant.conf doesn't match. There must be fields you can type in encryption keys somewhere near you can set wep/wpa. I guess ascii key is for login to Sierra Wireless w801 not for encryption. Once both encryption keys, in Sierra Wireless w801 and wpa_supplicant.conf match, the device shall work.
When you unplug the device, wlan destroy first, then unplug and plug it back in. But, it is most likely encryption key problem.
g_willikers
April 13th, 2010, 01:16
Hello again PseudoCylon,
Here's a Thanks for your recent post. :)
I have to preface the following by stating that I've been "wired" since '75 - yes; I do mean 1975.
You could hand me a crate of BGP's, Switches, Routers, Modems, and cables, and I'd have
everything wired up, and the Networking in full working order in under 10 minutes.
Point being, I've had no need to deal with "wireless" (outside a Cell Phone). So if
it's not already painfully obvious; I'm no "expert" in this department. :r
This is not to say I haven't completely read, and become familiar with the
FreeBSD wireless documentation (http://www.freebsd.org/doc/en/books/handbook/network-wireless.html) :)
The only interface provided by the W801, is via web browser. I've become quite familiar
with it. And don't recall anything matching your description (as I understand you).
That being said, I'll look though all the possibilities available, and see if I can
find anything interesting, that might shed some light on why I'm unable to get the
desired communication with it through run0/wlan0/wpa_supplicant.
Thanks again for all your time and continued consideration.
--Chris
PseudoCylon
April 13th, 2010, 06:18
The only interface provided by the W801, is via web browser.Yes, that usually is. If you can select ecryption mode, you should be able to set keys. Otherwise, encryption is useless. It might say password, wireless password, wifi password, or something like that.that might shed some light on why I'm unable to get the desired communication with it through run0/wlan0/wpa_supplicantI'm quite sure that W801 and your computer have different keys. As long as they have mismatched keys, it won't work. Or, usually ascii wep key is a problem. It might never work. You might want to select different encryption mode or maybe no encryption for time being.
Once you change the settings, you will lose connection though windows until you re-configure. So, do it at your own discretion.
g_willikers
April 13th, 2010, 07:14
Hello PseudoCylon, and thanks for the response.
I just finished changing all the settings in the W108 to use WPA/WPA2.
Which entailed dropping the 5 character ASCII password for a 8-63 character
password. I made the new password, and restarted the Winblows networking
to test connectivity with the new setup. It works.
I created a new wpa_supplicant.conf file with all the anticipated fields
required. I created a ASCII field, and one generated with wpa_passphrase(5)
to insure this area will be fully covered. I was just about to reboot to FreeBSD,
but thought I'd check back here before I did, and found your thoughtful reply.
Thanks.
Wish me luck. :)
--Chris
PseudoCylon
April 13th, 2010, 11:22
Hope I'm replying early enough.
I created a ASCII field, and one generated with wpa_passphrase(5)
to insure this area will be fully covered.Try this simple wpa_supplicant.confnetwork={
ssid="<my_net>"
psk="<my_key>"
}<my_key> is exactly the same as you have typed into W801. No need to use wpa_passphrase
bsdfan
April 14th, 2010, 15:05
Thanks. I'm looking forward to having a patch.
I have found some bugs, too. Check the repository (http://dev.nasreddine.com/gitweb/?p=run.git;a=summary), just in case.
I have reported these to OpenBSD and it had already been committed by openbsd developer.
I saw you have merge one into FreeBSD, you will find more:)
thanks!
PseudoCylon
April 15th, 2010, 08:57
Thanks for reporting bugs. Please report if you find more.
Does your device work better now?
bsdfan
April 20th, 2010, 13:42
Yes, they work better.
thanks!
ericturgeon
September 23rd, 2010, 13:42
I am kind of lost here. I try to have my cisco syslink wusb600n to work on FreeBSD. But I didn't find the driver on all those post.
and Him new to wireless.
PseudoCylon
September 23rd, 2010, 18:15
The driver is included in 8.1-RELEASE. If you have just done standard installation,
kldload if_run
will load the driver.
If you need 11n support, the driver is posted at the first thread (http://http://forums.freebsd.org/showthread.php?t=7562).
ericturgeon
September 23rd, 2010, 18:35
The driver is included in 8.1-RELEASE. If you have just done standard installation,
kldload if_run
will load the driver.
If you need 11n support, the driver is posted at the first thread (http://http://forums.freebsd.org/showthread.php?t=7562).
Yes but how to configure it to work.
On my rc.conf.
DutchDaemon
September 23rd, 2010, 21:46
PseudoCylon, is there a man page in the works yet? I see that run is not yet available in 8.1-STABLE / 9-CURRENT as of today.
PseudoCylon
September 24th, 2010, 09:10
@ericturgeon
Yes but how to configure it to work.Nothing special. Please see this post (http://http://forums.freebsd.org/showthread.php?t=8784) and freebsd hand book (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html).
On my rc.conf.It depends how you want to set up. Basically, following 2 lines in /etc/rc.conf would do the trickwlans_run0="wlan0"
ifconfig_wlan0="DHCP"the freebsd hand book explains well.
@DutchDaemon, The moderator
PseudoCylon, is there a man page in the works yet? I see that run is not yet available in 8.1-STABLE / 9-CURRENT as of today.Actually, there is a man page in head tree
http://www.freebsd.org/cgi/cvsweb.cgi/src/share/man/man4/run.4
I don't why it isn't in 8.1 nor in online man page. Currently, installing 9-CURRENT is the only way to see the man page.
-- update Jan. 12, 2011 --
man pages have been commit to the HEAD
http://svn.freebsd.org/viewvc/base?view=revision&revision=217289
ericturgeon
September 24th, 2010, 13:15
@PseudoCylon
I have already try this in /etc/rc.conf.
wlans_run0="wlan0"
ifconfig_wlan0="DHCP"
and I have put thi in my /boot/loader.conf.
if_run_load="YES"
It doesn't work. That's why I say the Handbook don't cover my case.
ericturgeon
September 24th, 2010, 17:36
I have to put this in my /boot/loader.conf to have my wireless to work.
if_run_load="YES"
runfw_load="YES"
Problem solve.
Nollo
November 24th, 2010, 21:15
Does it support RTL8192 ?
PseudoCylon
November 25th, 2010, 02:55
Does it support RTL8192 ?Unfortunately no.
The driver supports some of Ralink chips, but RTL8192 is a Realtek chip (as far as I know).
Nollo
November 25th, 2010, 09:12
Unfortunately no.
The driver supports some of Ralink chips, but RTL8192 is a Realtek chip (as far as I know).
ah yes sorry, I posted here because someone spoke about this chipset in page 2
Dein
November 28th, 2010, 20:17
Good day PseudoCylon,
I have several questions:
1. First of all, I want to test 802.11n driver version, but all links on the first page are broken.
2. I have next difficalties with your driver under 8.1-Release and 8.2-Prerelease version when connecting to AP:
a. On AMD64 machine - "Kernel panic: fatal trap 12" without dump.
b. On x86 machine - I got connection terminated without reason or case "a".
My hostap.conf
hw_mode=g
interface=wlan0
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=3
#channel=6
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
#### IEEE 802.11 related config ####
ssid=freebsd1
macaddr_acl=0
auth_algs=1
#### IEEE 802.1X related config ####
ieee8021x=0
#### WPA/IEEE 802.11i config #####
wpa=3
wpa_passphrase=11111111
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
WBR,
Dein
PseudoCylon
December 1st, 2010, 23:51
Hi,
1. First of all, I want to test 802.11n driver version, but all links on the first page are broken.
Please try this link instead.
11n beta (http://gitorious.org/run/run/archive-tarball/11n_beta2)
It is beta because it might stall during high traffic.2. I have next difficalties with your driver under 8.1-Release and 8.2-Prerelease version when connecting to AP:
a. On AMD64 machine - "Kernel panic: fatal trap 12" without dump.
b. On x86 machine - I got connection terminated without reason or case "a".
My hostap.confCan you give me more deatil what you are doing with what commands you issue? I suppose "connecting to AP" means you are using the driver as client. Then you don't need /etc/hostapd.conf.
As far as I know, the driver causes panic when try to create the wlan without loading firmware. When failed to load firmware, it will printrun0: could not load 8051 microcodeDid you compiled firmware into kernel or loading it as a module?
okeeblow
December 14th, 2010, 23:50
runfw(4) claims:
To compile this module into the kernel, place the following line in your
kernel configuration file:
"device runfw"
This will include two firmware images, RT2870 and RT3071, inside the kernel.
But this does not seem to be a valid kernel configuration directive.
config: Error: device "runfw" is unknown
config: 1 errors
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
Unfortunately, the platform I'm building for does not use loader, so I have no other way to load it at boot.
PseudoCylon
December 15th, 2010, 03:22
config: Error: device "runfw" is unknown
config: 1 errors
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
Unfortunately, the platform I'm building for does not use loader, so I have no other way to load it at boot.
Please add following to src/sys/conf/files
runfw.c optional runfw \
compile-with "${AWK} -f $S/tools/fw_stub.awk runfw:runfw -mrunfw -c${.TARGET}" \
no-implicit-rule before-depend local \
clean "runfw.c"
runfw.fwo optional runfw \
dependency "runfw" \
compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} runfw" \
no-implicit-rule \
clean "runfw.fwo"
runfw optional runfw \
dependency "$S/contrib/dev/run/rt2870.fw.uu" \
compile-with "uudecode -o ${.TARGET} $S/contrib/dev/run/rt2870.fw.uu" \
no-obj no-implicit-rule \
clean "runfw"You can put the code anywhere, but next to the linedev/usb/wlan/if_run.c optional runwould be easier to remember in the future.
I have re-submitted all the changes. This would be committed soon.
-- update Jan. 12, 2011 --
The change has been commit to the HEAD
http://svn.freebsd.org/viewvc/base?view=revision&revision=217288
okeeblow
December 15th, 2010, 08:10
That worked, Thanks :)
I'm getting panics when I try to connect to my hostap network, though. I'll post this here unsure if it's a problem with the driver or a problem with the freebsd-arm kernel. My adapter is a TP-LINK TL-WN321G. I bought it since it was supposed to be a rum device, but the one I got is RT3070.
pochan# uname -a
FreeBSD pochan 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #9: Wed Dec 15 01:09:57 EST 2010 nicole@Emi.cooltrainer.org:/usr/obj/arm/usr/
src/sys/DOCKSTAR-COOLTRAINER arm
ugen0.5: <Ralink> at usbus0
run0: <1.0> on usbus0
run0: MAC/BBP RT3070 (rev 0x0201), RF RT2020 (MIMO 1T1R), address d8:5d:4c:98:3b:7f
run0: firmware RT2870 loaded
pochan# usbconfig -u 0 -a 5 dump_device_desc
ugen0.5: <802.11 g WLAN Ralink> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x148f
idProduct = 0x2070
bcdDevice = 0x0101
iManufacturer = 0x0001 <Ralink>
iProduct = 0x0002 <802.11 g WLAN>
iSerialNumber = 0x0003 <1.0>
bNumConfigurations = 0x0001
pochan# ifconfig wlan0 create wlandev run0 wlanmode hostap
wlan0: Ethernet address: d8:5d:4c:98:3b:7f
pochan# ifconfig wlan0 inet 172.16.0.2 netmask 255.240.0.0 ssid FreeBSD-Kirkwood channel 11
pochan# ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether d8:5d:4c:98:3b:7f
inet 172.16.0.2 netmask 0xfff00000 broadcast 172.31.255.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid FreeBSD-Kirkwood channel 11 (2462 MHz 11g) bssid d8:5d:4c:98:3b:7f
country US authmode OPEN privacy OFF txpower 0 scanvalid 60
protmode CTS wme dtimperiod 1 -dfs
http://i.imgur.com/WL5cz.png
vm_fault(0xc0cc9254, 0, 1, 0) -> 1
Fatal kernel mode data abort: 'Translation Fault (P)'
trapframe: 0xc8413d8c
FSR=00000017, FAR=0000000c, spsr=20000013
r0 =c1bba000, r1 =00000000, r2 =00000000, r3 =00001908
r4 =00000000, r5 =c1bba000, r6 =c1bba000, r7 =c19e7c00
r8 =c19ee778, r9 =c09c97c0, r10=c19db000, r11=00000000
r12=c0ce2100, ssp=c8413dd8, slr=c09c9818, pc =c0ae6cd8
panic: Fatal abort
Uptime: 16m8s
Cannot dump. Device not defined or unavailable.
Automatic reboot in 15 seconds - press a key on the console to abort
PseudoCylon
December 23rd, 2010, 03:32
Sorry for taking long.
Can you try these (http://gitorious.org/run/run/trees/P4_ratectl_fix/dev/usb/wlan)?
If it doesn't work, please show me out put ofifconfig(without wlan0), and /etc/rc.conf (if you are using nat), /etc/hostapd.conf (if you are using).
okeeblow
January 5th, 2011, 18:21
vm_fault(0xc0cc93d4, 0, 1, 0) -> 1
Fatal kernel mode data abort: 'Translation Fault (P)'
trapframe: 0xc8413d8c
FSR=00000017, FAR=0000000c, spsr=20000013
r0 =c1adb000, r1 =00000000, r2 =00000000, r3 =00001908
r4 =00000000, r5 =c1adb000, r6 =c1adb000, r7 =c19e7c00
r8 =c19ee778, r9 =c09c9350, r10=c19db000, r11=00000000
r12=c0ce2280, ssp=c8413dd8, slr=c09c93a8, pc =c0ae6ca0
panic: Fatal abort
Uptime: 8m55s
Cannot dump. Device not defined or unavailable.
Automatic reboot in 15 seconds - press a key on the console to abort
rc.conf
swapfile="/usr/swap0"
hostname="pochan"
gateway_enable="YES"
ifconfig_mge0="up"
ifconfig_ue0="DHCP"
wlans_run0="wlan0"
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="up ssid FreeBSD-Kirkwood channel 11"
ntpd_enable="YES"
ntpd_flags="-g"
sshd_enable="YES"
fsck_y_enable="YES"
background_fsck="NO"
force_fsck="YES"
force_fsck_list="/"
postfix_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
I believe this may be a more general problem on the ARM architecture, since I've received mail from people having the same problem with a rum controller. I filed a PR (http://www.freebsd.org/cgi/query-pr.cgi?pr=arm/153380) a while ago.
PseudoCylon
January 8th, 2011, 08:47
I believe this may be a more general problem on the ARM architecture, since I've received mail from people having the same problem with a rum controller. I filed a PR (http://www.freebsd.org/cgi/query-pr.cgi?pr=arm/153380) a while ago.Sounds like it if the same problem occurs with rum.
Can you show me the output of followings? (assuming everything is compiled into kernel)objdump -h /where/your_kernel/is/kernel | grep text (The kernel doesn't have to be on Dockstar to run the command.)objdump -S --start-address=0xc8413d88 --stop-address=0xc8413da0 /where/your_kernel/is/kernel(-'S' is uppercase)
I'll try to find a workaround if possible. (Usually it is too far from the driver.)
okeeblow
January 9th, 2011, 01:14
[root@Emi#/root]objdump -h /usr/obj/arm/usr/src/sys/DOCKSTAR-COOLTRAINER/kernel.bin|grep text
objdump: /usr/obj/arm/usr/src/sys/DOCKSTAR-COOLTRAINER/kernel.bin: File format not recognized
[root@Emi#/root]objdump -S /usr/obj/arm/usr/src/sys/DOCKSTAR-COOLTRAINER/kernel.bin
objdump: /usr/obj/arm/usr/src/sys/DOCKSTAR-COOLTRAINER/kernel.bin: File format not recognized
pochan# objdump -h kernel.bin
objdump: kernel.bin: File format not recognized
pochan# objdump -S --start-address=0xc8413d88 --stop-address=0xc8413da0 kernel.bin
objdump: kernel.bin: File format not recognized
On both architectures. I uploaded it if you'd like to take a look: http://cooltrainer.org/kernel.bin
vhapkin
January 14th, 2011, 08:49
-- 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 (http://forums.freebsd.org/showpost.php?p=44278&postcount=3)
...
The driver is included in 8.1-RELEASE.
For the latest development (11n support), try following files.
for 9-CURRENT rev 211314 or newer,
11n_beta2 (http://gitorious.org/run/run/trees/11n_beta2)
for 8.1-RELEASE and 9-CURRENT older than rev 211314
8.1_REL (http://gitorious.org/run/run/trees/8.1_REL)
for 8.0-RELEASE users
8.0_REL_eos (http://gitorious.org/run/run/trees/8.0_REL_eos),
or run-8.0-REL_final.tar.bz2 (http://forums.freebsd.org/attachment.php?attachmentid=916&stc=1&d=12783808364) << 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 (http://lists.freebsd.org/pipermail/freebsd-current/2010-October/020504.html).
You need to re-build kernel, but with KERNFAST,make buildkernel KERNCONF=YOUR_CONF KERNFAST=1
it should take only a few minutes.
Patched files (http://gitorious.org/run/run/trees/8.1_REL/dev/usb/controller), sys/dev/usb/controller/ehci.h and sys/dev/usb/controller/ehci.c, are included in 8.1_REL (http://gitorious.org/run/run/trees/8.1_REL) version.
for 7.2 users 739 << 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 426, 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.cgi?query=run&apropos=0&sektion=0&manpath=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 (http://forums.freebsd.org/showpost.php?p=47936&postcount=28) (One posted here is for 7.)
-- updated on Nov. 28, 2009 --
-- FIX -- FIX -- FIX -- 500
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.
Could you please add support of rt3090 to driver?
HighTower
January 14th, 2011, 19:34
Hello,
I have problems with RAlink RT3070 card... (LR802UKN2)
tried with driver from FreeBSD 8.2-PRERELEASE #4: Fri Jan 14 20:26:35 sources
also tried http://gitorious.org/run/run/archive-tarball/8.1_REL and http://gitorious.org/run/run/archive-tarball/11n_beta2
results are the same...
I want to create AccessPoint, but can't... also I can't use it as wireless client ((
what I do:
kldload runfs - ok
kldload if_run - ok
run0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:0d:f0:8d:54:f4
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ifconfig wlan0 create wlandev run0 wlanmode hostap
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0d:f0:8d:54:f4
media: IEEE 802.11 Wireless Ethernet autoselect <hostap> (autoselect <hostap>)
status: no carrier
ssid "" channel 1 (2412 MHz 11b)
country US authmode OPEN privacy OFF txpower 0 scanvalid 60 wme
dtimperiod 1 -dfs bintval 0
hostap is supported
ifconfig wlan0 list caps
drivercaps=d85c501<STA,IBSS,HOSTAP,SHSLOT,SHPREAMBLE,MONITOR,MBSS,WPA 1,WPA2,WME,WDS>
cryptocaps=1b<WEP,TKIP,AES_CCM,TKIPMIC>
htcaps=f057e<CHWIDTH40,GREENFIELD,SHORTGI20,SHORTGI40,DELBA>
make open accesspoint:
ifconfig wlan0 inet 192.168.0.1 netmask 255.255.255.0 ssid freebsdap mode 11g channel 1
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0d:f0:8d:54:f4
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid freebsdap channel 1 (2412 MHz 11g) bssid 00:0d:f0:8d:54:f4
country US authmode OPEN privacy OFF txpower 0 scanvalid 60
protmode CTS wme dtimperiod 1 -dfs
And now I have wireless led blinking very fast and that's all... No accesspoints can be found by other devices... What I do wrong?
PseudoCylon
January 17th, 2011, 08:41
@okeeblowOn both architectures. I uploaded it if you'd like to take a look: http://cooltrainer.org/kernel.binIs there file named kernel.o?
And just in case, can you check if virsion of src/sys/net80211/ieee80211_amrr.c is__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_amrr.c,v 1.4.2.3 2010/11/20 12:22:02 bschmidt Exp $");
@vhapkinCould you please add support of rt3090 to driver?Sorry. It is PCIe based chipset. Cannot just add. It would be a separate driver.
@HighTowermake open accesspoint:
ifconfig wlan0 inet 192.168.0.1 netmask 255.255.255.0 ssid freebsdap mode 11g channel 1
Can you issue 'inet' separately?ifconfig wlan0 netmask 255.255.255.0 ssid freebsdap mode 11g channel 1thenifconfig wlan0 inet 192.168.0.1The driver has problem restarting some 3070 chipset, so give 'inet' at the end. Hope this is the case.
HighTower
January 17th, 2011, 16:54
Can you issue 'inet' separately?ifconfig wlan0 netmask 255.255.255.0 ssid freebsdap mode 11g channel 1thenifconfig wlan0 inet 192.168.0.1The driver has problem restarting some 3070 chipset, so give 'inet' at the end. Hope this is the case.
I've tried as you wrote after reboot, unfortunately result is the same... wireless led on device blinking very fast, but no ap with "freebsdap" name and my mac is seen..
Also now I observe another problem, after rebooting, loafing if_run module and creading wlan I can't recieve list of APs in range!
ifconfig wlan0 up scan
return nothing.. it is in "run" stage for a long with not output...
initally, then I just installed 8.1 with generic kernel on this device I was able to scan and recieve APs list in range...
okeeblow
January 18th, 2011, 04:40
@okeeblowIs there file named kernel.o?
There doesn't appear to be:
[root@Emi#src]cp /usr/obj/arm/usr/src/sys/DOCKSTAR-COOLTRAINER/kernel.
kernel.bin* kernel.gz.tramp* kernel.gz.tramp.bin* kernel.tramp* kernel.tramp.bin*
And just in case, can you check if virsion of src/sys/net80211/ieee80211_amrr.c is__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_amrr.c,v 1.4.2.3 2010/11/20 12:22:02 bschmidt Exp $");
I have __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_amrr.c,v 1.4.2.3.2.1 2010/12/21 17:09:25 kensmith Exp $");
JackMiles
January 19th, 2011, 15:45
Hello. I have some problem with my Dlink DWA-140 device.
OS 8.1 release.
Driver is standard from 8.1 release, or from your site http://gitorious.org/run/run/trees/8.1_REL, doesnt matter, happens everywhere.
Device detects as:
run0: <Ralink 11n adapter, class 0/0, rev. 2.00/1.01, addr 2> on usbus1
run0: MAC/BBP RT3071 (rev 0x0213), RF RT3022 (MIMO 2T2R), address 1c:af:f7:04:0c:9d
Setting up device in HOSTAP mode (auth doesnt matter)
Connecting a client to this hostap.
Starting traffic exchange (i start pings from cl to ap and from ap to cl).
Disconnecting a client.
Core dump...
Debug looks like this (much of megs cropped):
.............
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=148 rate=2 qid=0 phy=0
run_bulk_tx_callbackN: sending frame len=128 xferlen=152 @ index 0
run_bulk_tx_callbackN: transfer complete: 152 bytes @ index 0
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=140 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=120 xferlen=144 @ index 0
run_bulk_tx_callbackN: transfer complete: 144 bytes @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_drain_fifo: tx stat 0x00000023
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x810201a6
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=116 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=96 xferlen=120 @ index 0
run_bulk_tx_callbackN: transfer complete: 120 bytes @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x00000022
run_drain_fifo: tx stat 0x00000022
run_reset_livelock: debug reg 04000001
run_iter_func: ridx=16
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=148 rate=2 qid=0 phy=0
run_bulk_tx_callbackN: sending frame len=128 xferlen=152 @ index 0
run_bulk_tx_callbackN: transfer complete: 152 bytes @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=116 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=96 xferlen=120 @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=116 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: transfer complete: 120 bytes @ index 0
run_bulk_tx_callbackN: sending frame len=96 xferlen=120 @ index 0
run_bulk_tx_callbackN: transfer complete: 120 bytes @ index 0
run_drain_fifo: tx stat 0x00000023
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x810201a6
run_update_beacon: cmdq_store=22
run_cmdq_cb: cmdq_exec=22 pending=1
run_updateprot: mode=9 prot=1 useprot=off
run_updateprot: htinfo=2 htprot=2
run_update_beacon_cb: chan=2GHz
run_update_beacon: cmdq_store=23
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=140 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=120 xferlen=144 @ index 0
run_bulk_tx_callbackN: transfer complete: 144 bytes @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=116 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=96 xferlen=120 @ index 0
run_bulk_tx_callbackN: transfer complete: 120 bytes @ index 0
run_cmdq_cb: cmdq_exec=23 pending=1
run_updateprot: mode=9 prot=1 useprot=off
run_updateprot: htinfo=2 htprot=2
run_update_beacon_cb: chan=2GHz
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x00000022
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=116 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=96 xferlen=120 @ index 0
run_bulk_tx_callbackN: transfer complete: 120 bytes @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=116 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=96 xferlen=120 @ index 0
run_bulk_tx_callbackN: transfer complete: 120 bytes @ index 0
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x810401ab
run_drain_fifo: tx stat 0x810201a6
run_update_beacon: cmdq_store=24
run_cmdq_cb: cmdq_exec=24 pending=1
run_updateprot: mode=9 prot=1 useprot=off
run_updateprot: htinfo=2 htprot=2
run_update_beacon_cb: chan=2GHz
run_update_beacon: cmdq_store=25
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=140 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=120 xferlen=144 @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_bulk_tx_callbackN: transfer complete: 144 bytes @ index 0
run_rx_frame: received RT2860_RX_L2PAD frame
run_tx: qos 0 qid 0 tid 0 qflags 4
run_tx: sending data frame len=116 rate=132 qid=0 phy=8104
run_bulk_tx_callbackN: sending frame len=96 xferlen=120 @ index 0
run_bulk_tx_callbackN: transfer complete: 120 bytes @ index 0
run_cmdq_cb: cmdq_exec=25 pending=1
run_updateprot: mode=9 prot=1 useprot=off
run_updateprot: htinfo=2 htprot=2
run_update_beacon: cmdq_store=26
run_update_beacon_cb: chan=2GHz
run_cmdq_cb: cmdq_exec=26 pending=1
run_updateprot: mode=9 prot=1 useprot=off
run_updateprot: htinfo=0 htprot=2
run_update_beacon_cb: chan=2GHz
run_drain_fifo: tx stat 0x810401ab
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0xc4bcb908
fault code = supervisor read, page not present
instruction pointer = 0x20:0xc4b3ac0a
stack pointer = 0x28:0xe68c2c6c
frame pointer = 0x28:0xe68c2ca0
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 0 (run0 taskq)
trap number = 12
panic: page fault
cpuid = 0
Uptime: 4m40s
Cannot dump. Device not defined or unavailable.
Automatic reboot in 15 seconds - press a key on the console to abort
It happens about 99,99% when there's some traffic between client and ap, and client disappears. It happens about 10% when there's no traffic and client disappears.
Sorry for by bad english.
PseudoCylon
January 20th, 2011, 06:20
@HighTowerifconfig wlan0 up scan
return nothing.. it is in "run" stage for a long with not output...'up' and 'scan' cause problem. Just using 'up' also creats the list.
initally, then I just installed 8.1 with generic kernel on this device I was able to scan and recieve APs list in range...If the driver works on 8.1 this might be caused by some changes in ieee80211 stack. Can you show me the debugging messages? After creating the wlan,
wlandebug -i wlan0 debug+dumppkts+input+elemid+node+scan+output+state Your kernel need to be compiled with IEEE08211_DEBUG option.
Or, try
ifconfig wlan0 ssid freebsdap channel 1ifconfig wlan0 inet 192.168.0.1you might get lucky.
@okeeblow
Can you try this patch? As you can see, this may fix panic with rum as well.
http://svn.freebsd.org/viewvc/base?view=revision&revision=217511
If it won't work,
- can I get some debug messages? DDB or at least,wlandebug -i wlan0 anylast a few lines before panic?
- can I have kernel.tramp and kernel.tramp.bin?
@JackMiles
Can you try this?
http://gitorious.org/run/run/trees/rssi_fix/dev/usb/wlan
bschmidt
January 20th, 2011, 09:57
@HighTower'up' and 'scan' cause problem. Just using 'up' also creats the list.
CFT/CFR, possible fix for ifconfig scan hang (http://lists.freebsd.org/pipermail/freebsd-net/2010-December/027327.html)
JackMiles
January 20th, 2011, 11:53
@JackMiles
Can you try this?
http://gitorious.org/run/run/trees/rssi_fix/dev/usb/wlan
Ok, heres the comparsion:
Previous driver:
+11g support
-AES CCMP not working (win client says "AES; key absent", didnt thought that is a driver issue...)
-core dump on client disconnection
RSSfix driver:
-no 11g support
+AES CCMP working ok.
+looks like i cant make this driver core dumped
-Strange TX bug:
packets can only be transmitted, when some packets are received. So, this thing works only if i start on my win client pinging this AP. I'f i wont - many packets lost. Testing: starting pings from AP with run driver to win client, and from client to AP. It works. Disabling pings from client to AP - pings from AP to client freezes, no response.
b.t.w. theres some strange thing, happens in all run drivers i tested. starting pings from win client to ap - time almost always <1ms. Start pings from AP to client - time is huge, like
64 bytes from 10.0.0.2: icmp_seq=0 ttl=128 time=0.859 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=128 time=0.892 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=128 time=779.953 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=128 time=770.234 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=128 time=759.415 ms
Every icmp ping consists of request and reply, 1 tx and 1 rx packet anyway, so this looks very strange to me.
JackMiles
January 20th, 2011, 12:24
Er, i mean 11n support, not 11g.
HighTower
January 20th, 2011, 17:51
@HighTower'up' and 'scan' cause problem. Just using 'up' also creats the list.
If the driver works on 8.1 this might be caused by some changes in ieee80211 stack. Can you show me the debugging messages? After creating the wlan,
wlandebug -i wlan0 debug+dumppkts+input+elemid+node+scan+output+state Your kernel need to be compiled with IEEE08211_DEBUG option.
Or, try
ifconfig wlan0 ssid freebsdap channel 1ifconfig wlan0 inet 192.168.0.1you might get lucky.
so, not I almost succeeded!!!
what I've done:
kldload runfw
kldload if_run
ifconfig wlan0 create wlandev run0 wlanmode hostap
wlandebug -i wlan0 debug+dumppkts+input+elemid+node+scan+output+state
net.wlan.0.debug: 0x0 => 0x6b380000<debug,dumppkts,input,elemid,node,scan,output,state>
ifconfig wlan0 ssid freebsdap channel 1
ifconfig wlan0 inet 192.168.0.1
after that ap with name "freebsdap" because available, but then I connected to it, whole device restarted (((
here is wlandebug log:
Jan 20 19:31:26 home kernel: run0: <1.0> on usbus3
Jan 20 19:31:26 home kernel: run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address 00:0d:f0:8d:54:f4
Jan 20 19:31:26 home kernel: run0: firmware RT2870 loaded
Jan 20 19:31:38 home kernel: wlan0: Ethernet address: 00:0d:f0:8d:54:f4
Jan 20 19:32:13 home kernel: wlan0: ieee80211_init
Jan 20 19:32:13 home kernel: wlan0: start running, 0 vaps running
Jan 20 19:32:13 home kernel: wlan0: ieee80211_start_locked: up parent run0
Jan 20 19:32:13 home kernel: wlan0: ieee80211_start: ignore queue, parent run0 not up+running
Jan 20 19:32:14 home kernel: wlan0: start running, 1 vaps running
Jan 20 19:32:14 home kernel: wlan0: ieee80211_new_state_locked: INIT -> SCAN (nrunning 0 nscanning 0)
Jan 20 19:32:14 home kernel: wlan0: ieee80211_newstate_cb: INIT -> INIT arg 0
Jan 20 19:32:14 home kernel: wlan0: hostap_newstate: INIT -> INIT (0)
Jan 20 19:32:14 home kernel: wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
Jan 20 19:32:14 home kernel: wlan0: hostap_newstate: INIT -> SCAN (0)
Jan 20 19:32:14 home kernel: wlan0: ieee80211_create_ibss: creating HOSTAP on channel 1
Jan 20 19:32:14 home kernel: wlan0: ieee80211_alloc_node 0xc4dff000<00:0d:f0:8d:54:f4> in station table
Jan 20 19:32:14 home kernel: wlan0: ieee80211_new_state_locked: SCAN -> RUN (nrunning 0 nscanning 0)
Jan 20 19:32:14 home kernel: wlan0: ieee80211_newstate_cb: SCAN -> RUN arg -1
Jan 20 19:32:14 home kernel: wlan0: hostap_newstate: SCAN -> RUN (-1)
Jan 20 19:32:14 home kernel: wlan0: synchronized with 00:0d:f0:8d:54:f4 ssid "freebsdap" channel 1 start 0Mb
Jan 20 19:32:14 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 63
Jan 20 19:32:14 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:32:14 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
Jan 20 19:32:14 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:32:14 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
...
repeated a lot of times, difference in last numbers, 65 or 63 or 67 or 59
...
Jan 20 19:32:19 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 27
Jan 20 19:32:19 home kernel: [40:a6:d9:14:e5:5a] discard probe_req frame, ssid mismatch: "ZyXEL"
Jan 20 19:32:19 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 27
Jan 20 19:32:19 home kernel: [40:a6:d9:14:e5:5a] discard probe_req frame, ssid mismatch: "ZyXEL"
...
ZyXEL - is open AP in ragne
...
text before repeated several times
...
Jan 20 19:32:35 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 67
Jan 20 19:32:35 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:32:35 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 65
Jan 20 19:32:35 home kernel: wlan0: [40:a6:d9:14:e5:5a] recv probe req
Jan 20 19:32:35 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_proberesp:2391) 0xc4dff000<00:0d:f0:8d:54:f4> refcnt 4
Jan 20 19:32:35 home kernel: wlan0: send probe resp on channel 1 to 40:a6:d9:14:e5:5a
Jan 20 19:32:35 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 67
Jan 20 19:32:35 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:32:35 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
Jan 20 19:32:35 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
...
again repeated a lot of times
...
Jan 20 19:32:39 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:32:39 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 65
Jan 20 19:32:39 home kernel: wlan0: [40:a6:d9:14:e5:5a] recv probe req
Jan 20 19:32:39 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_proberesp:2391) 0xc4dff000<00:0d:f0:8d:54:f4> refcnt 4
Jan 20 19:32:39 home kernel: wlan0: send probe resp on channel 1 to 40:a6:d9:14:e5:5a
...
Jan 20 19:32:39 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 63
Jan 20 19:32:39 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:32:39 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 25
Jan 20 19:32:39 home kernel: wlan0: [40:a6:d9:14:e5:5a] recv probe req
Jan 20 19:32:39 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_proberesp:2391) 0xc4dff000<00:0d:f0:8d:54:f4> refcnt 4
Jan 20 19:32:39 home kernel: wlan0: send probe resp on channel 1 to 40:a6:d9:14:e5:5a
Jan 20 19:32:39 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 25
Jan 20 19:32:39 home kernel: wlan0: [40:a6:d9:14:e5:5a] recv probe req
...
Jan 20 19:32:40 home kernel: [40:a6:d9:14:e5:5a] discard probe_req frame, ssid mismatch: "ZyXEL"
Jan 20 19:32:40 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
Jan 20 19:32:40 home kernel: wlan0: [00:24:8c:50:c3:95] discard
Jan 20 19:32:40 home kernel: unhandled information element,
Jan 20 19:32:40 home kernel: id 47, len 1
Jan 20 19:32:40 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 63
Jan 20 19:32:40 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:32:40 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 63
Jan 20 19:32:40 home kernel: [40:a6:d9:14:e5:5a] discard probe_req frame, ssid mismatch: "ZyXEL"
Jan 20 19:32:40 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
...
Jan 20 19:32:48 home kernel: wlan0: [40:a6:d9:14:e5:5a] recv probe req
Jan 20 19:32:48 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_proberesp:2391) 0xc4dff000<00:0d:f0:8d:54:f4> refcnt 4
Jan 20 19:32:48 home kernel: wlan0: send probe resp on channel 1 to 40:a6:d9:14:e5:5a
Jan 20 19:32:48 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 23
Jan 20 19:32:48 home kernel: wlan0: [40:a6:d9:14:e5:5a] recv probe req
Jan 20 19:32:48 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_proberesp:2391) 0xc4dff000<00:0d:f0:8d:54:f4> refcnt 4
Jan 20 19:32:48 home kernel: wlan0: send probe resp on channel 1 to 40:a6:d9:14:e5:5a
...
Jan 20 19:33:07 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
Jan 20 19:33:07 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:33:07 home kernel: wlan0: received probe_req from 40:a6:d9:14:e5:5a rssi 25
Jan 20 19:33:07 home kernel: wlan0: [40:a6:d9:14:e5:5a] recv probe req
Jan 20 19:33:07 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_proberesp:2391) 0xc4dff000<00:0d:f0:8d:54:f4> refcnt 4
Jan 20 19:33:07 home kernel: wlan0: send probe resp on channel 1 to 40:a6:d9:14:e5:5a
Jan 20 19:33:07 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
Jan 20 19:33:07 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:33:07 home kernel: wlan0: received auth from 40:a6:d9:14:e5:5a rssi 27
Jan 20 19:33:07 home kernel: wlan0: ieee80211_alloc_node 0xc4e67000<40:a6:d9:14:e5:5a> in station table
Jan 20 19:33:07 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_mgmt:1876) 0xc4e67000<40:a6:d9:14:e5:5a> refcnt 2
Jan 20 19:33:07 home kernel: [40:a6:d9:14:e5:5a] send auth on channel 1
Jan 20 19:33:07 home kernel: wlan0: [40:a6:d9:14:e5:5a] station authenticated (open)
Jan 20 19:33:07 home kernel: wlan0: received assoc_req from 40:a6:d9:14:e5:5a rssi 25
Jan 20 19:33:07 home kernel: wlan0: [40:a6:d9:14:e5:5a] station associated at aid 1: short preamble, short slot time, QoS
Jan 20 19:33:07 home kernel: wlan0: ieee80211_ref_node (ieee80211_send_mgmt:1876) 0xc4e67000<40:a6:d9:14:e5:5a> refcnt 3
Jan 20 19:33:07 home kernel: [40:a6:d9:14:e5:5a] send assoc_resp on channel 1
Jan 20 19:33:07 home kernel: wlan0: [40:a6:d9:14:e5:5a] node join
Jan 20 19:33:07 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 63
Jan 20 19:33:07 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:33:07 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
Jan 20 19:33:07 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
Jan 20 19:33:07 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 63
...
Jan 20 19:33:08 home kernel: wlan0: received beacon from 00:24:8c:50:c3:95 rssi 65
Jan 20 19:33:08 home kernel: wlan0: [00:24:8c:50:c3:95] discard unhandled information element, id 47, len 1
after last line - reboot...
but anyway, this is very-very big progress for me!!!
PseudoCylon
January 21st, 2011, 02:11
@JackMiles-no 11g support[/CODE]Patches are for one in HEAD. 11n hasn't supported, yet. I just want to patch codes already committed first. Fixes on 11n beta will follow.
-Strange TX bug:Most likely caused by power save mode. The support hasn't added, yet. Can you turn off power save mode on client, for now?
@HighTowerafter that ap with name "freebsdap" because available, but then I connected to it, whole device restarted (((It seems 8.2-PRERELEASE + AP needs this patch.
http://svn.freebsd.org/viewvc/base?view=revision&revision=217511
And, please use this run
http://gitorious.org/run/run/trees/rssi_fix/dev/usb/wlan
Soon or later, you will encounter the same problem as JackMiles's.
Can you post the debugging messages with 'mode 11g' option?wlandebug -i wlan0 debug+dumppkts+input+elemid+node+scan+output+state ifconfig wlan0 ssid freebsdap mode 11g channel 1Not using 'mode 11g' option is OK for workaround, but bug shoud be fixed. Also please give this patch a try.
http://forums.freebsd.org/showpost.php?p=120126&postcount=225
JackMiles
January 21st, 2011, 11:21
@JackMilesPatches are for one in HEAD. 11n hasn't supported, yet. I just want to patch codes already committed first. Fixes on 11n beta will follow.
Most likely caused by power save mode. The support hasn't added, yet. Can you turn off power save mode on client, for now?
Yes, this helps. Seems like turning off power saving mode fixes Ap-client ping time too. Thank you very much!
b.t.w. , can you recommend some wlan driver source, with comments, or something else to understand how wlan drivers works? I have an experience in writing freebsd kernel modules, but not device drivers, and thinking about porting rtl8192 to freebsd.
HighTower
January 21st, 2011, 17:06
@HighTowerIt seems 8.2-PRERELEASE + AP needs this patch.
http://svn.freebsd.org/viewvc/base?view=revision&revision=217511
And, please use this run
http://gitorious.org/run/run/trees/rssi_fix/dev/usb/wlan
Soon or later, you will encounter the same problem as JackMiles's.
Can you post the debugging messages with 'mode 11g' option?wlandebug -i wlan0 debug+dumppkts+input+elemid+node+scan+output+state ifconfig wlan0 ssid freebsdap mode 11g channel 1Not using 'mode 11g' option is OK for workaround, but bug shoud be fixed. Also please give this patch a try.
http://forums.freebsd.org/showpost.php?p=120126&postcount=225
I took run sources from http://gitorious.org/run/run/trees/rssi_fix/dev/usb/wlan
later checked changes with http://svn.freebsd.org/viewvc/base?view=revision&revision=217511
the only difference that if_run.c on svn.freebsd.org doesn't have line
ieee80211_ratectl_node_init(ni); at line ~2379, but at gitorious.org has.. I decided not to change sources from gitorious.org, so my copy has this line
patch for ifconfig I also took and recompile every thing.
now AP is created, user can connect and not reboot!!!
debug is attached...
so, AP in opened mode - works, I can use dhcpd to give ip adresses to clients
but then I try to create WPA protected ap - smth goes wrong...
opened AP:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0d:f0:8d:54:f4
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid freebsdap channel 1 (2412 MHz 11g) bssid 00:0d:f0:8d:54:f4
country US authmode OPEN privacy OFF txpower 0 scanvalid 60
protmode CTS wme dtimperiod 1 -dfs
after I run /etc/rc.d/hostapd forcestart
with following config /etc/hostapd.conf
interface=wlan0
driver=bsd
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=freebsdap
wpa=1
wpa_passphrase=xxxxx
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
after that AP dissapears in available list (((
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:0d:f0:8d:54:f4
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid freebsdap channel 1 (2412 MHz 11g) bssid 00:0d:f0:8d:54:f4
country US authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit
txpower 0 scanvalid 60 protmode CTS wme dtimperiod 1 -dfs
JackMiles
January 22nd, 2011, 14:27
@JackMilesPatches are for one in HEAD. 11n hasn't supported, yet. I just want to patch codes already committed first. Fixes on 11n beta will follow.
Most likely caused by power save mode. The support hasn't added, yet. Can you turn off power save mode on client, for now?
Update... i can make this core dump too. But, it was one time, all other times PC freezes, no core dump, no nothing, fully freeze.
Howto: just connect with invalid (not listed in conf) MAC or KEY. When MAC is invalid - PC freezes. When KEY is invalid - sometimes some messages about wrong key from hostapd , then freeze. One time was core dump.
Happends on both TKIP and CCMP.
PseudoCylon
January 24th, 2011, 06:04
@HighTower
driver=bsdlooks linux-ish
Can you use this http://gitorious.org/run/run/trees/key_fix/dev/usb/wlan andsysctl hw.usb.run.debug=1before/etc/rc.d/hostapd forcestartand post debug messages?after that AP dissapears in available list (((means AP with rt3070 is still responding (still taking commands, not freezing), just AP doesn't show up on client?
@JackMiles
DoesWhen KEY is invalid...means intentionally giving wrong key or giving the right key but auth mode isn't working?PC freezes...I cannot help windows freezing issue, you have to tell steve ballmer (http://www.youtube.com/watch?v=wvsboPUjrGc) but if FreeBSD Box with run is freezing, please try this http://gitorious.org/run/run/trees/fifo_fix/dev/usb/wlan previous code has LOR issue.b.t.w. , can you recommend some wlan driver source, with comments, or something else to understand how wlan drivers works? I have an experience in writing freebsd kernel modules, but not device drivers, and thinking about porting rtl8192 to freebsd.Not particularly. I used rum just because it is also driver for ralink's chipset. It worked well for me.
HighTower
January 24th, 2011, 16:42
@HighTower
driver=bsdlooks linux-ish
Can you use this http://gitorious.org/run/run/trees/key_fix/dev/usb/wlan andsysctl hw.usb.run.debug=1before/etc/rc.d/hostapd forcestartand post debug messages?
I removed driver=bsd from /etc/hostapd.conf
sources are taken and run is recompiled
Also I completely shut down system with removing power cable.. if not to do it (make shutdown or reboot) after creating opened AP, it is strange why, but AP is visible, even if not if_run module is loaded!!!
means AP with rt3070 is still responding (still taking commands, not freezing), just AP doesn't show up on client?
yes, with new sources the same situation...
If I have opened AP, it is visible by clients, clients can connect to it and traffic goes..
but then I call
/etc/rc.d/hostapd forcestart
my AP just simply dissapears, clients do not see it and can't connect
but wireless led continue blinking as in normal situation
I've tried commands:
ifconfig wlan0 list sta
ifconfig wlan0 list scan
ifconfig wlan0 down
all of them were executed with no delay and no output ((
new debug is attached...
PseudoCylon
January 26th, 2011, 08:32
Also I completely shut down system with removing power cable.. if not to do it (make shutdown or reboot) after creating opened AP, it is strange why, but AP is visible, even if not if_run module is loaded!!!mmm... strange. What OS are clients running?If I have opened AP, it is visible by clients, clients can connect to it and traffic goes..
but then I call
/etc/rc.d/hostapd forcestart
my AP just simply dissapears, clients do not see it and can't connect
but wireless led continue blinking as in normal situationSo, what you are doing is
1) set up an open AP,
2) check everything is OK,
3) stat hostapd.
If so, did you switch encryption mode on clients, for FreeBSD boxes, run wpa_supplicant? Debug message shows no client attempted to associate. Even though encryption keys are wrong, clients can associate as long as ssid and encryption mode match. Then, in WPA mode, they will be kicked off.
Anyway, the drive isn't writing the keys properly. Here is fix.
http://gitorious.org/run/run/trees/8.2_PRE/dev/usb/wlan
(If you are lazy, you can use one you have. Just start hostapd right after creating wlan, no extra command between.)
If it doesn't work please post debug message.wlandebug -i wlan0 debug+crypto+assoc+auth+wpasysctl hw.usb.run.debug=1and set up hostap.
If it works, you can turn off annoying debug output withsysctl hw.usb.run.debug=0
HighTower
January 26th, 2011, 17:53
mmm... strange. What OS are clients running?
agree, strange...
iPhone 4 and smartphones with WinMobile 6 - do it this way
WinXP - no...
I have no spare freebsd pc with wireless to test on it (
So, what you are doing is
1) set up an open AP,
2) check everything is OK,
3) stat hostapd.
wow, now it works!!! really!!! I'm happy :beer
Anyway, the drive isn't writing the keys properly. Here is fix.
http://gitorious.org/run/run/trees/8.2_PRE/dev/usb/wlan
(If you are lazy, you can use one you have. Just start hostapd right after creating wlan, no extra command between.)
I'm not lazy and I'm interested in this driver, so I'm ready for tests...
and some questions:
- how to do it in best way to start AP with system start?
- is it possible made autochannel selection for AP? like some box routers do then they change channel number depending on smth (may be availability of open APs on the same channel or signal quality or smth else)?
- is it possible to control transmit power?
now it is written
TKIP 2:128-bit TKIP 3:128-bit txpower 0 scanvalid 60 protmode CTS wme
dtimperiod 1 -dfs
what does "txpower 0" mean?
p.s. if you are interested, here is debug log... two clients are connected and work with no problems...
HighTower
January 26th, 2011, 17:54
forgot to attache debug, here it is.
HighTower
January 27th, 2011, 18:07
addition... don't know is it driver or hostapd problem... but my iPhone now do not automatically connects to my AP... then I select network manually - it asks for network key each time!.. (((((
PseudoCylon
January 28th, 2011, 10:32
wow, now it works!!! really!!! I'm happy :beer2 thumbs up!
and some questions:
- how to do it in best way to start AP with system start? Pretty much stradard, use loader.conf and rc.conf.
- is it possible made autochannel selection for AP? like some box routers do then they change channel number depending on smth (may be availability of open APs on the same channel or signal quality or smth else)?Yes. Justifconfig wlan create wlandev run0 wlanmode ap/etc/rc.d/hostapd forcestartThen it will scan and selects appropriate one like any other routers. I thought you had to use chennel 1.
- is it possible to control transmit power?It could, but the support hasn't been added.what does "txpower 0" mean?It means I'm too lazy to fix it. The driver (supposedly) sets txpower properly, but not telling anyone. I noticed it while ago, but I'm just fixing bugs causing troubles, first.
p.s. if you are interested, here is debug log... two clients are connected and work with no problems...Thanks for reporting/testing. The debug messages shows the driver behaves as it should be. But, DHCP server is complaining. Check dhcpd.conf.
addition... don't know is it driver or hostapd problem... but my iPhone now do not automatically connects to my AP... then I select network manually - it asks for network key each time!.. (((((Most likely steve jobs' problem. AP doesn't tell client to join or give out encryption keys.
* For open AP, any client can associate, so as iPhone.
* For WPA AP, iPhone needs a key, so it asks every time it wants. I don't know why iPhone doesn't remember keys. I don't even have a cellphone.
HighTower
January 28th, 2011, 13:54
Pretty much stradard, use loader.conf and rc.conf.
I have:
loader.conf
runfw_load="YES"
if_run_load="YES"
rc.conf
wlans_run0="wlan0"
create_args_wlan0="wlanmode hostap up"
cloned_interfaces="bridge0"
ifconfig_bridge0="addm wlan0 addm re1" # << re1 is iface for internal wired net
ifconfig_bridge0="inet 172.16.1.1 netmask 255.255.255.0"
hostapd_enable="YES"
after restart iface wlan0 is created, hostapd is started, wireless led on device is blinking as usuial, but
- AP is not seen
- wlan0 is not added to bringe0
Then it will scan and selects appropriate one like any other routers. I thought you had to use chennel 1.
I've tried such way, but channel is all the time 1 and not chaning in time... that's why I asked...
It could, but the support hasn't been added.It means I'm too lazy to fix it. The driver (supposedly) sets txpower properly, but not telling anyone. I noticed it while ago, but I'm just fixing bugs causing troubles, first.
hm.. so driver controls power itself?
no way to set it to max? because then I sit near AP (~3m) I have signal quality ~80%, if I go about 7m (with 2 walls between) quality is ~12%...
and command ifconfig wlan0 txpower 50
replyes with error
ifconfig: SIOCS80211: Operation not supported
But, DHCP server is complaining. Check dhcpd.conf.
I fixed it.. problem was in wrong place of defining static hosts..
Most likely steve jobs' problem. AP doesn't tell client to join or give out encryption keys.
not sure... because I use iPhone to connect to several WPA2 protected nets with keys (D-Link and TP-Link routers) and I not prompted to enter key each time...
Then I have in my hostapd.conf line
wpa=1
it connected automatically, but then I change it to wpa=2 to have WPA2 instead of WPA, problems started...
another strange thing (may it is related to the fact, that iPhone "forgets" key), the it automatically connects to open AP in range with very-very low signal (~8%)
HighTower
January 28th, 2011, 18:48
small update:
- problem with iPhone doesn't exists any more
- AP is started successfully while system start up
what I did - simply shutdown the system and removed power cord for 5 minutes... this is issue I already wrote....
it looks like some info about previous wireless chip configuration is not reset after reboot, because actually power is not removed from it while reboot and shutdown if power cord is connected...
JackMiles
January 29th, 2011, 02:42
Does means intentionally giving wrong key or giving the right key but auth mode isn't working?
Giving right key works fine. Giving really wrong key myself makes some msg about wrong key and when pc freeze.
I cannot help windows freezing issue, you have to tell steve ballmer (http://www.youtube.com/watch?v=wvsboPUjrGc) but if FreeBSD Box with run is freezing, please try this http://gitorious.org/run/run/trees/fifo_fix/dev/usb/wlan previous code has LOR issue.
FreeBSD Box with run is freezing.
With fifo_fix version all seems ok right now, no freezing.
JackMiles
January 29th, 2011, 03:25
PseudoCylon, btw, why maximum speed is about 11mbit in g mode?
PseudoCylon
January 31st, 2011, 23:59
@HighTowersmall update:
- problem with iPhone doesn't exists any more
- AP is started successfully while system start up
what I did - simply shutdown the system and removed power cord for 5 minutes... this is issue I already wrote....
it looks like some info about previous wireless chip configuration is not reset after reboot, because actually power is not removed from it while reboot and shutdown if power cord is connected...Thst's good. So, it leaves us channels and tx power issue. (I'll try to fix re-power-up issue some day.)I've tried such way, but channel is all the time 1 and not chaning in time... that's why I asked...AP picks the most appropriate channel (least traffic, etc), then stick with it unless you manually change. It seems channel 1 is the one AP picks.hm.. so driver controls power itself? no way to set it to max?Yes (supporsted to). I set what they call "auto tx power." And it should crank up to max when appropriate.
I sit near AP (~3m) I have signal quality ~80%, if I go about 7m (with 2 walls between) quality is ~12%...It kinda low, but it look normal. You cannot get the same quality if you walk away from AP. Noise also affects quality. Does another router give better quality? I get the comparable rssi/snr with linksys G router.command ifconfig wlan0 txpower 50
replyes with error
ifconfig: SIOCS80211: Operation not supportedThat's because the driver doesn't support that command. (someday maybe)
@JackMilesFreeBSD Box with run is freezing.
With fifo_fix version all seems ok right now, no freezing.fifo_fix version fixed the problem, then. I'll submit the patch.PseudoCylon, btw, why maximum speed is about 11mbit in g mode?How did you get the number, withifconfig wlan0 list staor used some packet sniffer? (Power save mode is still of, isn't it?)
HighTower
February 1st, 2011, 10:33
@PseudoCylon
ok, I can live with current issues about power and channel
but what is really makes me craze is that after reboot AP doesn't work... run0 and wlan0 are created and have "running" status, wireless led is blinking as in normal situation, but AP is not seen and can't be connected to (((
I've tried to play with usconfig + power_off + power_on on wireless device - no result:
hostapd forcestop
ifconfig wlan0 destroy
kldunload if_run
kldunload runfw
usbconfig -u 3 -a 1 power_off (or reset)
...
usbconfig -u 3 -a 1 power_on
kldload runfw
kldload if_run
but no run0 device is created and NO messages on console (
PseudoCylon
February 3rd, 2011, 00:39
If I have opened AP, it is visible by clients, clients can connect to it and traffic goes..
but then I call
/etc/rc.d/hostapd forcestart
my AP just simply dissapears, clients do not see it and can't connect
but wireless led continue blinking as in normal situation
I've tried commands:
ifconfig wlan0 list sta
ifconfig wlan0 list scan
ifconfig wlan0 down
all of them were executed with no delay and no output ((agree, strange...
iPhone 4 and smartphones with WinMobile 6 - do it this way
WinXP - no...but what is really makes me craze is that after reboot AP doesn't work... run0 and wlan0 are created and have "running" status, wireless led is blinking as in normal situation, but AP is not seen and can't be connected to (((Just recapping what we are on.
Combine all of the above, AP fails only
- on reboot (works on cold start) with hostapd (open ap works),
- fails with cell phones (works OK with XP)
correct?
This debug message (http://forums.freebsd.org/showpost.php?p=120352&postcount=231) was collected when AP wasn't visible, wasn't it?
HighTower
February 3rd, 2011, 09:23
Just recapping what we are on.
Combine all of the above, AP fails only
- on reboot (works on cold start) with hostapd (open ap works),
- fails with cell phones (works OK with XP)
correct?
This debug message (http://forums.freebsd.org/showpost.php?p=120352&postcount=231) was collected when AP wasn't visible, wasn't it?
now exactrly... in my case:
- after cold start (then power cord was removed for several minutes) AP start and work normally in opened mode as well as with hostapd
cell phones see it and can connect with no promles (same as pc and notebooks)
- after reboot or shutdown and start again (if power cord was connected) - run0 and wlan0 devices are created and have "running" status, but AP can't be found by any client (while scan) and clients can't connect to it.. doesn't matter AP is opened or with hostapd
not I'm not sure then was debug messaged made, so lated today I'll post debug after reboot then AP is not visible...
JackMiles
February 3rd, 2011, 17:52
@JackMilesfifo_fix version fixed the problem, then. I'll submit the patch.How did you get the number, withifconfig wlan0 list staor used some packet sniffer? (Power save mode is still of, isn't it?)
Sniffer trafshow on wlan0. Actual download time of 100mb file looks like trafshow is absolutely right about speed. Power-saving mode is off, of course.
b.t.w, it's not a driver issue, but maybe you can help. I want my FreeBSD AP to stop scanning other devices, so it will look like "no tx packets at all if noone trying to connect directly to my AP, just waiting for rx". Is it possible ?
HighTower
February 3rd, 2011, 17:55
here are debug messages after reboot...
there are only few lines after several minutes...
PseudoCylon
February 9th, 2011, 06:20
@HighTower- after reboot or shutdown and start again (if power cord was connected) - run0 and wlan0 devices are created and have "running" status, but AP can't be found by any client (while scan) and clients can't connect to it.. doesn't matter AP is opened or with hostapd
not I'm not sure then was debug messaged made, so lated today I'll post debug after reboot then AP is not visible...This is a restarting issue I have from the beginning. Some how the device with RF2020 radio chip (one your device has) cannot Rx at all after restarting. 80211 stack thinks no one is around. I spent hours looking into ralink's code and poking different registers, but no luck. Sorry. But some time I suddenly find the solution while working on other issues. When you find some info, let me know.
@JackMilesSniffer trafshow on wlan0. Actual download time of 100mb file looks like trafshow is absolutely right about speed. Power-saving mode is off, of course.At my house, I can get 30mbps including all packet headers if amrr keeps tx rate at the max, 54mpbs. If Tx rate gets lowered, though put gets lowered, too.b.t.w, it's not a driver issue, but maybe you can help. I want my FreeBSD AP to stop scanning other devices, so it will look like "no tx packets at all if noone trying to connect directly to my AP, just waiting for rx". Is it possible ?I'm not sure if it works with AP, but disabling bgscanifconfig wlan0 -bgscanmight do the trick. Or you can add tircky code likeif (ic->ic_flags & IEEE80211_F_SCAN)
goto skip_tx;If you completely silent AP (i.e. stop beacon), nothing will work. You need to find the way to wake AP up.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
0