# Wireless must be restarted before it works



## paulfxh (Sep 5, 2011)

I've set up FreeBSD 8.2 with Gnome2 on my EeePC 901 on a 10GB partition. Everything works fine but I'm puzzled why my wireless connection just doesn't work unless I stop it and recreate the wlan0 network.

Here are some details:
1. This machine has a Ralink 2860 card for which no "official" driver exists.
2. But, I was able to get the source for a driver from here and compile to produce rt2860.ko
Then I used the commands

```
cp rt2860.ko /boot/modules/
chmod 555 /boot/modules/rt2860.ko
```
3. Next, add this line to /boot/loader.conf

```
rt2860.ko_load="YES"
```
4. Then, I added these two lines to /etc/rc.conf

```
wlans_rt28600="wlan0"
ifconfig_wlan0="WPA DHCP"
```
5 And created the file /etc/wpa_supplicant.conf with this content

```
ctrl_interface=/var/run/wpa_supplicant
     ctrl_interface_group=wheel
    
     network={
	     ssid="[I]my_access_point[/I]"
	     key_mgmt=WPA-PSK
	     psk="[I]access_point_password[/I]"
     }
```

After a reboot, wpa_supplicant is running and wlan0 exists. The command "ifconfig wlan0" shows this output

```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether xx:xx:xx:xx:xx:xx
	inet 192.168.1.7 netmask 0xffffff00 broadcast 192.168.1.255
	media: IEEE 802.11 Wireless Ethernet OFDM/48Mbps mode 11g
	status: associated
	ssid [I]my_access_point[/I] channel 11 (2462 MHz 11g) bssid xx:xx:xx:xx:xx:xx
	country US authmode WPA privacy ON deftxkey UNDEF TKIP 2:128-bit
	txpower 0 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250
	roam:rssi 7 roam:rate 5 protmode CTS wme burst roaming MANUAL
```

Looks good, but wifi doesn't work. A ping gives a "no route to host" error and I cannot retrieve web pages.
That is, until I run these two commands consecutively:

```
# /etc/rc.d/netif stop
# ifconfig wlan0 create wlandev rt28600
```

Now, wifi works perfectly.
But, I have no idea why it didn't work the first time. In particular, the output from "ifconfig wlan0" is exactly the same after the "re-create" as it was before.

Any suggestions?
Thanks


----------



## vermaden (Sep 5, 2011)

Sometimes You write *rt28600* and the other one *rt2860*, a typo in configs maybe?


----------



## paulfxh (Sep 5, 2011)

vermaden said:
			
		

> Sometimes You write *rt28600* and the other one *rt2860*, a typo in configs maybe?



Thanks for the reply but this is not an error.
The driver and the card have the 2860 (one zero) but the interface has an extra zero -- so 28600.
Just like the interface for atheros cards becomes ath0.


----------



## SirDice (Sep 5, 2011)

Contact the creator of this driver. It's not an official FreeBSD driver. Hence, any problems with it should be directed at the author of said driver.


----------



## paulfxh (Sep 5, 2011)

SirDice said:
			
		

> Contact the creator of this driver. It's not an official FreeBSD driver. Hence, any problems with it should be directed at the author of said driver.



Thanks for your reply.
The only reason for not immediately contacting the driver author is because it's not clear to me that the driver itself is the problem.
After all, once I re-create the interface, the driver works perfectly -- no problems at all.
However, if the FreeBSD cognoscenti on this forum believe that the only explanation for my experience is a driver fault, then contacting the author is the next step.


----------



## wblock@ (Sep 5, 2011)

Upgrade to 8-STABLE, which has had changes to the wireless code.  It's worth replacing DHCP with SYNCDHCP, although that doesn't look to be the problem.

If neither of those helps, contact the driver author (and also ask that the driver be renamed to not end in a number, which is unnecessarily confusing).


----------

