0

I am trying to make AP(Router) with raspberry pi.

Using your new Raspberry Pi 3 as a WiFi access point with hostapd

At this command I am getting certain error !!

entepi@raspberrypi:~ $ sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan1: interface state UNINITIALIZED->DISABLED
wlan1: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started

etc/hostapd/hostapd.conf

  interface=wlan1
  driver=nl80211
  ssid=TorPiFi
  hw_mode=g
  channel=7
  wmm_enabled=0
  macaddr_acl=0
  auth_algs=1
  ignore_broadcast_ssid=0
  wpa=2
  wpa_passphrase=mypass
  wpa_key_mgmt=WPA-PSK
  wpa_pairwise=TKIP
  rsn_pairwise=CCMP

pi@raspberrypi:~ $ sudo systemctl status hostapd

● hostapd.service - LSB: Advanced IEEE 802.11 management daemon
Loaded: loaded (/etc/init.d/hostapd; generated; vendor preset: enabled)
Active: active (exited) since Sun 2018-12-09 12:48:04 UTC; 4min 58s ago
Docs: man:systemd-sysv-generator(8)
Process: 493 ExecStart=/etc/init.d/hostapd
start(code=exited,status=0/SUCCESS)
CGroup: /system.slice/hostapd.service

Dec 09 12:48:04 raspberrypi systemd[1]: Starting LSB: Advanced IEEE 802.11      management daemon...
Dec 09 12:48:04 raspberrypi hostapd[493]: Starting advanced IEEE 802.11 management: hostapd failed!
Dec 09 12:48:04 raspberrypi systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.

pi@raspberrypi:~ $ sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf

  Configuration file: /etc/hostapd/hostapd.conf
  Failed to create interface mon.wlan1: -95 (Operation not supported)
  wlan1: Could not connect to kernel driver
  Using interface wlan1 with hwaddr b8:27:eb:bd:70:aa and ssid "TorPiFi"
  wlan1: interface state UNINITIALIZED->ENABLED
  wlan1: AP-ENABLED 
  wlan1: STA 94:53:30:ad:00:09 IEEE 802.11: associated
  wlan1: AP-STA-CONNECTED 94:53:30:ad:00:09
  wlan1: STA 94:53:30:ad:00:09 RADIUS: starting accounting session      5C0D2BE6-00000000
  wlan1: STA 94:53:30:ad:00:09 WPA: pairwise key handshake completed (RSN)
  wlan1: STA 94:53:30:ad:00:09 IEEE 802.11: disassociated
  wlan1: AP-STA-DISCONNECTED 94:53:30:ad:00:09
  wlan1: STA 94:53:30:ad:00:09 IEEE 802.11: disassociated
  wlan1: STA 94:53:30:ad:00:09 IEEE 802.11: disassociated
  wlan1: STA 94:53:30:ad:00:09 IEEE 802.11: associated
  wlan1: STA 94:53:30:ad:00:09 WPA: received EAPOL-Key msg 2/4 in invalid          state (10) - dropped
  wlan1: STA 94:53:30:ad:00:09 WPA: received EAPOL-Key with invalid MIC
  wlan1: STA 94:53:30:ad:00:09 IEEE 802.11: disassociated
  wlan1: STA 94:53:30:ad:00:09 IEEE 802.11: associated

Ping to Raspberry Pi Router

64 bytes from 172.24.1.1: icmp_seq=83 ttl=64 time=14.7 ms
64 bytes from 172.24.1.1: icmp_seq=90 ttl=64 time=1.03 ms
64 bytes from 172.24.1.1: icmp_seq=91 ttl=64 time=2.25 ms
64 bytes from 172.24.1.1: icmp_seq=98 ttl=64 time=4.81 ms
64 bytes from 172.24.1.1: icmp_seq=99 ttl=64 time=2.66 ms
64 bytes from 172.24.1.1: icmp_seq=106 ttl=64 time=3.09 ms
64 bytes from 172.24.1.1: icmp_seq=107 ttl=64 time=2.22 ms
64 bytes from 172.24.1.1: icmp_seq=114 ttl=64 time=4.02 ms
64 bytes from 172.24.1.1: icmp_seq=115 ttl=64 time=2.06 ms
From 172.24.1.97 icmp_seq=118 Destination Host Unreachable
From 172.24.1.97 icmp_seq=119 Destination Host Unreachable
From 172.24.1.97 icmp_seq=120 Destination Host Unreachable
64 bytes from 172.24.1.1: icmp_seq=122 ttl=64 time=1028 ms
64 bytes from 172.24.1.1: icmp_seq=123 ttl=64 time=4.55 ms
64 bytes from 172.24.1.1: icmp_seq=130 ttl=64 time=3.52 ms
From 172.24.1.97 icmp_seq=176 Destination Host Unreachable
From 172.24.1.97 icmp_seq=177 Destination Host Unreachable
From 172.24.1.97 icmp_seq=178 Destination Host Unreachable
64 bytes from 172.24.1.1: icmp_seq=179 ttl=64 time=25.5 ms
64 bytes from 172.24.1.1: icmp_seq=183 ttl=64 time=2.11 ms
64 bytes from 172.24.1.1: icmp_seq=184 ttl=64 time=1.05 ms
64 bytes from 172.24.1.1: icmp_seq=192 ttl=64 time=1.26 ms
64 bytes from 172.24.1.1: icmp_seq=199 ttl=64 time=1.33 ms
64 bytes from 172.24.1.1: icmp_seq=200 ttl=64 time=4.44 ms
  • 1
    raspberrypi.org/documentation/configuration/wireless/… is a more modern document that 100% works with a RPi ZeroW, 3B, 3B+, 3A+ – Dougie Dec 9 '18 at 12:23
  • Thank you! But still getting Same error ? – Owais Qureshi Dec 9 '18 at 12:54
  • Tear everything out and start afresh. Work from the top of that document and it's going to work (as long as you don't have a hardware fault). – Dougie Dec 9 '18 at 13:18
  • Thanks !! it's worked !! But my Devices Keep disconnecting and connecting!! thank – Owais Qureshi Dec 9 '18 at 14:21
  • You'll need to activate some logging. Some may be active, take a look with a dmesg command. – Dougie Dec 9 '18 at 14:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.