1

First off I don't know if this the right forum to ask this in. If you know a better one, please let me know and I will post it there, don't just downvote the question...

I have an older embedded Linux device that uses hostapd as its access point mode, with the following hostapd.conf file:

ctrl_interface=/var/run/hostapd
interface=uap0
driver=nl80211
channel=1
ssid=XXXXXXXXXX
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=XXXXXXXXXX
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

hw_mode=g
ap_max_inactivity=3000
ieee8021x=0
wpa_group_rekey=0

wmm_enabled=1

# Low priority / AC_BK = background
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0

# Normal priority / AC_BE = best effort
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0

# High priority / AC_VI = video
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0

# Highest priority / AC_VO = voice
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0

I have some older embedded Linux devices that uses wpa_supplicant to connect to that older device, the the following .conf file.

ctrl_interface=/var/run/wpa_supplicant
roam_hysteresis=-100
network={
    ssid="XXXXXXXXXX"
    bgscan="simple:10:-75:10"
    proto=WPA2
    key_mgmt=WPA-PSK
    pairwise=CCMP
    group=CCMP
    psk="XXXXXXXXXX"
    priority=0
}

I am trying to bring up a Raspian Pi with the same hostapd.conf (literally coping the contents of the file from embedded linux to the pi) and restarting my hostapd on the Pi with sudo systemctl start hostapd.service. My /etc/default/hostapd file is the following:

# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
DAEMON_CONF="/etc/hostapd/hostapd.conf"

# Additional daemon options to be appended to hostapd command:-
#       -d   show more debug messages (-dd for even more)
#       -K   include key data in debug messages
#       -t   include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
DAEMON_OPTS=""

hostapd.service starts up and is running, but when the embedded Linux devices that where able to connect to the first device try to connect to this one, all I get in sudo systemctl status hostapd.service is

hostapd[10290]: wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.11: associated
hostapd[10290]: wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.11: disassociated

Best I can think of is that the WPA2 algorithm that the Pi is using is too new, and the Connected device keep failing during the handshake due to not sending the correct keys that the Pi is expecting, but I don't know where to look or what files to try and downgrade on the Pi to match the older devices to allow them to connect them to this Pi.

If I change rsn_pairwise=TKIP, and pairwise=TKIP and group=TKIP on both the pi and the wpa_supplicant devices they connect successfully using this method to the Pi so I know its not an issue with the Pi itself, or the SSID and PASSPHASE.

I can start up hostapd in another terminal with sudo hostapd -dd /etc/hostapd/hostapd.conf for further information if needed but I don't know what I am looking for in there or if it will even help.

  • Literally copying the file can't work: The RaspPi uses different hardware, so some entries are just wrong. In your place, I'd start with a hostapd.conf from a googled tutorial for the RaspPi model + distro you have (or an empty one, using local information from ip link etc.), and then slowly add the parameters you want to keep (like channel and WPA config). I can't give you step by step instructions or a ready-made config file because I don't know the details of what you have on the RaspPi. – dirkt Nov 28 '18 at 7:10
  • Since I can connect to the raspi if I change ccmp to tkip on all devices and that's the only change I need to make to get them to connect suggests to me that the hostap.conf works just not the ccmp/aes algorithm being used when ccmp is chosen. Am I wrong in thinking that the older hardware might be using an older version of this scheme? Is there a way to find the files the older hardware is using and use those on the pi? – shaun Nov 28 '18 at 13:08
  • I still can't say anything definite without knowing details. At least run hostapd with debug flags to find out what really goes on. ccmp vs. tkip shouldn't depend on the driver/hardware, at least AFAIK. – dirkt Nov 28 '18 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.