In order to create an AP on my Pi I followed this tutorial at adafruit, which seems to be very similar to many others on the web: https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/install-software.
I've just replaced "eth0" for "wlan1" as I'm using wireless connection and would like to replace it further by "ppp0" to establish 3G-WIFI connection. As you can expect when I get through the tutorial, it doesn't work :-) It seems HostAPD is configured for its visible in wifi networks list, but it isn't possible to connect to it. Perhaps something wrong with DHCP or bridge forwarding? The Terminal has been
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument which has been fixed by downloading driver from Realtek's website but althought the AP is visible, it is still unable to connect to is as Terminal output of HostAPD is:
sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf Configuration file: /etc/hostapd/hostapd.conf drv->ifindex=3 l2_sock_recv==l2_sock_xmit=0x0x50c638 +rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2 rtl871x_set_key_ops rtl871x_set_key_ops rtl871x_set_key_ops rtl871x_set_key_ops Using interface wlan0 with hwaddr 74:da:38:5b:4f:f4 and ssid 'PiNet' rtl871x_set_wps_assoc_resp_ie rtl871x_set_wps_beacon_ie rtl871x_set_wps_probe_resp_ie rtl871x_set_key_ops rtl871x_set_beacon_ops rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, PiNet,5 rtl871x_set_acl +rtl871x_get_sta_wpaie, 18:34:51:53:60:85 is sta's address wlan0: STA 18:34:51:53:60:85 IEEE 802.11: associated rtl871x_set_key_ops rtl871x_set_key_ops rtl871x_set_key_ops +rtl871x_send_eapol +rtl871x_send_eapol rtl871x_set_key_ops wlan0: AP-STA-CONNECTED 18:34:51:53:60:85 wlan0: STA 18:34:51:53:60:85 RADIUS: starting accounting session 56E50D15-00000000 wlan0: STA 18:34:51:53:60:85 WPA: pairwise key handshake completed (RSN) wlan0: STA 18:34:51:53:60:85 WPA: received EAPOL-Key 2/4 Pairwise with unexpected replay counter wlan0: STA 18:34:51:53:60:85 WPA: received EAPOL-Key 4/4 Pairwise with unexpected replay counter wlan0: STA 18:34:51:53:60:85 IEEE 802.11: disassociated wlan0: AP-STA-DISCONNECTED 18:34:51:53:60:85 rtl871x_set_key_ops rtl871x_set_key_ops +rtl871x_sta_remove_ops, 18:34:51:53:60:85 is sta address removed
It seems that's something wrong with DHCP:
systemctl status isc-dhcp-server.service ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server) Active: failed (Result: exit-code) since Sun 2016-03-13 08:48:26 UTC; 23s ago Process: 1465 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
I followed the tutorial mentioned above and have no idea what could go wrong with setting up DHCP. My network interfaces file is below.
auto lo iface lo inet loopback iface eth0 inet manual allow-hotplug wlan0 #iface wlan0 inet manual # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface wlan0 inet static address 192.168.42.1 netmask 255.255.255.0 allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf #auto br0 #iface br0 inet dhcp #bridge_ports wlan1 wlan0 up iptables-restore < /etc/iptables.ipv4.nat