# Wireless urtw not working...



## outsid3r (Mar 21, 2010)

Hi everyone,

My problem is:

I have a realtek wireless on my laptop (rtl8187b), and freebsd recognizes it well if i enable the correct module in loader.conf, so my loader.conf file is:


```
if_urtw_load="YES"
wlan_wep_load="YES"
wlan_tkip_load="YES"
wlan_ccmp_load="YES"
```

I also enabled cryptographic modules because i will need to use WEP or WPA.

Then i do: `sudo ifconfig wlan0 create wlandev urtw0` to create wlan0. After that, i can't scan any network and do anything with the wireless. The status of wlan0 is set to no carrier.

I have tried to use wireless on OpenBSD and everything worked fine, somehow it also should work on FreeBSD.

Help is greatly appreciated.


----------



## outsid3r (Apr 2, 2010)

so, nobody to help? ...


----------



## richardpl (Apr 2, 2010)

You forgot to put interface UP.


----------



## outsid3r (Apr 3, 2010)

what you mean with interface UP?


----------



## richardpl (Apr 3, 2010)

You need to give more info if you want help.


----------



## outsid3r (Apr 4, 2010)

The objective is straight, i need to use my wireless under freebsd to connect to router, so i can have internet with wireless, not just with cable.

This is the wireless at the start:


```
urtw0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:22:43:90:5f:65
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
```


Then, i do:

[cmd=]sudo ifconfig wlan create wlandev urtw0[/cmd]

But the state of the wireless is still "no carrier", i can't scan networks and do anything with it.

There is the description:


```
urtw0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:22:43:90:5f:65
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier

wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:22:43:90:5f:65
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
	ssid "" channel 1 (2412 Mhz 11b)
	country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
	bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 1
	bintval 0
```

Any help?


----------



## outsid3r (Apr 4, 2010)

i forgot to tell, if i do:

# ifconfig wlan0 up

it becomes:


```
urtw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:22:43:90:5f:65
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
	status: associated
```


----------



## DutchDaemon (Apr 5, 2010)

Format your posts correctly, please.


----------



## kpedersen (Apr 5, 2010)

```
status: associated
```

Congrats, mission complete.

Now just do *dhclient wlan0* and if you have a normal home style wireless router, chances are you will get an IP and you can now continue your FreeBSD adventure whilst on the toilet


----------



## outsid3r (Apr 5, 2010)

no, i still can't get any scan results from wlan0, without it i can't do anything. this is strange... urtw0 is associated but wlan0 still with no carrier status.


----------



## richardpl (Apr 6, 2010)

Tried *list scan*?


----------



## outsid3r (Apr 6, 2010)

Thank you richard, it worked! I think i did this before but didn't worked for some reason... but now it worked. But there is still some problem, list scan works but scan not, i can't initiate a new scan... and another problem is, if i use list scan i can't see the full name of the network:


```
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
Belkin_N_Wi...  00:22:75:01:9c:27    6   54M -49:-95  100 EP   WPA RSN MESHCONF MESHCONF WPS HTCAP WME
DLink-B6CBE8    00:24:01:b6:cb:e8    6   54M -53:-95  100 EPS  WPA WME ATH
```

I need to see the full name of the Belkin network... how i do that?


----------



## richardpl (Apr 6, 2010)

Dude RTFM seriously here is the link: ifconfig(8)

Your Homework:
Add -v flag to ifconfig for bloated scan results.
No need to use active scan if bacground scanning is already enabled.
Scan results are updated all the time with 80211 FreeBSD api if you use default roaming parameters, for more details read manual page linked above.


----------



## outsid3r (Apr 6, 2010)

yea i have tried that and it works, thanks. there is any kind of command like on openbsd to generate the wpapsk?


----------



## outsid3r (Apr 7, 2010)

forget it, i already discovered, thanks for everything.  I configured wpa_supplicant and now i have wireless on freebsd working perfectly. How i mark this post as solved?


----------



## rewired (May 23, 2010)

Hi all, can you help me with my urtw device? I whant to config it how an Access Point on my router on FreeBSD 8 Stable, but after all configs wlan0 is no carrier.

```
urtw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:14:d1:48:59:74
        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:14:d1:48:59:74
        inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid heaven channel 11 (2462 Mhz 11g)
        country US authmode OPEN privacy OFF deftxkey 3 AES-CCM 3:128-bit
        txpower 0 bmiss 7 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
        roam:rssi 7 roam:rate 5 protmode CTS bintval 0
```
what could be wrong?
Thanx, regards.


----------



## outsid3r (May 24, 2010)

check if your wpa key is correct, generate one with wpa_passphrase. Are you trying to access by dhcp?


----------



## rewired (May 24, 2010)

I'm trying to connect by dhcp but network is not visible, because status: no carrier, i guess. wpa key is correct


----------



## outsid3r (May 25, 2010)

You need to do the following:

pre-compute an entry with wpa_passphrase, and send the output to a file named wpa_supplicant.conf at */etc.*


```
#echo wpa_passphrase ssid passphrase > /etc/wpa_supplicant.conf
```

note: the file must look like


```
network {
    ssid="some ssid" 
    psk="generated key"
}
```

now, edit your /etc/rc.conf and add the following lines:


```
wlans_urtw0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

this auto-configures your wireless each time your system boots.
now restart your computer and everything should work.


----------

