OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: agriff on September 22, 2020, 11:13:58 AM

Title: Configure RTL8188CE Wifi Adapter
Post by: agriff on September 22, 2020, 11:13:58 AM
Hi,

New to OPNsense and trying it out on an old Shuttle XS35v2 I had lying around.

I'm trying to make the LAN available over the internal Wifi adapter, but can't get it to work.

The driver is loaded

rtwn0@pci0:3:0:0:   class=0x028000 card=0x817610ec chip=0x817610ec rev=0x01 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8188CE 802.11b/g/n WiFi Adapter'
    class      = network


I can manaully clone the device on the console and show caps reports the HOSTAP capability.

root@OPNsense: ~ # ifconfig wlan0 create wlandev rtwn0 wlanmode hostap
root@OPNsense: ~ # ifconfig wlan0 list caps
drivercaps=591c541<STA,FF,IBSS,HOSTAP,SHSLOT,SHPREAMBLE,MONITOR,WPA1,WPA2,WME>
cryptocaps=b<WEP,TKIP,AES_COM>
htcaps=7002c<SHORTGI20>


But then I hit a dead end trying to get it configured within the GUI. If I destroy the cloned interface I have manually created then nothing shows up under Interfaces -> Wireless -> Devices. If I have the cloned interface created manually it does appear under Interfaces -> Wireless -> Devices, but if I try to add it I get an error,

"Error creating interface with mode Infrastructure (BSS). The wlan0 interface may not support creating more clones with the selected mode."

Am I doing something wrong here, or is my hardware just not supported?

Thanks,

Alan
Title: Re: Configure RTL8188CE Wifi Adapter
Post by: agriff on September 22, 2020, 11:08:09 PM
To answer my own question, it appears to be a bug.

https://github.com/opnsense/core/blob/cf1f4e00b9a85332a4bd71604aa6086bc8ad3b91/src/etc/inc/interfaces.inc#L96 (https://github.com/opnsense/core/blob/cf1f4e00b9a85332a4bd71604aa6086bc8ad3b91/src/etc/inc/interfaces.inc#L96)

The realtek device name, rtwn, is missing from the wireless regex. I manually edited this on my installation and everything started working.
Title: Re: Configure RTL8188CE Wifi Adapter
Post by: franco on September 23, 2020, 01:25:09 PM
Hi Alan,

Thanks for the find. I've reworked the code a little and added all the interfaces that seem to be missing as per the manual page in FreeBSD section 4 including rtwn(4).

https://github.com/opnsense/core/commit/a4bcbd5a9


Cheers,
Franco
Title: Re: Configure RTL8188CE Wifi Adapter
Post by: psassaroli@gmail.com on November 25, 2020, 08:58:24 AM
Franco,

It looks like updating to version 20.7.4 the src/etc/inc/interfaces.inc lost the interfaces, in my case cannot assign rtwn to wifi but the adapter is clearly installed.

Regards
Paolo