[SOLVED] Wifi AP not initiating after reboot

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[SOLVED] Wifi AP not initiating after reboot

Postby naesk » Tue Jun 07, 2016 1:01 pm

I recently got my Raspberry Pi 2 acting as a NAT'ed access point using hostapd, dnsmasq, iptables.

After reboot the wired interface (eth0) profile with static IP is automatically loaded using netctl, however the wifi interface (wlan0) profile with static IP results in error.

Only until manually issuing $this->bbcode_second_pass_code('', 'ip addr add 192.168.2.1/24 broadcast 192.168.2.255 dev wlan0') does the wlan0 interface come up and the access point works.

/etc/netctl/ethernet-static
$this->bbcode_second_pass_code('', '
Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.11/24' '192.168.1.87/24')
Gateway='192.168.1.1'
')

/etc/netctl/wireless-wpa-static
$this->bbcode_second_pass_code('', '
Description='A simple WPA encrypted wireless connection using a static IP'
Interface=wlan0
Connection=wireless
Security=wpa
ESSID='MYWIFINAME'
Key='MYPASSWORD'
IP=static
Address='192.168.2.1/24'
Gateway='192.168.1.1'
# Uncomment this if your ssid is hidden
#Hidden=yes
')

/etc/hostapd/hostapd.conf
$this->bbcode_second_pass_code('', '
ssid=MYWIFINAME
wpa_passphrase=MYPASSWORD
interface=wlan0
auth_algs=3
channel=7
driver=rtl871xdrv
hw_mode=g
logger_stdout=-1
logger_stdout_level=2
max_num_sta=5
rsn_pairwise=CCMP
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
')

/etc/dnsmasq.conf
$this->bbcode_second_pass_code('', '
no-resolv
interface=wlan0

dhcp-range=192.168.2.200,192.168.2.210,12h

server=208.67.222.222
server=208.67.220.220

log-queries
log-dhcp')
Last edited by naesk on Tue Jun 07, 2016 2:01 pm, edited 2 times in total.
naesk
 
Posts: 6
Joined: Sun Mar 09, 2014 9:41 pm

Re: Wifi AP not initiating after reboot

Postby WarheadsSE » Tue Jun 07, 2016 1:32 pm

Silly question: why are you using netctl in this way for the wlan0, if that wlan0 is in AP mode? You're telling netctl that it should configure wlan0 as a client.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Wifi AP not initiating after reboot

Postby naesk » Tue Jun 07, 2016 2:01 pm

@WarheadsSE Thanks for the reply, much appreciated :)

I was of the understanding the wlan0 interface required an IP address to be assigned to it, in order for hostapd & dnsmasq to be associated with it.

I've now disabled the wlan0 netctl profile, and rebooted all now works as expected w00t!

My bad! Layer 8 ID-10-T error ;)
naesk
 
Posts: 6
Joined: Sun Mar 09, 2014 9:41 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 10 guests