# Trying to get inbuilt WiFi working on Advent 4211 Netbook



## smnbldwn (Mar 24, 2022)

I have installed FreeBSD on an old Advent Netbook to dip my toe in the world of BSD having used Linux for a few years. The install went well and most things are now working but the built in RTL8187SE WiFi card does not work. Searching through the forums, I found a post from 2010 using NDIS: https://forums.freebsd.org/threads/rtl8187se-howto.17580/ . Is this still the best method under FreeBSD 13 or is there a BSD driver available now? Has anyone had any success porting drivers from Linux?


----------



## tingo (Mar 27, 2022)

1. NDIS is not usable anymore - it was slightly usable back in the time when winXP was the newest from Redmond.
2. Linux driver porting is hard and requires a lot of time. By the time you have mastered it, you are able to write a FreeBSD driver from scratch.
3. If your network card / chipset isn't supported - get a supported usb dongle for your laptop (yes, this is painful in many ways).

As for the "supported" part of your wireless chipset - the relevant parts of `pciconf -lv` will provide information that helps to decide if an easy fix exists, or if it is really unsupported. Example:

```
tingo@kg-core2:~ $ pciconf -lv | grep -B 3 network
re0@pci0:5:0:0:    class=0x020000 rev=0x0c hdr=0x00 vendor=0x10ec device=0x8168 subvendor=0x1458 subdevice=0xe000
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
```


----------



## smnbldwn (Mar 28, 2022)

```
none0@pci0:2:0:0:    class=0x028000 rev=0x22 hdr=0x00 vendor=0x10ec device=0x8199 subvendor=0x1462 subdevice=0x6894
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8187SE Wireless LAN Controller'
    class      = network
```

This is the appropriate readout. I am using a usb wifi at the moment but it would be nice to use the built-in one if possible.


----------



## SirDice (Mar 29, 2022)

There's support for RTL8187 with urtw(4), but this might be some variant that's not recognized.


----------



## smnbldwn (Mar 29, 2022)

Following the instructions, I added a line to the loader.conf file to load the utfw module but the RTL8187 still doesn't show up. When I plug in the USB WiFi dongle it is detected and works straight away. Is there an equivalent of modprobe in BSD as I remember having to do that in Linux to get some device to be detected and work?


----------



## SirDice (Mar 29, 2022)

smnbldwn said:


> When I plug in the USB WiFi dongle it is detected and works straight away.


_Some_ wireless drivers are already included with the GENERIC (default) kernel. Not all of them. Your USB dongle is likely one that's included in GENERIC. 



smnbldwn said:


> Is there an equivalent of modprobe in BSD as I remember having to do that in Linux to get some device to be detected and work?


You already did that by loading the kernel module. It is safe to assume the card isn't supported by that driver, it would have shown up if it was detected correctly.

Assuming you now have 13.0-RELEASE you could try the beta of 13.1-RELEASE. Don't know if it's been added, I haven't checked, but it's worth a shot.


----------



## Phishfry (Mar 29, 2022)

Running `pciconf -lv | grep -A 3 -b 2 network` is our networking modprobe.

Have you tried to load rtwn(4) as a last ditch effort?
`kldload if_rtwn_pci`

If it works:
/boot/loader.conf
if_rtwn_pci_load="YES"


----------



## smnbldwn (Mar 29, 2022)

```
$ pciconf -lv | grep -A 3 -b 2 network
grep: network: No such file or directory
```

I will try rtwn and see what happens. I doubt they will suddenly add a driver for a 2008 chipset now but worth a go I guess... This chipset didn't work at first in Linux either but I managed to find a driver for it. These computers were sold with either Windows XP or OPenSuse pre-installed back in the day.


----------



## smnbldwn (Mar 29, 2022)

Trying rtwn doesn't work either so I guess I'm sticking with my usb PiHut WiFi dongle. Thank you all for your suggestions.


----------



## Phishfry (Mar 29, 2022)

Sorry I did mess that one up.


smnbldwn said:


> $ pciconf -lv | grep -A 3 -b 2 network


Try:
`pciconf -lv | grep -B 3 network`


----------



## smnbldwn (Apr 2, 2022)

```
none0@pci0:2:0:0:    class=0x028000 rev=0x22 hdr=0x00 vendor=0x10ec device=0x8199 subvendor=0x1462 subdevice=0x6894
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8187SE Wireless LAN Controller'
    class      = network
```

This is the readout I get. Do you think there is any chance of finding a driver?


----------



## Phishfry (Apr 2, 2022)

Realistically no. I am not going to waste your time.
none0@ shows that no driver has recognized the device.


----------

