Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to start hostapd but without success. I'm using Headless Ubuntu 11.10 oneiric 3.0.0-16-server x86_64. WLAN driver is rt2800usb and my wireless nic card TP-Link TL-WN727N supports AP mode as shows below:

us0# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:27:19:be:cd:b6  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

us0# lsusb
Bus 003 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070
                    Wireless Adapter
us0# lshw -C network
*-network:3
       description: Wireless interface
       physical id: 4
       bus info: usb@3:2
       logical name: wlan0
       serial: 00:27:19:be:cd:b6
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rt2800usb driverversion=3.0.0-16-server
                      firmware=0.29 link=no multicast=yes wireless=IEEE 802.11bgn

us0# hostapd /etc/hostapd/hostapd.conf 
Configuration file: /etc/hostapd/hostapd.conf
Could not read interface wlan0      # The int flags: No such device
nl80211 driver initialization failed.
ELOOP: remaining socket: sock=4 eloop_data=0xd3e4a0 user_data=0xd3ecc0 handler=0x433880
ELOOP: remaining socket: sock=6 eloop_data=0xd411f0 user_data=(nil) handler=0x43cc10

us0# cat /etc/hostapd/hostapd.conf
       ssid=Home
       interface=wlan0         # The interface name of the card
       #driver=rt2800usb
       driver=nl80211
       macaddr_acl=0

       ieee80211n=1
       channel=1
       hw_mode=g

       auth_algs=1
       ignore_broadcast_ssid=0
       wpa=2
       wpa_passphrase=88888888
       wpa_key_mgmt=WPA-PSK
       wpa_pairwise=TKIP
       rsn_pairwise=CCMP

us0# iw list
Wiphy phy0
    Band 1:
        Capabilities: 0x172
            HT20/HT40
            Static SM Power Save
            RX Greenfield
            RX HT20 SGI
            RX HT40 SGI
            RX STBC 1-stream
            Max AMSDU length: 7935 bytes
            No DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 2 usec (0x04)
        HT RX MCS rate indexes supported: 0-7, 32
        TX unequal modulation not supported
        HT TX Max spatial streams: 1
        HT TX MCS rate indexes supported may differ
        Frequencies:
            * 2412 MHz [1] (20.0 dBm)
            * 2417 MHz [2] (20.0 dBm)
            * 2422 MHz [3] (20.0 dBm)
            * 2427 MHz [4] (20.0 dBm)
            * 2432 MHz [5] (20.0 dBm)
            * 2437 MHz [6] (20.0 dBm)
            * 2442 MHz [7] (20.0 dBm)
            * 2447 MHz [8] (20.0 dBm)
            * 2452 MHz [9] (20.0 dBm)
            * 2457 MHz [10] (20.0 dBm)
            * 2462 MHz [11] (20.0 dBm)
            * 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS)
            * 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS)
            * 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS)
        Bitrates (non-HT):
            * 1.0 Mbps
            * 2.0 Mbps (short preamble supported)
            * 5.5 Mbps (short preamble supported)
            * 11.0 Mbps (short preamble supported)
            * 6.0 Mbps
            * 9.0 Mbps
            * 12.0 Mbps
            * 18.0 Mbps
            * 24.0 Mbps
            * 36.0 Mbps
            * 48.0 Mbps
            * 54.0 Mbps
    max # scan SSIDs: 4
    Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * WDS
         * monitor
         * mesh point
    Supported commands:
         * new_interface
         * set_interface
         * new_key
         * new_beacon
         * new_station
         * new_mpath
         * set_mesh_params
         * set_bss
         * authenticate
         * associate
         * deauthenticate
         * disassociate
         * join_ibss
         * Unknown command (68)
         * Unknown command (55)
         * Unknown command (57)
         * Unknown command (59)
         * Unknown command (67)
         * set_wiphy_netns
         * Unknown command (65)
         * Unknown command (66)
         * connect
         * disconnect

The question is: Why the hostapd not starting?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The answer is quote simple: remove everything (spaces, comments, etc..) after "interface=wlan0" in /etc/hostapd/hostapd.conf file and use driver=nl80211.

share|improve this answer

My fail, i forgot to load the Firmware. After installing the Firmware "firmware-ralink" it works properly.

share|improve this answer
    
Please say how you did this so it can be of use to future users who reference this question. –  RolandiXor Dec 27 '12 at 1:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.