sdelrio / rpi-hostap

Transform your PI into a Wireless Router (DHCP and WPA2 already insisde)
76 stars 65 forks source link

Error when runs at Raspberry pi 4 #14

Closed BlackMix closed 4 years ago

BlackMix commented 4 years ago

Hi, I want to use it on my raspberry pi 4, but not found wlan0

Starting HostAP daemon ...
Configuration file: /etc/hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started
moving iptables rules...
Removing iptables for outgoing traffics on eth0...
NAT settings ip_dynaddr, ip_forward
ip_dynaddr already 1
ip_forward already 1
1
1

Setting iptables for outgoing traffics on eth0...
nfiguring DHCP server ..
Starting DHCP server ..
Internet Systems Consortium DHCP Server 4.3.3-P1
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcp/dhcpd.pid
Wrote 0 leases to leases file.
Listening on LPF/wlan0/dc:a6:32:26:f6:77/192.168.254.0/24
Sending on   LPF/wlan0/dc:a6:32:26:f6:77/192.168.254.0/24
Can't bind to dhcp address: Address in use
Please make sure there is no other dhcp server
running and that there's no entry for dhcp or
bootp in /etc/inetd.conf.   Also make sure you
are not running HP JetAdmin software, which
includes a bootp server.

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..
exiting.

Starting HostAP daemon ...
Configuration file: /etc/hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started
moving iptables rules...
Removing iptables for outgoing traffics on eth0...

Have some update image for run it or need some others configs to run at pi 4? I think not need others drivers because wifi pi 4 is better than 3

thanks.

sdelrio commented 4 years ago

Could you check with iwconfig command how is nammed the interface in pi4 + your distribution? Did you try to run it setting INTERFACE to that value?

BlackMix commented 4 years ago

Hi, Raspbian Buster Lite

iwconfig
ap0       IEEE 802.11  Mode:Master  Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
wlan0     IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
eth0      no wireless extensions.
br-47fe48efb556  no wireless extensions.
veth1031e09  no wireless extensions.
docker0   no wireless extensions.
br0       no wireless extensions.
vethffae2b6  no wireless extensions.
vethbc269a1  no wireless extensions.
lo        no wireless extensions.
veth1ee3d16  no wireless extensions.

well, I created other interface ap0 manual, later I check again, thanks :)

sdelrio commented 4 years ago

It seems that the wireless is not on AP mode, it's in managed (only client) perhaps the drivers doesn't support AP mode. Sorry I don't have a Pi4 for test but I'll try to take a look on forums at weekend.

Try to execute as root:

 iw list

And look for:

        Supported interface modes:
                 * IBSS
                 * managed
                 * AP   <------
                 * AP/VLAN
                 * WDS
                 * monitor
                 * mesh point
BlackMix commented 4 years ago

Thanks @sdelrio , I can set mode ap, so thats was problem, thanks

sdelrio commented 4 years ago

You're wellcome