pritambaral / hostapd-rtl871xdrv

Hostapd driver for RTL8188{C|CU|CUS} wifi chips.
176 stars 43 forks source link

SSID not hidden when ignore_broadcast_ssid is set to 1 #12

Closed jgornick closed 8 years ago

jgornick commented 8 years ago

hostapd 2.5 with the following configuration:

ctrl_interface=/var/run/hostapd.wlan0
ctrl_interface_group=netdev
interface=wlan0
driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8188CUS
manufacturer=Realtek
ssid=MySSID
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=1
wpa=2
wpa_passphrase=MyPassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

with the following device

ID 20f4:648b TRENDnet TEW-648UBM 802.11n 150Mbps Micro Wireless N Adapter [Realtek RTL8188CUS]

the SSID is still broadcasted as MySSID.

Is there something I'm missing in my configuration or does the device not support that?

Thanks!

pritambaral commented 8 years ago

The driver does support it. I don't know about the device you have, because I don't have it myself. Could you check if your build has somehow removed support for it by running: strings /path/to/hostapd | grep rtl871x_set_hidden_ssid_ops ?

jgornick commented 8 years ago

@pritambaral It found the specified string. Any other ideas?

Thanks!

pritambaral commented 8 years ago

It found the specified string.

Then the routine that handles SSID handling options did get compiled in. This is unlikely to be a bug in this driver.

Are you building from a release version of hostapd?

jgornick commented 8 years ago

Yes, I built from the hostapd 2.5 tar.gz and applied the patch from this project.

Here are the steps I took to build hostapd:

# Get rtl8192cu (rtl871xdrv) hostapd and build
sudo apt-get install -y libnl-dev libssl-dev

# Remove any previous hostapd files
sudo apt-get purge -y hostapd
sudo rm /usr/local/bin/hostapd*
sudo rm /usr/bin/hostapd*
sudo rm /usr/sbin/hostapd*

wget http://w1.fi/releases/hostapd-2.5.tar.gz
git clone https://github.com/pritambaral/hostapd-rtl871xdrv.git

tar -xzvf hostapd-2.5.tar.gz
cd hostapd-2.5
patch -Np1 -i ../hostapd-rtl871xdrv/rtlxdrv.patch

cd hostapd

vi .config
    CONFIG_DRIVER_HOSTAP=y
    CONFIG_DRIVER_RTW=y
    CONFIG_IAPP=y
    CONFIG_RSN_PREAUTH=y
    CONFIG_PEERKEY=y
    CONFIG_IEEE80211W=y
    CONFIG_EAP=y
    CONFIG_ERP=y
    CONFIG_EAP_MD5=y
    CONFIG_EAP_TLS=y
    CONFIG_EAP_MSCHAPV2=y
    CONFIG_EAP_PEAP=y
    CONFIG_EAP_GTC=y
    CONFIG_EAP_TTLS=y
    CONFIG_WPS=y
    CONFIG_PKCS12=y
    CONFIG_IPV6=y
    CONFIG_IEEE80211N=y
    CONFIG_IEEE80211AC=y

make
sudo make install DESTDIR= BINDIR=/usr/sbin
pritambaral commented 8 years ago

Then I guess the hardware is ignoring the commands. To be sure, I'd modify the rtl871x_set_hidden_ssid_ops function in driver_rtw.c to print some debug info while it sends the command to the hardware. If it is indeed sending the commands, then the only logical possibility left is that the hardware is ignoring it.