Arduino Yún + ESP8266, WiFi AP + Client mode at the same time. Feasible?

Hello everyone,

I’m working on a project around an Arduino Yún. The Yún will act as an intermediary between a remote server on one side and some local peripherials on the other, all of them using WiFi. Of course, that means the Yún will have to be in client mode in order to reach the server over the internet, but at the same time it should be in AP mode so peripherials can send information to the Yún. I’ve attached a very basic diagram of this.

I’ve looked on the internet and in the forums, and I’ve found quite some info about switching modes manually or using a script, but that’s not what I need. I also know the Yún has an Ethernet port, but a wired connection is not an option for this project.

I’ve found, however, some nice info in this post, which says it is indeed possible but has two issues, and one of the is very problematic.

The Yun’s WiFi can be both a client and a host at the same time. I’ve done it on my router using dd-wrt, and on the Yun’s OpenWRT. The problem is that there are a couple catches, one more serious than the other.

The first catch is that both the client and access point interfaces must be on the same channel, which isn’t too big of a problem if both are set up with automatic channel numbers: the Yun’s client interface will automatically be set to the right channel when it associates to its external access point, then the Yun’s access point interface will be set to the same channel.

The more serious catch is that if the Yun’s client mode connection to the access point is lost, it also brings down the Yun’s access point interface. This is apparently because the WiFi driver is spending all it’s time trying to connect the client interface to the access point, that it can’t service the access point mode. (Or it’s a matter of not knowing which channel to use?)

So, in case client+AP mode is not possible with the built-in WiFi, I was wondering if it would be feasible to use an ESP8266 WiFi module in order to have two WiFi interfaces; one as AP and one as client. Is this possible on the Yún? Or is there a way to make it work with the Yún’s built-in WiFi?