OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: AssetBurned on November 07, 2016, 09:53:57 pm

Title: RTL8188 not in AP mode?
Post by: AssetBurned on November 07, 2016, 09:53:57 pm
Hi,

I'm currently trying to figure out why an RealTek RTL8188 USB WiFi stick is not able to be used in Access Point mode in OPNsense 17.1, but fine in FreeBSD 11.0-STABLE amd64.

First I thought it is an limitation of 16.7 but even with the update to the latest alpha it is still not able to choose that mode.
I am able to activate the Access Point mode with an RaLink RT5390 stick.

Could it be that FreeBSD 11 uses already Hosted 2.5 while the 17.1 still uses Hostapd 2.0 ?

The hostapd.conf I used in FreeBSD 11 is pretty short:

Code: [Select]
interface=wlan0
ignore_broadcast_ssid=0
channel=6
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=3
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
hw_mode=g
wmm_enabled=1
ssid=THETESTSSID
macaddr_acl=0
auth_algs=1
ieee8021x=0
wpa=2
wpa_passphrase=abcabcabcabc
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
rsn_pairwise=CCMP

And the only lines in the rc.conf related to the stick are:
Code: [Select]
#wireless
wlans_urtwn0="wlan0"
create_args_wlan0="wlanmode hostap"
hostapd_enable="YES"

CU AssetBurned
Title: Re: RTL8188 not in AP mode?
Post by: AssetBurned on November 07, 2016, 11:42:56 pm
Hi,

Ok that have been too many reinstalls and I confused myself.

So the RTL8188 sticks that I have (different brands) are detected in the console, but when I check the web interface (Wireless -> Device) there is no urtwn interface to select. An RaLink RT5390 stick seems to work fine.

If I however setup the RTL8188 in 16.7 and then perform the upgrade to 17.1.a then the RTL8188 will also allow me to select Access Point mode.

CU AssetBurned
Title: Re: RTL8188 not in AP mode?
Post by: franco on November 08, 2016, 09:07:43 pm
Hi AssetBurned,

It's not always clear how the WiFi adapters (think a few dozen chipsets) react in each case, dictated by the kernel code. *BSD is slower than Linux and less loaded with out-of-the-box support in such regards.

Glad to hear that 17.1.a seems to work better (make sure from the system info widget the underlying OS is really FreeBSD 11.0, not just the OPNsense package at 17.1.a). We still have a bit of work for wireless since the mode of operation changes from 10 to 11 and we haven't adapted the code yet. That's why it's an ALPHA, but we're hoping to tackle this once we go BETA.


Cheers,
Franco
Title: Re: RTL8188 not in AP mode?
Post by: AssetBurned on November 09, 2016, 03:07:53 pm
As far as I see it it should be up to date.

Well yes usually Linux is faster, but in this particular case BSD was faster.
Title: Re: RTL8188 not in AP mode?
Post by: depekavienna on November 27, 2016, 09:11:28 pm
Sorry for hijacking this thread for a question related to an RTL8188SU adapter:
I now have my OPNsense setup in a KVM/libvirt machine for two days, playing around with it, trying to get familiar with OPNsense.

I tried to pass the RTL8188SU through, as I've done that on pfSense before. The host machine (Ubuntu 16.04 Linux) recognizes the adapter (lsusb lists it). Drivers have been unloaded there. In OPNsense 16.7 "usbconfig list" only shows the emulated USB Hub, but no device connected to it. dump_info, set config etc don't make it appear either.
Googling for that behaviour gave some useless hints.

(rsu drivers actived according to rsu man page)

Any advise?

Thank you.
Title: Re: RTL8188 not in AP mode?
Post by: franco on November 28, 2016, 08:17:56 am
# kldload rsu

Maybe this will help?
Title: Re: RTL8188 not in AP mode?
Post by: depekavienna on November 29, 2016, 01:02:30 am
Yes and no.
Yes, I could load the driver manually. But I had problems loading the firmware manually. (Tried to set legal. ...=YES by sysctl, which apparently does not work this way.)
Yes, since I restrained for trying to autoload by manually editing /boot/loader.conf and used the GUI instead.
Yes, ifconfig rsu0 up throws no error anymore (before: IMEM issue...)
No, since 16,7 does not yet show the device in the dropdown list /interfaces_wireless_edit.php until I do
 ifconfig wlan0 create wlandev rsu0 on the console. Then again the GUI complains about not being able to assign any further clones, due to restrictions of the driver.

I'll play around a bit longer...

[OT]:
Also tried with an MT7601U. This works neither and I haven't found an approriate driver either.
Funny thing: the MT7601U listed by usbconfig list immediately - in contrary to the RTL8188SU
[/OT]