Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #3 reintroduced on in-kernel driver #22

Closed
rafaelmartins opened this issue Nov 17, 2013 · 43 comments
Closed

Issue #3 reintroduced on in-kernel driver #22

rafaelmartins opened this issue Nov 17, 2013 · 43 comments

Comments

@rafaelmartins
Copy link

Hi,

it seems that the same problem reported in #3 was reintroduced on the in-kernel version of this driver.

I had to build 3695d58 manually to get hostapd working.

The error is exactly the same of #3, then I'm not attaching any logs, just asking you to check if that fix made it way to the mainline kernel.

[]s

@rafaelmartins
Copy link
Author

Running 3.12.0, btw

@lwfinger
Copy link
Owner

Sorry. I forgot to send that fix upstream. It is now done, but it will take a week or so to be backported to 3.12.1 or 2.

@rafaelmartins
Copy link
Author

No problem, thanks for maintaining this driver :)

@uglobster
Copy link

Hello. i can't build soft AP with rtl8188eu driver too.
I have Raspbian on RaspPi and TP-Link TL-WN725N V2 with 8188eu chipset. Kernel version 3.6.11+. I take kernel source by this guide https://gist.github.com/azbesthu/3893319 .
I take your source and build driver for apdapter successful. It's work. I can connect to Wifi network. After them i try build soft AP by hostapd from Realtek sources RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911 . Hostapd start with critical error. Can you help me? In log i see that hosapd ask driver with unrecognised commands:

root@myraspihost:~# hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0xfa4648
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
...skipped..
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr f8:1a:67:2b:89:7c and ssid 'RPI_AP'
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, RPI_AP,6
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
rtl871x_set_acl
Failed to set beacon head/tail or DTIM period
wlan0: Setup of interface done.
random: Got 20/20 bytes from /dev/random

iwconfig:

root@myraspihost:~# iwconfig
wlan0     unassociated  Nickname:""
          Mode:Master  Frequency=2.412 GHz  Access Point: Not-Associated
          Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

/etc/network/interfaces

root@myraspihost:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
        address 192.168.13.1
        netmask 255.255.255.0

/etc/hostapd/hostapd.conf

root@myraspihost:~# cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=rtl871xdrv
ssid=RPI_AP
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0

@lwfinger
Copy link
Owner

I think your hostapd is too new. I just committed a version of hostapd-0.8 and a sample configuration file (rtl_hostapd.conf) that works for me.

@uglobster
Copy link

Thanks and sorry but hostapd source dir don't have .config file. And i can't build daemon.

root@myraspihost:/usr/local/src/rtl8188eu/hostapd-0.8/hostapd# make
Building hostapd requires a configuration file
(.config). See README for more instructions. You can
run "cp defconfig .config" to create an example
configuration.
make: *** [verify_config] Error 1
root@myraspihost:/usr/local/src/rtl8188eu/hostapd-0.8/hostapd#

after i create default .config i receive next error message

../src/crypto/tls_openssl.c:23:25: fatal error: openssl/ssl.h: No such file or directory
compilation terminated.

@rafaelmartins
Copy link
Author

Can't you read the error message? :(

"Building hostapd requires a configuration file
(.config). See README for more instructions. You can
run "cp defconfig .config" to create an example
configuration."

Looks quite obvious :)

@uglobster
Copy link

I edit my post. With default config i can't build hostapd too

@rafaelmartins
Copy link
Author

Sorry, I just got the first part of your post in my mailbox, re-reading it here I saw that you created the file, but it seems that you don't have openssl headers installed. You may found an openssl-dev package on your distro, or something like that.

@uglobster
Copy link

This is strange for me because all other distributions hostapd not require this library.

@rafaelmartins
Copy link
Author

No, it isn't. hostapd requires openssl but it is bundled with most of the hostapd distributions. I think that @lwfinger removed all the bundled dependencies from the hostapd dir in the repository, and this is quite reasonable :)

@uglobster
Copy link

i try build with open ssl library.

apt-get install libcurl4-openssl-dev
cp defconfig .config
make clean
make

I then replaced in the file rtl_hostapd.conf interface to my 'wlan0' and tried to run:

root@myraspihost:/usr/local/src/rtl8188eu/hostapd-0.8/hostapd# ./hostapd ../../rtl_hostapd.conf
Configuration file: ../../rtl_hostapd.conf
Line 20: unknown configuration item 'wps_state'
Line 22: unknown configuration item 'uuid'
Line 26: unknown configuration item 'device_name'
Line 30: unknown configuration item 'manufacturer'
Line 34: unknown configuration item 'model_name'
Line 38: unknown configuration item 'model_number'
Line 42: unknown configuration item 'serial_number'
Line 55: unknown configuration item 'device_type'
Line 59: unknown configuration item 'os_version'
Line 63: unknown configuration item 'config_methods'
Line 68: invalid/unknown driver 'rtl871xdrv'
Line 71: unknown configuration item 'ieee80211n'
Line 73: unknown configuration item 'ht_capab'
13 errors found in configuration file '../../rtl_hostapd.conf'

This sources don't compatible with driver rtl8188eu :( ...

@uglobster
Copy link

I think the main trouble is in the first lines of log:

Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x646600
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.

hostapd try to connect with driver by IOCTL, but driver not supported it method

@lwfinger
Copy link
Owner

In the git repo is a file rtl_hostapd.conf. You must edit that file for your case and use it. The hostapd for any other version of hostapd WILL NOT WORK!

The reason that openssl is not needed in most cases with using hostapd is because your distro builds it, and I will not include it in this repo. If I did, then I would have to maintain it here, and I am unwilling to do that.

@uglobster
Copy link

@lwfinder thank's for answer. But i try build from your source hostapd and try run with your conf file. And upper i put log with error's. hostapd don't understand too many options in the conf file :(

@lwfinger
Copy link
Owner

Sorry, I failed to check that hostapd's defconfig matched the .config that I was using. The latter is excluded from the repo. Do another 'git pull' and copy defconfig to .config in the hostapd directory, then 'make clean && make'.

On my system, I get:

finger@larrylap:~/rtl8188eu> sudo hostapd-0.8/hostapd/hostapd rtl_hostapd.conf
Configuration file: rtl_hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x668bf0
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlp0s2f1u2 with hwaddr a0:f3:c1:15:41:cf and ssid 'rtwap'
WPS: Converting display to virtual_display for WPS 2.0 compliance
WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
rtl871x_set_beacon_ops
rtl871x_set_wps_assoc_resp_ie
rtl871x_set_wps_beacon_ie
rtl871x_set_wps_probe_resp_ie
rtl871x_set_key_ops
rtl871x_set_beacon_ops

@uglobster
Copy link

@lwfinger Thank's. I repeat you commands but without result:

root@myraspihost:/usr/local/src/rtl8188eu# git pull
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 3), reused 5 (delta 3)
Unpacking objects: 100% (5/5), done.
From https://github.com/lwfinger/rtl8188eu
   e275d5b..c38abce  master     -> origin/master
Updating e275d5b..c38abce
Fast-forward
 hostapd-0.8/hostapd/defconfig |   34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)
root@myraspihost:/usr/local/src/rtl8188eu# cd hostapd-0.8/hostapd/
root@myraspihost:/usr/local/src/rtl8188eu# cd hostapd-0.8/hostapd/
root@myraspihost:/usr/local/src/rtl8188eu/hostapd-0.8/hostapd# cp defconfig .config
root@myraspihost:/usr/local/src/rtl8188eu/hostapd-0.8/hostapd# make clean && make
... skipped ...
  LD  hostapd
  CC  hostapd_cli.c
  CC  ../src/common/wpa_ctrl.c
  LD  hostapd_cli
root@myraspihost:/usr/local/src/rtl8188eu/hostapd-0.8/hostapd# ./hostapd ../../rtl_hostapd.conf
Configuration file: ../../rtl_hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x53f638
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Using interface wlan0 with hwaddr f8:1a:67:2b:89:7c and ssid 'rtwap'
WPS: Converting display to virtual_display for WPS 2.0 compliance
WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to initialize WPS Registrar
wlan0: Unable to setup interface.
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rmdir[ctrl_interface]: No such file or directory
ELOOP: remaining socket: sock=6 eloop_data=0x53f6a8 user_data=(nil) handler=0x29bf0
root@myraspihost:/usr/local/src/rtl8188eu/hostapd-0.8/hostapd#

Maybe the problem is the kernel?

root@myraspihost:~# uname -a
Linux myraspihost 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux
root@myraspihost:~#

My kernel from last distribution raspbian

@arne-e
Copy link

arne-e commented Nov 29, 2013

I'm getting exactly the same results... :( (could not connect to kernel driver)
compiled the kernel modules with the latest files...
iwlist is also finding my networks...

ifconfig shows:

wlan0     Link encap:Ethernet  HWaddr 64:66:b3:0e:44:be  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1058 errors:0 dropped:1000 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:525106 (512.7 KiB)  TX bytes:1480 (1.4 KiB)

but hostapd with the given rtl_hostapd.conf gives me:

random: Trying to read entropy from /dev/random
Configuration file: ../../rtl_hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x9cc638
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr 64:66:b3:0e:44:be and ssid 'rtwap'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     72 74 77 61 70                                    rtwap           
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
WPS: Use configured UUID - hexdump(len=16): 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0
WPS: Converting display to virtual_display for WPS 2.0 compliance
WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
WPS: Build Beacon IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Version2 (0x20)
WPS: Build Probe Response IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Response Type (3)
WPS:  * UUID-E
WPS:  * Manufacturer
WPS:  * Model Name
WPS:  * Model Number
WPS:  * Serial Number
WPS:  * Primary Device Type
WPS:  * Device Name
WPS:  * Config Methods (210c)
WPS:  * RF Bands (1)
WPS:  * Version2 (0x20)
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
WPS: Building WPS IE for (Re)Association Response
WPS:  * Version (hardcoded 0x10)
WPS:  * Response Type (3)
WPS:  * Version2 (0x20)
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to initialize WPS Registrar
wlan0: Unable to setup interface.
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rmdir[ctrl_interface]: No such file or directory
ELOOP: remaining socket: sock=6 eloop_data=0x9cc6a8 user_data=(nil) handler=0x29bf0

uname -a:

Linux raspi 3.10.19+ #600 PREEMPT Sat Nov 16 20:34:43 GMT 2013 armv6l GNU/Linux

@rafaelmartins
Copy link
Author

These kernels doesn't seems to be hostap-enabled

@lwfinger
Copy link
Owner

It is not set in mine either:

finger@larrylap:~> zcat /proc/config.gz | grep HOSTAP

CONFIG_HOSTAP is not set

finger@larrylap:~>

@uglobster
Copy link

i look make menuconfig. I found only one option about HostAP:
"Support downloading firmware images with Host AP driver ".
Option is not set.

I don't understand what i can to do for build soft AP from RasPI with my WLAN adapter. Or i must buy another ?

@uglobster
Copy link

Dear @lwfinger , i think i found little mistake in Makefile rtl8188eu. Firmeware copy to wrong destination /lib/modules/rtlwif. But real path must be /lib/firmware/rtlwifi

root@myraspihost:/usr/local/src/rtl8188eu# make install
install -p -m 644 8188eu.ko  /lib/modules/3.6.11+/kernel/drivers/net/wireless/
/sbin/depmod -a 3.6.11+
mkdir -p /lib/modules/rtlwifi
cp rtl8188eufw.bin /lib/modules/rtlwifi/.
root@myraspihost:/usr/local/src/rtl8188eu#

@lwfinger
Copy link
Owner

Fixed. Thank you.
.

@lwfinger
Copy link
Owner

I just committed changes that make the source in this repo match my kernel exactly. With this, I can make an AP using either the rtl_hostapd.conf file, or with a new script that I add, which is named control_ap.

To use the latter, you need to have dhcpd installed on your computer, and you need to edit the patch to the v0.8 hostapd. To start the AP, 'sudo ./control_ap start wlan0 eth0', where wlan0 is the actual name of the wireles device, and eth0 is the name of the interface that is connected to the Internet. To stop the AP, 'sudo ./control_ap stop'.

@arne-e
Copy link

arne-e commented Nov 30, 2013

Pulled the newest files from git.
build module again and also build hostapd again...
tried ./hostapd -dd ../../rtl_hostapd.conf
but i think its exactly the same error like before:

(ifconfig still shows the device so the kernel module seems to work?)

random: Trying to read entropy from /dev/random
Configuration file: ../../rtl_hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x1210638
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr 64:66:b3:0e:44:be and ssid 'rtwap'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     72 74 77 61 70                                    rtwap           
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
WPS: Use configured UUID - hexdump(len=16): 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0
WPS: Converting display to virtual_display for WPS 2.0 compliance
WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
WPS: Build Beacon IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Version2 (0x20)
WPS: Build Probe Response IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Response Type (3)
WPS:  * UUID-E
WPS:  * Manufacturer
WPS:  * Model Name
WPS:  * Model Number
WPS:  * Serial Number
WPS:  * Primary Device Type
WPS:  * Device Name
WPS:  * Config Methods (210c)
WPS:  * RF Bands (1)
WPS:  * Version2 (0x20)
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
WPS: Building WPS IE for (Re)Association Response
WPS:  * Version (hardcoded 0x10)
WPS:  * Response Type (3)
WPS:  * Version2 (0x20)
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to initialize WPS Registrar
wlan0: Unable to setup interface.
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rmdir[ctrl_interface]: No such file or directory
ELOOP: remaining socket: sock=6 eloop_data=0x12106a8 user_data=(nil) handler=0x29bf0

@lwfinger
Copy link
Owner

Did you try my script control_ap?

@arne-e
Copy link

arne-e commented Nov 30, 2013

yep...
but when i want to install dhcpd i always get "selecting udhcpd instead of dhcpd"...
Set the path in your script to udhcpd... Seems to make problems but, i think thats not the biggest problem.

ps fax shows after running control_ap that hostapd is running, but no WLAN is showing up on my iphone and macbook.

control_ap output:

./control_ap start wlan0 eth0
Starting AP mode for wlan0 at address 192.168.0.1
/usr/sbin/udhcpd: invalid option -- 'c'
BusyBox v1.20.2 (Debian 1:1.20.0-7) multi-call binary.

Usage: udhcpd [-fS] [CONFFILE]

DHCP server

    -f  Run in foreground
    -S  Log to syslog too

random: Trying to read entropy from /dev/random
Configuration file: /root/hostapd.conf
ctrl_interface_group=0
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x1eed640
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 11  Frequency: 2462 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr 64:66:b3:0e:44:be and ssid 'rtwap'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     72 74 77 61 70                                    rtwap           
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
wlan0: Setup of interface done.

@lwfinger
Copy link
Owner

Yes, udhcpd has a different control system. Debian has a strange way of packaging things, but package dhcp3-server is what you need.

@rafaelmartins
Copy link
Author

not related to the issue, but dnsmasq seems to be a better dhcp server for this purpose. I use it with success :)

@uglobster
Copy link

i try last commit with same result :(. Hostapd not work.

But i found missing hostap.ko driver in kernel modules tree.

root@myraspihost:/usr/local/src/rtl8188eu# modprobe /lib/modules/3.6.11+/kernel/drivers/net/wireless/hostap/hostap.ko  FATAL: Module /lib/modules/3.6.11+/kernel/drivers/net/wireless/hostap/hostap.ko not found.
root@myraspihost:/usr/local/src/rtl8188eu# insmod /lib/modules/3.6.11+/kernel/drivers/net/wireless/hostap/hostap.ko    Error: could not insert module /lib/modules/3.6.11+/kernel/drivers/net/wireless/hostap/hostap.ko: Unknown symbol in module

@lwfinger
Copy link
Owner

lwfinger commented Dec 2, 2013

It does for me, and there is not a single instance of hostapd.ko anywhere. It is not needed.

Did you try using my control_ap script?

@uglobster
Copy link

Yes. With same is not the best result

root@myraspihost:/usr/local/src/rtl8188eu# ./control_ap start wlan0 eth0
Starting AP mode for wlan0 at address 192.168.0.1
Internet Systems Consortium DHCP Server 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
Listening on LPF/wlan0/f8:1a:67:2b:89:7c/192.168.0.0/24
Sending on   LPF/wlan0/f8:1a:67:2b:89:7c/192.168.0.0/24
Sending on   Socket/fallback/fallback-net
random: Trying to read entropy from /dev/random
Configuration file: /root/hostapd.conf
ctrl_interface_group=0
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x162640
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 11  Frequency: 2462 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr f8:1a:67:2b:89:7c and ssid 'rtwap'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     72 74 77 61 70                                    rtwap
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
wlan0: Setup of interface done.
root@myraspihost:/usr/local/src/rtl8188eu#

May by try build custom kernel 3.10.19+ to me? Now i use 3.6.11+ .

@uglobster
Copy link

today update the kernel of my RasPi to version 3.10.21+. Rebuild driver rtl8188eu. My home Wlan connect with RasPi without problem. But hostapd not work with same errors in log:

root@myraspihost:/usr/local/src/rtl8188eu# ./control_ap start wlan0 eth0
Starting AP mode for wlan0 at address 192.168.0.1
Internet Systems Consortium DHCP Server 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
Listening on LPF/wlan0/f8:1a:67:2b:89:7c/192.168.0.0/24
Sending on   LPF/wlan0/f8:1a:67:2b:89:7c/192.168.0.0/24
Sending on   Socket/fallback/fallback-net
random: Trying to read entropy from /dev/random
Configuration file: /root/hostapd.conf
ctrl_interface_group=0
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0xb10640
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 11  Frequency: 2462 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr f8:1a:67:2b:89:7c and ssid 'rtwap'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     72 74 77 61 70                                    rtwap
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
wlan0: Setup of interface done.
root@myraspihost:/usr/local/src/rtl8188eu#

@rafaelmartins
Copy link
Author

I can confirm that this error happens with current source code

@uglobster
Copy link

May be need special wpa_supplicant? From Realtek?

@rafaelmartins
Copy link
Author

@uglobster I don't think so. It used to work for me, before all these crazy changes on the repository. An old changeset still works for me, actually.

@lwfinger
Copy link
Owner

lwfinger commented Dec 6, 2013

If you think there is a bad commit in the repo, then you need to bisect it to find the one that is wrong. See 'git bisect help'.

@rafaelmartins
Copy link
Author

Hi people, I'd like to share my frustration with you guys... :(

I don't want to create a host ap for a raspberrypi, like most of you seem to want. I just wanted to create it for my HP n54l server. After struggling for so long with this driver, with the way it is maintained and the recurrent breakages, I decided to just give up and buy something that actually works. As my device isn't short in resources like the raspberry, and I have a gigabit switch available for my wired network, I got a TP-LINK TL-WR702N router. It is small, can use power from an usb port, and the latest firmware supports Smart IP for the LAN IP, making it quite easy to use a single network for all of your devices. It is a really nice AP, and very cheap. I suggest it, if you can use it instead of this crappy device/driver.

And also, I'm pushing myself to not buy any other Realtek device in the future, they fail quite hard when "trying" to support linux. The poorly implemented drivers and the need of use a stone age patched version of hostapd makes it totally unusable, if you really care about something.

Sorry for the long rant.

[]s

@lwfinger
Copy link
Owner

lwfinger commented Dec 7, 2013

I am totally pissed off with you. I told you what to do if you think there is a problem with the driver. Do you do that? No.

With this and other similar kinds rants on other threads, you have convinced me to pull down this repo. It was only setup to provide a source of this driver until it was entered into the kernel. That happened 3 months ago!!! Thus, I kept the repo up only as a convenience. As it has now become too much of an inconvenience to me, it will be gone in 24 hours.

@MrEngman
Copy link

MrEngman commented Dec 7, 2013

Please everyone, calm down.

@lwfinger, don't forget everyone else using the repo, please.

MrEngman

@rafaelmartins
Copy link
Author

So, I'm unsubscribing from the threads I created. If my comments are the reason for delete the repository, you have no reasons anymore.

@lwfinger
Copy link
Owner

lwfinger commented Dec 7, 2013

They are. You report a bug that I do not see. How am I supposed to debug it? I ask you to bisect the code and tell me the bad commit. Instead, you rant about how awful Realtek is. BTW, I am not am employee of Realtek - just an unpaid volunteer trying to provide a community service!

@rafaelmartins
Copy link
Author

Unfortunately I ended up having this issue opened in a leftover tab of my browser, and saw your reply, despite having unsubscribed from this thread. I'm answering it, but this is my last comment on this thread, and I'll likely not see any new comment as well.

Just to clarify: My rant here wasn't directed at you, or maybe it was, at least partially. I know that you don't work for Realtek and that your contributions are unpaid, etc. I do the same for a few projects, like Gentoo Linux, but this doesn't makes me special, neither do you.

Look at my first comment on this thread... I can see a lot of value on your work. But there's not a lot of difference on something poorly maintained and something unmaintained, or something that doesn't even exists. Software is good when it works :)

My main, and somewhat unique, complain is with respect to the several changes that broke the driver, because if you don't have unit tests and regression tests, you can't start refactoring things blindly, or you'll certainly break things for people that doesn't have the same use case/setup as you.

Well, I don't want to teach your work, you know all of this, I'm sure.

So, yes, i could start bisecting the repo, and find the bad changeset, report it for you, etc. but the way the breakage happened pissed me off a lot, and I had no motivation for doing it. It was easier to go to the mall and spend 5 minutes choosing a device that is known to work on my setup.

I'm not going to use this driver anymore, but other people will. You don't need me to keep it going, obviously, but other people seems to need your driver, and you have at least 2 other people with the same issue here, and they can help you debugging it.

Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants