=
Activer la clé wifi
Pour obtenir le nom de la clé
ifconfig
Dans /etc/network/interfaces
How to set wireless access point? (Jessie)
There are two different hostap daemons. One is default and the other one is for some Realtek wifi cards. Both have their own basic configurations and both are patched to gain maximum performances.
Sources: https://github.com/igorpecovnik/hostapd
Default binary and configuration location:
/usr/sbin/hostapd
/etc/hostapd.conf
To start AP automatically:
-
Edit /etc/init.d/hostapd and add/alter location of your conf file DAEMON_CONF=/etc/hostapd.conf and binary DAEMON_SBIN=/usr/sbin/hostapd
-
Copy /etc/network/interfaces.hostapd to /etc/network/interfaces
-
Reboot
-
Predefined network name: “SSID” password: 12345678
-
To change parameters, edit /etc/hostapd.conf BTW: You can get WPAPSK the long blob from wpa_passphrase YOURNAME YOURPASS
Configurer le DNSMASQ
Wifi hotspot troubleshooting
root@odroidc2:~# /etc/init.d/hostapd stop
[ ok ] Stopping hostapd (via systemctl): hostapd.service.
root@odroidc2:~# /etc/init.d/dnsmasq stop
[ ok ] Stopping dnsmasq (via systemctl): dnsmasq.service.
root@odroidc2:~# /etc/init.d/networking restart
[....] Restarting networking (via systemctl): networking.serviceWarning: Unit file of networking.service changed on disk, 'systemctl daemon-reload' recommended.
. ok
root@odroidc2:~# [1] 1680
Configuration file: /etc/hostapd.conf
[....] Starting dnsmasq (via systemctl): dnsmasq.serviceUsing interface wlan0 with hwaddr 7c:dd:90:ad:67:c2 and ssid "SSID"
Job for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details.
failed!
root@odroidc2:~# wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
root@odroidc2:~# systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
└─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: failed (Result: exit-code) since Wed 2016-08-10 09:07:30 CEST; 20s ago
Process: 1189 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=exited, status=0/SUCCESS)
Process: 782 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 1692 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
Process: 1690 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 780 (code=exited, status=0/SUCCESS)
lancer la commande pour voir ce qui se passe en live
tail -f /var/log/messages
connecter un terminal au hotspot
un message de ce type doit apparaitre
wlan0: STA 00:26:08:f6:83:01 IEEE 802.11: authenticated
wlan0: STA 00:26:08:f6:83:01 IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED 00:26:08:f6:83:01
wlan0: STA 00:26:08:f6:83:01 RADIUS: starting accounting session 4945A99A-00000000
wlan0: STA 00:26:08:f6:83:01 WPA: pairwise key handshake completed (RSN)
la connection est alors établie.