1

I'm using my Pi as a WAP (wireless access point). Is it possible to have two separate WiFi networks coming from the same Pi? I bought a usb adaptor that supports 8 APs, but I can only get one wap showing and working.

I'm using a Raspberry pi 4 and using command iw list the adaptor shows up correctly. I have modified the dhcpcd.conf file to include both interfaces wlan0 and wlan1, the dnsmasq.conf file to indicate the range of ip addresses and two separate hostapd.conf files for two networks. In /etc/default/hostapd I also indicated both the paths for hostapd.conf.

Still only one wlan shows up in ifconfig, any idea why? I really appreciate any help.

  • If you have 2 USB WiFi sticks, I would bet it works. Is this an option, or are you intending to use only one stick? Which Pi version do you have? – Marcel Jul 10 at 19:41
  • Hi Marcel, thank you for replying. I'm using raspberry pi 4 and thinking to get another wifi adaptor so I can have two wifi running. – Yiming Xie Jul 10 at 19:51
  • Have a look into this: thepi.io/…. You will have wlan0 and wlan1. I guess you will fail at step 5, because the config would allow only 1 interface. – Marcel Jul 10 at 19:56
  • Hi Marcel, thanks for your reply. I have used this tutorial to set up my first WAP, adding a second one should be more or less the same right? – Yiming Xie Jul 10 at 21:57
  • Hi Ingo, thank you for your help! I'll look into wifi direct too. – Yiming Xie Jul 10 at 22:01
1

The wifi device on a Raspberry Pi can only make one access point at a time. To have a second access point you have to use an additional USB/wifi dongle that also supports an access point.

How to setup a single access point you can look at Setting up a Raspberry Pi as an access point - the easy way, section Setting up a stand alone access point. This is using interface wlan0. you can just repeat the same setup by replacing everywhere wlan0 with wlan1. Then you have two independent services that you can manage each separately, for example start and stop them:

rpi ~$ sudo systemctl stop wpa_supplicant@wlan1.service
rpi ~$ sudo systemctl start wpa_supplicant@wlan0.service

There are other combinations possible, maybe with the eth0 as uplink to an internet router or bridged with one access point.

  • Hi Ingo, many thanks to your reply! My wifi dongle is on the way and I'll let you know how it is going. – Yiming Xie Jul 11 at 13:13
  • Hi @YimingXie, have you verified that he wifi dongle supports an access point? – Ingo Jul 11 at 15:01
  • Hi @Ingo, yes it's the usb adaptor from the pihut, and running the command "iw list" gives me '#{AP, mesh point} <= 8'. I've tried to set up the second wifi followinglink for consistency (I used it to set up the first wifi hotspot) but it turns out that both wlan0 and wlan1 appears in ifconfig but both of them are "Not associated". I have separate hostapd files for both wlans. If you have any idea why this happens please let me know. Thank you so much! – Yiming Xie Jul 15 at 11:08
  • @YimingXie Sorry, but I don't invest into old stuff networking anymore. I'm looking forward to systemd-networkd. – Ingo Jul 15 at 14:46
  • Hi @Ingo, still thanks for all the help! Have a great day! – Yiming Xie Jul 15 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.