[SOLVED] hostapd and WPA/WPA2 not working

Moderators: Oren.R, fradensky

r.pantaleoni
Posts: 4
Joined: Fri Sep 09, 2016 12:31 pm

[SOLVED] hostapd and WPA/WPA2 not working

Postby r.pantaleoni » Wed Oct 05, 2016 6:29 am

Good morning,
I have reconfigured and recompiled Yocto following your guide.
The system works correctly but hostapd.
The Wilink8 (WL1837) kernel modules are loaded and working.
If hostapd is configured with no security everything works fine.
When I configure WPA/WPA2 security (you can find the hostapd.conf file below), hostapd brings the wlan1 interface up, broadcasts the SSID and then, because of the following nl80211 error, quits.
nl80211: set_key failed; err=-22 Invalid argument) (if wpa_pairwise=TKIP)
or
nl80211: set_key failed; err=-2 No such file or directory) (if wpa_pairwise=CCMP)

The following modules are loaded:
root@varsomam33:/usr/share/wl18xx# lsmod
Tainted: G
ipt_MASQUERADE 911 1 - Live 0xbf178000
nf_nat_masquerade_ipv4 2497 1 ipt_MASQUERADE, Live 0xbf174000
iptable_nat 1655 1 - Live 0xbf170000
nf_conntrack_ipv4 11393 1 - Live 0xbf169000
nf_defrag_ipv4 1328 1 nf_conntrack_ipv4, Live 0xbf165000
nf_nat_ipv4 5268 1 iptable_nat, Live 0xbf160000
nf_nat 14117 2 nf_nat_masquerade_ipv4,nf_nat_ipv4, Live 0xbf157000
nf_conntrack 74731 4 nf_nat_masquerade_ipv4,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat, Live 0xbf139000
ip_tables 10876 1 iptable_nat, Live 0xbf132000
x_tables 16976 2 ipt_MASQUERADE,ip_tables, Live 0xbf128000
wl18xx 90657 0 - Live 0xbf108000
wlcore 180949 1 wl18xx, Live 0xbf0ce000
mac80211 359682 2 wl18xx,wlcore, Live 0xbf05f000
cfg80211 219517 3 wl18xx,wlcore,mac80211, Live 0xbf017000
wlcore_sdio 6181 0 - Live 0xbf00d000
cryptodev 33654 1 - Live 0xbf000000 (O)

This is the hostapd.conf file.
interface=wlan1
driver=nl80211
channel=0
hw_mode=g
preamble=1
dtim_period=2
beacon_int=100
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
supported_rates=10 20 55 110 60 90 120 180 240 360 480 540
basic_rates=10 20 55 110
ssid=Smart4G_Linux
max_num_sta=5
macaddr_acl=0
auth_algs=2
ieee80211d=0
uapsd_advertisement_enabled=1
#wep_rekey_period=0
own_ip_addr=192.168.100.1
#wpa_group_rekey=0
#wpa_strict_rekey=0
#wpa_gmk_rekey=0
#wpa_ptk_rekey=0
ap_table_max_size=255
ap_table_expiration_time=60
#eap_server=1
disassoc_low_ack=1
ap_max_inactivity=4294967295
country_code=IT
wpa=3
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
wpa_passphrase=1234567890
#rsn_pairwise=CCMP

In the demo bsp everything works fine, so it's my fault obviously.
But I can't understand what I am doing wrong.

The demo kernel is 3.14, mine is 4.1.

Thank you.
Raffaele Pantaleoni

P.S.:I forgot to mention that I am working on a VAR-SOM-AM33 DVK.

[SOLVED]
I had to reconfigure and recompile kernel and modules , the standard configuration didn't include the rfkill module that was missing.

willdye
Posts: 1
Joined: Tue Aug 23, 2016 3:52 pm

Re: [SOLVED] hostapd and WPA/WPA2 not working

Postby willdye » Thu May 04, 2017 7:33 pm

Thanks for taking the time to add the update explaining how you solved the problem yourself. Just to be clear: the only change you had to make was to add rfkill?

r.pantaleoni
Posts: 4
Joined: Fri Sep 09, 2016 12:31 pm

Re: [SOLVED] hostapd and WPA/WPA2 not working

Postby r.pantaleoni » Mon May 29, 2017 9:10 am

willdye wrote:Just to be clear: the only change you had to make was to add rfkill?

Exactly.


Return to “Yocto”

Who is online

Users browsing this forum: No registered users and 1 guest