User Tools

Site Tools


informatica:raspberry:servidor_musica

https://cdn-learn.adafruit.com/downloads/pdf/setting-up-a-raspberry-pi-as-a-wifi-access-point.pdf

apt-get install hostapd isc-dhcp-server iptables-persistent

edit /etc/dhcp/dhcpd.conf

Comentar

#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

Find the lines that say

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

and remove the # so it says

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
subnet 192.168.42.0 netmask 255.255.255.0 {
 range 192.168.42.10 192.168.42.50;
 option broadcast-address 192.168.42.255;
 option routers 192.168.42.1;
 default-lease-time 600;
 max-lease-time 7200;
 option domain-name "local";
 option domain-name-servers 8.8.8.8, 8.8.4.4;
}
sudo nano /etc/default/isc-dhcp-server
INTERFACES="" 

and update it to say

INTERFACES="wlan0"

Comentamos wlan0 en /etc/network/interfaces

iface wlan0 inet static

address 192.168.42.1
netmask 255.255.255.0

Creamos el fichero nuevo:

/etc/hostapd/hostapd.conf

Con el adaptor wifi interno raspi3 comentamos la línea de driver:

interface=wlan0
#driver=rtl871xdrv
ssid=Pi_AP
country_code=US
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_group_rekey=86400
ieee80211n=1
wme_enabled=1

Añadimos al fichero

/etc/default/hostapd

La línea:

DAEMON_CONF="/etc/hostapd/hostapd.conf"
/etc/init.d/hostapd
DAEMON_CONF=/etc/hostapd/hostapd.conf
informatica/raspberry/servidor_musica.txt · Last modified: 2017/07/18 22:00 by jose