I went ahead and used the commands from the AdaFruit tutorial
(towards the end) to make the hostapd run as a service.
But it did not work at once, I had to try it again a few times and then it came on line.
This is what I did:
Code: Select all
sudo service hostapd start
sudo service isc-dhcp-server start
sudo update-rc.d hostapd enable
sudo update-rc.d isc-dhcp-server enable
There was no error or other message when I used these commands, but the AP did not come on-line at first.
When it was running I used the status command to check the service and I got this:
Code: Select all
[email protected] ~/hostapd $ sudo service hostapd status
● hostapd.service - LSB: Advanced IEEE 802.11 management daemon
Loaded: loaded (/etc/init.d/hostapd)
Active: active (running) since Tue 2015-11-17 17:12:36 CET; 8min ago
Process: 21316 ExecStop=/etc/init.d/hostapd stop (code=exited, status=0/SUCCESS)
Process: 21489 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)
└─21493 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd.conf
Nov 17 17:12:36 rpi2-jessie hostapd: Starting advanced IEEE 802.11 management: hostapdioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
Nov 17 17:12:36 rpi2-jessie hostapd: .
Nov 17 17:12:36 rpi2-jessie systemd: Started LSB: Advanced IEEE 802.11 management daemon.
Nov 17 17:14:54 rpi2-jessie hostapd: wlan0: STA 38:0b:40:db:5b:0d IEEE 802.11: associated
Nov 17 17:14:54 rpi2-jessie hostapd: wlan0: STA 38:0b:40:db:5b:0d WPA: pairwise key handshake completed (RSN)
Nov 17 17:19:09 rpi2-jessie hostapd: wlan0: STA 38:0b:40:db:5b:0d IEEE 802.11: disassociated
What does the "Invalid argument" at 17:12:36 top line mean?
I have as yet not rebooted the Pi2 to see if the AP comes up automatically or not, this is the next task...
EDIT: After reboot
It all works! I can connect to the WiFi AP just fine after a "sudo shutdown -r now" command! :)