I'm working with a raspberry pi zero w with a stripped down distro - NARD, and I would like to use two virtual wireless interfaces, one running in AP mode (service network) and the other connecting to a wireless network.
The chip supports this, but ONLY if they are on the same channel. I've been pulling my hair out over this for the last couple of months, because it was only connecting to SOME (read - those on channel 6) networks due to this...
My question would be if wpa_supplicant is capable of setting the channel of the ap0 interface based on which channel the wlan0 interface wishes to connect to? Simply removing the frequency stanza from the configuration of the ap0 interface makes it choose one automatically, but does not sync to the one used by the wlan0 interface.
My current setup looks like this:
/usr/sbin/wpa_supplicant -i ap0 -c /etc/wpa_supplicant_ap0.conf -D nl80211 -N -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211 -P /var/run/wpa_supplicant.pid -B -s
/etc/wpa_supplicant_ap0.conf
ctrl_interface=/var/run/wpa_supplicant
# Scan for accesspoints regularly
ap_scan=1
autoscan=periodic:120
ignore_old_scan_res=1
bgscan="simple:60:-45:240"
# Enable Protected Management Frames
pmf=1
network={
ssid="<snip>-setup"
mode=2
key_mgmt=WPA-PSK
psk="<snip>"
frequency=2437
}
/etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
update_config=1
pmf=1
ignore_old_scan_res=1
bgscan="simple:60:-45:240"
autoscan=periodic:120
network={
ssid="<snip>"
psk="<snip>"
priority=10
ap_max_inactivity=60
}
network={
ssid="<snip>"
psk="<snip>"
priority=20
ap_max_inactivity=60
}
frequency=XXXin/etc/wpa_supplicant_ap0.conf) and then start wpa_supplicant for your AP ? – Ephemeral Jan 06 '20 at 18:31