RPi: Wifi + Access Point select adapters


I’m trying to set up an application of Raspberry Pi’s to create an access point. These will be portable devices that will be connected to by multiple ESP8266 devices as I walk around the building. The ESP8266 devices will connect to the access point and send data over MQTT to a broker running on the same RPi that is creating the AP. So far I have managed to use the post [Turn an RPi into an AP] (https://www.balena.io/blog/turn-a-raspberry-pi-into-a-wi-fi-access-point-or-repeater/) to create the AP, and I’m using a node-red container to create the broker and handle messages. This appears to be working.

The issue I’m having is that I want to use the large external USB antenna to create the AP, and the built-in antenna will be used to connect to my Wifi network (once in a blue moon, to install updates). I have run the ifconfig command and it appears that they are connecting the opposite way…

I will also need to make sure this is an application-wide setup as I don’t want to have to change network settings on every device I create. I will also need to ensure that the AP’s IP address is always the same - even for different devices in the same application so that the ESP’s will always connect.

Can someone point me in the right direction?


Hi there, I believe you would need to alter the code of the project to “swap” the wifi interfaces, assuming the USB one supports access point mode - I suggest opening an issue to the repo project and interact with the maintainer to get pointers/help on how to achieve that

Hi Gregor, the wifi-repeater project will currently pick the first device that is “AP capable” and go with that. I can look into adding an env var to be able to select the interface. If you can create a GitHub issue for this i’ll see if I can get to it this week.

Ok, nvm, I created the issue already: https://github.com/balenalabs-incubator/wifi-repeater/issues/8

Thanks, @tmigone, I look forward to seeing how it works.

Hi @tmigone,

Just wondering if you’ve had a chance to look at this issue?

I’m anxious to get the proof of concept working for this project, and your wifi repeater program seems like the best way to create this.

I look forward to hearing from you. :slight_smile:



Your feature request had been acknowledged and is in the pipeline. You can follow the progress at https://github.com/balenalabs-incubator/wifi-repeater/issues/8

Our official preference is not to post promises or ETAs so as not to induce unneeded stress to developers, even if we’re excited sometimes :slight_smile: Hope that makes sense.

Hi @pranasziaukas

Thanks for the reply. That’s absolutely no bother :slight_smile: I’ll keep an eye out on the progress page.