1

I have completed the official guide on setting up a Raspberry Pi as an access point in a standalone network (NAT), and it works, but I can't join other networks.

I want my Raspberry Pi to act as an Access point and a client at the same time, and I would like to be able to connect to multiple clients.

Basically, I want to implement the below architecture with my three raspberry Pis:

  • Pi 1 joins Pi 2 and Pi 3's networks
  • Pi 2 joins Pi 1 and Pi 3's networks
  • Pi 3 joins Pi 2 and Pi 1's networks

Is this even possible? I tried searching the internet for tutorials on how to do this, but I failed to find anything useful. Any help here would be highly appreciated.

  • your question has nothing to do with the RPi ..... it is a Linux networking question .... please start exploring Linux websites – jsotola May 15 at 1:30
  • 1
    @jsotola I mean, using the Raspberry Pi on-board wifi device as access point together with a client connection and a wifi-direct connection is an specific issue of the device. Other devices may be different. – Ingo May 15 at 7:38
  • 1
    why not setup one as acces point and connect the other two? Then all three are in the same LAN. Is there a specific reason, why you need to realize your setup? – oh.dae.su May 15 at 19:36
  • @oh.dae.su That can work, but due to the requirements of my project, I can't have all three on the same network. – Vin Shahrdar May 15 at 20:47
3

That's a complex configuration and I don't have an overview about the possible interactions. But here are some information that may help you. I assume you are using a Raspberry Pi 3B or 3B+.

First of all you can see what combinations of connections are possible with the on-board WiFi device. Show it with:

rpi ~$ iw phy

Just at the end of the output you will find a section valid interface combinations: that looks like this:

valid interface combinations:
    * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
    total <= 3, #channels <= 2
    * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
    total <= 4, #channels <= 1

This means that you can use together one client connection (managed), one P2P-device (WiFi-direct), one P2P client or group owner (also WiFi-direct), in total three connections at the same time.

Or you can use together one client connection (managed), one access point (AP), one P2P-client (WiFi-direct), one P2P-device (also WiFi-direct), in total four connections at the same time.

How to use an access point together with a client connection you can look at Access point as WiFi repeater, optional with bridge.

How to use a P2P-client connection you can find at Setting up Wifi direct (wifi p2p) and DHCP server.

Some information about setting up a P2P group owner you will find at p2p_group_add setting own password and ssid.

You may also consider to use an USB/wifi dongle with its additional possibilities of connections (check with iw phy). At least then you can have two client connections at the same time.

It's now up to you to combine this to your needs.

  • So, Pi1 will have an AP interface, one P2P Client interface to connect to Pi2, and another P2P device interface to connect to Pi3? I'm I understanding this correctly? I just wanted to see if someone has done this before and I'm not re-inventing the wheel, but it sounds like I am inventing the wheel... – Vin Shahrdar May 15 at 15:24
  • @VinShahrdar Yes, in theory you are right. But I don't know what a P2P-device can do. I don't believe that anyone else has done your unusual setup before, so you are on your own. Maybe there is in general another solution? – Ingo May 15 at 17:25

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.