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

Greetings again,
It worked! :)

OK, for anyone else that may have had the same question I did;
If you replace every occurrence of:
Code:
%cd sys/...
with
Code:
%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:
Code:
[b]kldload runfw[/b]
firmware: 'runfw' version 1: 8192 bytes loaded at 0xc2c9054c

Code:
[b]#kldload if_run[/b]
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)
 
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:
Code:
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?
Code:
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
 
OK
I used the following:
Code:
[b]/boot/loader.conf[/b]
if_run_load="YES"
runfw_load="YES"
which loaded the drivers/devices

at the tty0
Code:
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
 
unable to connect...

Greetings,
Well, I think I've been able to sort most of it out.
Adding the following to /etc/rc.conf:
Code:
wlans_run0="wlan0"
wlan_wep_load="YES"
ifconfig_wlan0="ssid <my_net> wepmode on weptxkey 1 wepkey <my_key> DHCP"

results in the following:
Code:
[b]ifconfig[/b]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 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
 
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.
Code:
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: [B]associated[/B]
        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 0
Encryption kicks in after association. First you want to associate with an AP. When you see "associated"
# ifconfig wlan0 wepkey [color="Red"]1:0x[/color]<my_hex_key>
# dhclient wlan0
Then should see something like
Code:
DHCPREQUEST 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.
 
Greetings PseudoCylon, and thank you very much for your informative reply.
I followed your instructions, but was unable to connect.
FWIW
Code:
[b]/boot/loader.conf[/b]
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:
Code:
[b]# ifconfig wlan0[/b]
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
Code:
[b]# dhclient wlan0[/b]
wlan0: no link .............. giving up

Here's additional output
Code:
[b]# ifconfig[/b]
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
 
g_willikers said:
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.

g_willikers said:
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.
 
PseudoCylon said:
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.

PseudoCylon said:
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.
 
Hello again PseudoCylon,
Here's what I did
Code:
ifconfig wlan0 destroy
ifconfig wlan create wlandev run0
ifconfig wlan0 ssid <my_net> wepmode on weptxkey 1
ifconfig wlan0 up
[b]waited 2.5 minutes[/b]
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
 
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
 
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:
Code:
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
 
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
 
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
 
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.
g_willikers said:
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
 
PseudoCylon said:
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!

PseudoCylon said:
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

PseudoCylon said:
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 [cmd=]ifconfig wan0 destroy[/cmd], then plug
the USB dongle back in - correct?

PseudoCylon said:
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) 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
[cmd=]# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf[/cmd]
Which at several points indicated an association in the status field,
otherwise no carrier

PseudoCylon said:
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
 
g_willikers said:
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) 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
OK. 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.
 
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 :)

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
 
g_willikers said:
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.
g_willikers said:
that might shed some light on why I'm unable to get the desired communication with it through run0/wlan0/wpa_supplicant
I'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.
 
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
 
Hope I'm replying early enough.
g_willikers said:
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.conf
Code:
network={
  ssid="<my_net>"
  psk="<my_key>"
}
<my_key> is exactly the same as you have typed into W801. No need to use wpa_passphrase(8)
 
PseudoCylon said:
Thanks. I'm looking forward to having a patch.

I have found some bugs, too. Check the repository, 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!
 
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.
 
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.
 
Back
Top