# Using ESP32 as a wifi/bluetooth modem? [closed]

I'm would like to make a connection between a ESP32 and a Allwinner A20 CPU in which the ESP32 would provide the Wifi/Bluetooth connectivity for the rest of the system.

They both mention i2c, spi and SDIO in their datasheets.

• Which one of those would be considered the a best practice?
• Are the additional protocols that could be taken into account?

## closed as too broad by Voltage Spike, Chris Stratton, Daniel Grillo, Autistic, Dave Tweed♦Nov 9 '16 at 13:31

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm tempted to flag this as too broad, you're asking how to connect two processors together. That depends entirely upon what your final system architecture will be and I wouldn't trust any answers from anyone who hadn't read through the user manuals for both parts, something that will take far too long to do just to be helpful. – Andrew Nov 4 '16 at 11:09
• @Andrew I will gladly remove the actual processor references. Their purpose was to make the question less vague. When posting the question I was assuming there is a recommended way on what protocol to use given the constraints wifi would impose. I skipped UART because I believe it's to slow to be even considered, but don't know about other protocols. – TheMeaningfulEngineer Nov 4 '16 at 11:13
• All those buses has a master and slave side, you need to make sure ESP32 supports the slave side. Also SDIO looks promising because I've seen SoCs connected to such WIFI modems like TI's wl18xx series ti.com/product/WL1801MOD – user3528438 Nov 4 '16 at 11:26
• If the wifi/bluetooth device was a dumb slave then it would be fairly simple, use the highest bandwidth connection available and double check that you didn't need two connections, one for each radio (e.g. it looks like there's an MII interface on there so MII for wifi and then something simple like uart for BT). But at first glance it looks like it's not just a dumb radio, it's a CPU which you run user code on. At that point I'd be passing the list of options over to the guy who's got to write the firmware and asking him what would make his life easier. – Andrew Nov 4 '16 at 11:33
• Finally, I don't think ESP32 is necessarily in your design because most, if not all, of the components in ESP32 have equivalents in the A20, except the WIFI and Bluetooth modem. It may not be a bad idea to redesign and move ESP32's tasks to A20 and attach A20 to a WIFI/Bluetooth modem. This makes your software work much easier because you can easily find open source or vendor provided driver and firmware if you pick the right component. – user3528438 Nov 4 '16 at 11:49

## 1 Answer

There are a few reasons why the A20/ESP32 aren't the optimal approach:

• All those buses has a master and slave side. The ESP32 is a full blown programmable microcontroller which one would run user code on. As such it primary function is to be a master. You need to make sure ESP32 supports the slave side.
• If the ESP32 is capable of being run as a slave, it will need a custom kernel driver on the Linux side to be able to provide the same userspace API that the "dumb" devices do.

Otherwise, choosing the correct protocol is mainly a question of data throughput and availability of Linux driver support.