hostapd on Debian Linux opens WLAN Hotspot, but I can't connect to it

8,865

It sounds like you're missing a DHCP server.

If you haven't set one up, that's why it's getting stuck on "Getting IP-Address"

Eg. https://wiki.debian.org/DHCP_Server

Share:
8,865

Related videos on Youtube

msrd0
Author by

msrd0

I'm a backend developer from Germany, currently studying at the RWTH Aachen University. I started with Java, but quickly jumped to C++. Currently, my absolute favourite programming language is Rust, but I also use Kotlin from time to time.

Updated on September 18, 2022

Comments

  • msrd0
    msrd0 over 1 year

    I have a Debian Wheezy machine with hostapd running. I want it to make a WPA2-PSK secured WLAN Hotspot. I can see the Hotspot from my Android phone, but every time I try to connect to it, it shows "Getting IP-Address" for a very long time, and then it says "avoided weak web connection" ("Schwache Internetverbindung gemieden").

    My /etc/hostapd/hostapd.conf file contains the following:

    ctrl_interface=/var/run/hostapd
    ###############################
    # Basic Config
    ###############################
    macaddr_acl=0
    auth_algs=1
    # Most modern wireless drivers in the kernel need driver=nl80211
    driver=nl80211
    ##########################
    # Local configuration...
    ##########################
    interface=wlan0
    #bridge=br0
    hw_mode=g
    channel=1
    ssid=HereIsMySSID
    macaddr_acl=0
    auth_algs=1
    ignore_broadcast_ssid=0
    wpa=2
    wpa_passphrase=HereIsMyPassphrase
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=TKIP
    rsn_pairwise=CCMP
    

    If I change the wpa_key_mgmt to WPA2-PSK, I get the following error:

    # hostapd /etc/hostapd/hostapd.conf 
    Configuration file: /etc/hostapd/hostapd.conf
    Line 22: invalid key_mgmt 'WPA2-PSK'
    FT (IEEE 802.11r) requires nas_identifier to be configured as a 1..48 octet string
    2 errors found in configuration file '/etc/hostapd/hostapd.conf'
    #
    

    My hostapd version is:

    # hostapd -v
    hostapd v1.0
    User space daemon for IEEE 802.11 AP management,
    IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
    Copyright (c) 2002-2012, Jouni Malinen <[email protected]> and contributors
    #
    

    How can I make this working?

  • msrd0
    msrd0 over 9 years
    This shows me the error Line 22: invalid key_mgmt 'WPA2-PSK'
  • msrd0
    msrd0 over 9 years
    And what do you mean with I would spend more time tweaking the configuration?
  • unixmiah
    unixmiah over 9 years
    I meant taking a deeper look into your hostapd: wireless.kernel.org/en/users/Documentation/hostapd setup configuration. Make sure you restart the wifi and services before you make another attempt to connect via wifi.
  • msrd0
    msrd0 over 9 years
    I get this error: [FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
  • msrd0
    msrd0 over 7 years
    unfortunately I asked this question a few years ago and cannot provide you my syslog. I'm currently using this script in ArchLinux user repository which is working quite well (yep I changed operating system in the meantime)
  • Nurrl
    Nurrl over 7 years
    Okay no problem :D