5 Replies Latest reply on Apr 16, 2015 1:13 PM by roleohibachi

    Failed to start Hostapd (ubilinux)

    bra

      Hi guys,

       

      My question is related to the discussion initialized by Duckhunter (https://communities.intel.com/discussion/create.jspa?sr=cmenu&containerType=3&containerID=473172&draftID=252267).

       

      I did the same  as suggested by Dave :

      /etc/network/interfaces:

      1. auto wlan0 
      2. iface wlan0 inet static 
      3. address 192.42.0.1 
      4. netmask 255.255.255.0

      etc/default/hostapd:

          DAEMON_CONF="/etc/hostapd/hostapd.conf"

      /etc/hostapd/hostapd.conf:

          ssid=EDIBRA-xx:xx:xx:xx:xx:xx

       

      After restarting the hostpad service (/etc/init.d/hostapd restart), I receive the following error message :

       

      "Starting advanced IEEE 802.11 management: hostapdrmdir[ctrl_interface]: No such file or directory failed!"

       

      I don't understand why I get this error message ?

       

      Thanks so much for your help,

      bra

        • 1. Re: Failed to start Hostapd (ubilinux)
          gerrik84k

          i have pretty much the same problem i followed the instruction from debian forum (sorry its in german) and got an error like

           

          /etc/init.d/hostapd: 18: /etc/init.d/hostapd: /etc/default/hostapd: Permission denied

          permisions are:

          -rwxrwxrwx 1 root root 1536 Jan  1 04:22 hostapd


          interfaces looks like:

          #############################################

          # The loopback network interface

          auto lo

                  iface lo inet loopback

           

          # WLAN mit fester Adresse für hostapd

          auto wlan0

                  iface wlan0 inet static

                  address 10.0.0.1

                  netmask 255.255.255.0

                  broadcast 10.0.0.255

           

          pre-up iptables-restore < /etc/iptables.ipv4.nat

           

          # hostapd und dnsmasq (neu) starten

                  up service hostapd restart

                  up service dnsmasq restart

          #############################################


          and hostapd.conf at /etc/hoastapd.conf

          #############################################

          # USB-Stick oder WLAN-Gerät

          interface=wlan0

          # Netlink-Treiber laden

          driver=nl80211

          # AP-Name

          ssid=xxxxxxxx

          # Kanal

          channel=1

          # bis 54Mbit, unterstützt auch 802.11 und 802.11b

          hw_mode=g

          # Authentifizierungsmodus "Open System Authentication"

          auth_algs=1

          # akzeptiert nur WPA2-Verbindungen

          wpa=2

          # Pre-Shared-Key (PSK) im Klartext

          wpa_passphrase=xxxxxx

          #############################################

          also changed the init file to


          DAEMON_CONF=/etc/hostapd.conf


          anyone an idee whats going wrong ?

          • 2. Re: Failed to start Hostapd (ubilinux)
            roleohibachi

            Ubilinux access point hostapd/driver issue Found the solution!

             

            Resolved, thanks to @petn-randall on freenode #debian!

            The newest version of hostapd doesn't use the "old method" described by the documentation, but the version in the stock repositories that ship installed with Ubilinux does. Updating to the newest (testing) hostapd fixes it. Details follow.

             

            The problem:

            In the stock hostapd binary, receiving and sending management frames requires monitor mode interface. It attempts to configure one interface running in master mode for standard traffic and another one for authentication, keys management, etc. This method is still supported by nl80211 driver as a fallback, but is NOT supported by the Edison chipset and driver.

            Later, nl80211 implemented special commands for sending management frames (NL80211_CMD_FRAME) and subscribing to them (NL80211_CMD_REGISTER_FRAME). This allowed user space to handle wireless infrastructure using a single AP interface only. This is currently preferred method that can be used with all mac80211 drivers implementing AP mode. It solves our problem here, since it doesn't require a Monitor Mode interface (which we can't do). Newer versions of hostapd have already been patched to use this method - lucky us!

            The solution:

            First, add the testing repository to your list of repositories:

                 # echo deb http://ftp.us.debian.org/debian testing main contrib non-free >> /etc/apt/sources.list

            Then, add an apt preference such that you don't update ALL your packages to testing versions. Unless you're into that kind of thing, I guess. As root, add these lines to /etc/apt/preferences (create the file if it doesn't exist).

                 Package: *

                 Pin: release a=testing

                 Pin-Priority: 900

            Finally, update hostapd using the testing repo. Note which other packages will also be updated to testing versions as a result.

                 # apt-get -t testing install hostapd

            It will ask a few questions during the install. Make sure to retain the customized /etc/init.d/hostapd provided by ubilinux. It is correctly configured for the edison. If you accidentally blow it away, here is an original: http://pastebin.com/KrvUBNDX

            It may restart a few services, like cron, while it runs. Once it's complete, double-check your configuration files (/etc/hostapd/hostapd.conf and /etc/network/interfaces and /etc/default/hostapd), and restart hostapd. Your access point should come up automagically!

            • 3. Re: Failed to start Hostapd (ubilinux)
              CMata_Intel

              Hi bra

               

              Were you able to use Hostapd in Ubilinux? You can post your question here: EmutexLabs for more accurate information about Ubilinux.

               

              Regards;

              CMata

              • 4. Re: Failed to start Hostapd (ubilinux)
                gerrik84k

                Can i check the version of hostapd ? i still get the same errors ?

                • 5. Re: Failed to start Hostapd (ubilinux)
                  roleohibachi

                  You can check your current version of hostapd by running:

                  # apt-cache policy hostapd