Configure RTL8188CE Wifi Adapter

Started by agriff, September 22, 2020, 11:13:58 AM

Previous topic - Next topic
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

To answer my own question, it appears to be a bug.

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.

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

November 25, 2020, 08:58:24 AM #3 Last Edit: November 25, 2020, 09:45:53 AM by psassaroli@gmail.com
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