# Wireless problem



## JonathanBSD (Apr 16, 2012)

*H*i all,

*I*'m a complete beginner in *Free*BSD systems and *I*'m having trouble getting my wireless to work. I am using FreeBSD 9.0 on a *T*oshiba l505 *S*atellite laptop which I think has a Realtek RTL819 wireless lan controller. *I*'ve looked at the handbook and added 
	
	



```
if_urtw_load="YES"
```
 in /boot/loader.conf and 
	
	



```
wlans_urtw0="wlan0"
```
 in rc.conf. *B*ut when I try and do `ifconfig wlan0 up scan` it says the device does not exist.

*A*gain *I*'m very new so tell me if you need any more details to be able to help! *I*s this card supported in freebsd FreeBSD 9 with that urtw driver? *A*lso, my home network uses
MAC filtering if that makes any difference, but the router already has my MAC address on its ok list.

I don't know if I should add that when I boot up I have to choose option 4 to disable the ACPI before I boot because ACPI never works enabled and gives me an error - not sure if that has anything to do with the wireless or not.


*T*hanks in advance.


----------



## bbzz (Apr 16, 2012)

JonathanBSD said:
			
		

> *H*i all,
> 
> *I*'m a complete beginner in *Free*BSD systems and *I*'m having trouble getting my wireless to work. I am using FreeBSD 9.0 on a *T*oshiba l505 *S*atellite laptop which I think has a Realtek RTL819 wireless lan controller. *I*'ve looked at the handbook and added
> 
> ...



`# kldstat`
lists loaded modules. See if the one you have is there.

Try manually creating wlan0 rather first, see what messages you get, if any. 
`# ifconfig wlan0 create wlandev urtw0 up`



> ... my home network uses
> MAC filtering if that makes any difference, but the router already has my MAC address on its ok list.



Why, what does this do?


----------



## JonathanBSD (Apr 16, 2012)

*T*thanks for the quick reply.

*kldstat* lists:

```
kernel
if_wi.ko
radeon.ko
drm.ko
```

and when I type 

`ifconfig wlan0 create wlandev urtw0 up`

I get the error message 


```
SIOCIFCREATE2: Device not configured
```

For your question as to why MAC filtering, because my modem doesn't have a WEP key so it was the only way to stop other people connecting to it.


----------



## bbzz (Apr 16, 2012)

Well there you go, you don't have driver loaded.
Load with 
`# kldload [driver]`

But I think that already in kernel.

So, the next most obvious question is, what makes you think you need that specific driver? 
Hit 
`# ifconfig`


----------



## JonathanBSD (Apr 16, 2012)

I thought I needed urtw as the ath0 didn't work and I read somewhere that realtek needs this driver.

*W*hen I try and *kldload* urtw it says 


```
can't load urtw: file exists
```

*O*utput from *ifconfig* is:


```
# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:26:6c:3d:b1:1b
        inet6 fe80::226:6cff:fe3d:b11b%re0 prefixlen 64 scopeid 0x1 
        inet 10.0.0.11 netmask 0xffffff00 broadcast 10.0.0.255
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING
 options=3<RXCSUM,TXCSUM>
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```


----------



## bbzz (Apr 16, 2012)

I don't see a wireless device there. re0 is Realtek wired.
What does this say
`# pciconf -lv`


----------



## JonathanBSD (Apr 16, 2012)

*T*hat shows this wireless card:


```
none1@pci0:2:0:0:       class=0x028000 card=0x818210ec chip=0x817210ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8191SEvB Wireless LAN Controller'
    class      = network
re0@pci0:3:0:0: class=0x020000 card=0xff1e1179 chip=0x813610ec rev=0x02 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8101E/RTL8102E PCI Express Fast Ethernet controller'
    class      = network
    subclass   = ethernet
```


----------



## wblock@ (Apr 16, 2012)

urtw(4) does not support the RTL8191.  ndisgen(8) is the only other option at present.


----------



## JonathanBSD (Apr 16, 2012)

Oh I see, I'll try and find some tutorials on that then.

One other thing, I cannot change the brightness of my laptop screen using the usual FN method, but I saw on other's posts people can change it by loading acpi_video then using a sysctl command to set the brightness level, would you happen to know what the command is?


----------



## JonathanBSD (Apr 17, 2012)

well I found this tutorial on using ndisgen to get my wireless card working:

http://faqs.pcbsd.org/index.php?action=artikel&cat=4&id=324&artlang=en


but I can't for the life of me find a website where I can download the windows drivers for it. Everywhere I look it's just Windows based installers. Do you have any ideas how to obtain the drivers to wrap in ndis?


----------



## JonathanBSD (Apr 17, 2012)

Well, I think I found the drivers, and made a .ko from them, I have been following this tutorial:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/config-network-setup.html

Everything loads great, however dmesg doesn't show any ndis0 device, and ifconfig confirms that the device doesn't exist. - does this mean that the drivers I downloaded are incorrect?


----------



## wblock@ (Apr 18, 2012)

Possibly.  If you're running amd64, the 64-bit Windows XP driver is needed.


----------

