3

I'd like to use my Pi4 as a wifi repeater for some home automation devices which only accept 2.4GHz networks. I've successfully set up the pi as a wifi repeater, and I'm able to connect to the network from my phone. However, even though I tried to configure hostapd for 802.11g, the network ends up being 5GHz. How can I fix this?

The hostapd.conf file:

interface=ap0
driver=nl80211
ssid=RPiNet
country_code=US
hw_mode=g
channel=1
auth_algs=1
wpa=2
wpa_passphrase=****
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

In case it's relevant, I'm using systemd-networkd to manage a repeater between the wlan0 and ap0 interfaces, following instructions here.

srossd
  • 151
  • 4
  • 1
    How have you verified that it's not putting out a 2.4 Ghz network? It might be that the devices are just having trouble authenticating. What does a Wifi Analyzer show? (e.g. https://play.google.com/store/apps/details?id=com.farproc.wifi.analyzer) – Fred Sep 21 '19 at 23:01
  • 1
    I should have mentioned, I checked with Wifi Analyzer. I'm only seeing my RPiNet on the 5Ghz screen. More to the point, the Smart Life app I'm trying to work with refuses to accept RPiNet, owing to its being 5GHz. – srossd Sep 21 '19 at 23:53

1 Answers1

2

It turns out this was happening because I was trying to use the same wifi card as both a client and an access point. It was connecting to the WLAN network on channel 100, so depsite the hostapd settings, the AP could only operate on channel 100. I changed my wpa_supplicant settings (using the freq_list parameter) to force wpa_supplicant to connect via 2.4GHz. The AP is now broadcasting at 2.4GHz as well.

srossd
  • 151
  • 4
  • 1
    You are right. That is exactly the reason why the access point gets always the same channel than the client connection. It's a restriction of the hardware. I have updated the tutorial you used to clarify it better. If you need different channels you have to use an additional USB/WiFi dongle. You can look at Access point as WiFi router/repeater with additional WiFi-dongle for this. – Ingo Sep 23 '19 at 09:12
  • Thanks for your very helpful tutorials. My access point is working but the client connection is spotty since I had to put it on a noisy 2.4 GHz channel, so I might try setting up an additional WiFi dongle in the future. – srossd Sep 23 '19 at 16:08