zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.84k stars 6.6k forks source link

drivers: wifi: esp_at: support offloaded WiFi networking using ESP-AT over SPI #38242

Open mniestroj opened 3 years ago

mniestroj commented 3 years ago

Is your enhancement proposal related to a problem? Please describe. So far there is only UART interface supported by esp_at WiFi drivers. Firmware that is used on ESP (e.g. ESP32 or ESP8266) supports SPI (among others listed in esp-at firmware repo) interface as an alternative to UART, still using lots of common features like AT commands as serialization format. There are number of boards on the market that use SPI as interface between host processor and WiFi chip, such as:

Describe the solution you'd like Add SPI as new interface in modem_context framework, which is used by esp_at WiFi drivers. Extend esp_at drivers to support SPI interface, by adding SPI bus bindings and corresponding initialization code.

Describe alternatives you've considered Extend esp_at directly without touching modem_context, if there is no way of doing AT commands over SPI in a generic way.

beriberikix commented 3 years ago

Here's some additional boards/modules that I found that either only support SPI or default to SPI:

/cc @tannewt @sylvioalves

beriberikix commented 1 year ago

Can we add the Platform: Espressif label to this issue to increase visibility? As it currently stands, it's really an Espressif-specific implementation.

mniestroj commented 1 year ago

Can we add the Platform: Espressif label to this issue to increase visibility? As it currently stands, it's really an Espressif-specific implementation.

Any host MCU vendor can be used. The only Espressif-specific part is the peripheral device. In that case I think we don't specify tags per vendor. It is also not limited to Espressif hardware, as any other WiFi chip acting as SPI peripheral can be used, assuming that the same AT commands will be implemented.

beriberikix commented 1 year ago

Ah, I didn't realize that this was abstracted in some way! The esp_at gave me the impression that's it was Espressif-specific. Can it be expanded to other AT-based Wi-Fi protocols, ala the new modem subsystem? AFAIK while Espressif's AT protocol is based on 3GPP TS 27.007, it's all custom from Espressif. And I believe other Wi-Fi vendors also create their own protocols as well? AFAIK, only Espressif uses this AT command set, but I certainly haven't looked!