1

Is it possible to have a Raspberry Pi connect to two different WiFi networks? I want the built-in wlan0 to connect to a LAN, and wlan1 (using a USB wifi dongle I have) to connect to the internet.

Basically, what I want to do is have the Pi send files to a local device via wlan0, and then also be able to connect to the internet via wlan1. (The local device creates a wifi network for a LAN that the Pi can connect to, but the local device is not itself able to connect to the internet)

Any thoughts and help would be much appreciated!

Thank you!

1
  • Yes that should be possible. Commented Dec 21, 2020 at 13:32

2 Answers 2

2

If you like to use systemd-networkd you can create two instances of wpa_supplicant that each can be managed completely independent from the other as service. How to do it you may have a look at 2 Wifi NIC's that each only connect to one (different from each other) network.

1

See Use different wpa_supplicant files in How to set up networking/WiFi

HOWEVER I recommend you DO NOT use wlan1 but implement Predictable Network Interface Names if you want the interfaces to reliably connect to specific networks. (This doesn't matter if you don't care which interface connects to which network - but is desirable any time you have multiple interfaces.)

There are other factors to consider - specifically the network interfaces should be independent, but you have specified insufficient detail.

1
  • brilliant! that worked! thank you! I had done the separate wpa_supplicant files, but had not turned Predictable Network Interface Names on.
    – J.S.
    Commented Dec 11, 2020 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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