Install first for hostapd, dnsmasq with apt-get install
please make prepare about several file for editing:
root@pi:/home/pi# nano /etc/dnsmasq.conf
keep it blank
root@pi:/home/pi# nano /etc/hostapd/hostapd.conf
country_code=ID
interface=wlan0
driver=nl80211
bridge=br0
#RADIUS
macaddr_acl=0
eap_server=0
own_ip_addr=192.168.2.1
radius_client_addr=192.168.2.2
auth_server_addr=192.168.2.1
auth_server_port=1812
auth_server_shared_secret=10041987nm
#hs20=1
hw_mode=g
channel=6
ieee8021x=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
ignore_broadcast_ssid=0
ssid=iCAL-Hotspot
auth_algs=1
#if you want to make password, uncomment below
#wpa=2
#wpa_key_mgmt=WPA-PSK
#rsn_pairwise=CCMP
#wpa_passphrase=haikalmiska
root@pi:/home/pi# nano /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# Most distributions have NTP support.
#option ntp_servers
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# Most distributions have NTP support.
#option ntp_servers
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private
# Example static IP configuration:
interface eth0
inform 192.168.2.2/24
interface wlan0
inform 192.168.2.3/24
#denyinterfaces eth0 wlan0
root@pi:/home/pi# nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
# if there no an action, uncomment line below as trigger to IP Address
#auto br0
#auto eth0
#iface br0 inet static
#address 192.168.2.2/24
#gateway 192.168.2.1
#bridge_ports eth0 wlan0
__________________________________________________
root@pi:/home/pi# systemctl daemon-reload
root@pi:/home/pi# service networking restart
root@pi:/home/pi# service dhcpcd restart
root@pi:/home/pi# service hostapd start
root@pi:/home/pi# service dnsmasq start
any error have resolved with see the comments of error!
if you want to reset this hotspot to wifi client. The best way to (permanently) disable these services:
sudo update-rc.d hostapd disable
sudo update-rc.d dnsmasq disable
- reboot