# Any chance to bring up Realtek RTL8191SE wireless network card?



## bxbzq (Mar 12, 2021)

Hi there,
I have very limited experience on FreeBSD.
Now I'm working on installing 12.2-release or 13.0-RC1 on a Thinkpad T400 and having trouble with wireless network card.
Realtek RTL8191SE is detected by `# pciconf -lv`:

```
none1@pci0:3:0:0:       class=0x028000 rev=0x10 hdr=0x00 vendor=0x10ec device=0x8172 subvendor=0x10ec subdevice=0xe020
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8191SEvB Wireless LAN Controller'
    class      = network
```
But dmesg could not identify anything about this chip.

Just to try if any luck, I go ahead add following to /boot/loader.conf:

```
if_rsu_load="YES"
if_rtwn_load="YES"
```

And following to /etc/rc.conf:

```
wlan0_rsu0="wlan0"
wlan1_rtwn0="wlan1"
ifconfig_wlan0="WPA SYNCDHCP"
ifconfig_wlan1="WPA SYNCDHCP"
create_args_wlan0="country US"
create_args_wlan1="country US"
```
Reboot, clearly no wlan0 or wlan1 or rsu0 or rtwn0 is found during booting. By # kldstat, I can see if_rsu.ko is loaded, while nothing about rtwn is loaded. Manually load via # kldload rtwn, restart network service. No magic.

It appears this specific chip is not in the "Hardware Compatibility List", but is it still possible to drive it without professional configuring or programming efforts?
dmesg info as attached.


----------



## bxbzq (Mar 18, 2021)

Hi there,

Not sure if this is the way. After reading the handbook section 12.5.1.1, I want to give a try. I found the driver for this RTL8191SE chip for WinXP64. I run ndisgen, it says:"
This .INF file appears to be Unicode.
Trying to convert to ASCII...
Iconv: iconv(): Illegal byte sequence
Done.
"
In next page:"
I don't recognize this file format. It may not be a valid .SYS file.
Press enter to try again, or ^C to quit.
"
Basically the ndisgen doesn't validate the 2 driver files.

Any clue?


----------



## Mjölnir (Mar 18, 2021)

Try converters/recode instead of iconv(1)?


----------



## tingo (Mar 19, 2021)

Do yourself a favor: forget that ndis(4) has ever existed. It is old (from the days of Windows XP or before), and the only stories in recent times are from people who have failed to get it working.
TL;DR - if your network card isn't working because it doesn't have a FreeBSD driver (yet), get a supported network card.


----------



## bxbzq (Mar 19, 2021)

Thanks for the tip and advice.

Finding ways to convert unicode to ASCII is easy, and I just did. Then the .sys file is still not recognized by ndisgen.

Digging some past threads in this forum, I just bought a usb wireless dongle, TP WN725N, couple of days ago. It's unfortunately a quite new version, (called driver free for Windows?). If I recall correctly, dmesg recognises it as CD driver from Realtek. In Windows it first shows like a memory stick and there is a .exe file in it. After you execute the file then it acts as a dongle. While I'm returning it and looking for other supported card, i'm still testing my luck on the 8191SE.


----------



## aponomarenko (Mar 19, 2021)

Unfortunately, no one has managed to get it working on BSD yet: https://bsd-hardware.info/?view=search&name=RTL8191SE#list

A best BSD-way to get it working is to use WiFi driver in Linux VM under bhyve. See: https://www.davidschlachter.com/misc/t480-bhyve-wifi-pci-passthrough

The post is about Intel 8265 WiFi chip, but the same should work for RTL8191SE as well:

_"WiFi speeds for the Intel Wireless 8265 chip on FreeBSD are currently limited to 802.11g speeds (54 Mbit/s). However, the chip is capable of 802.11ac on Linux and Windows. To use the wireless card at full speed, I’ve tested using PCI passthrough to make the card available to a Linux virtual machine, then creating a NAT connection from the Linux VM to the FreeBSD host. This has been tested on FreeBSD 13.0-CURRENT (revision 356244, Dec 31 2019) on a Lenovo T480."_


----------

