-
Notifications
You must be signed in to change notification settings - Fork 477
Feature Request: lwIP_esp32 with Espressif "esp_hosted" firmware for esp32 #1806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the info @JAndrassy! I don't have any ESP32+RP2040 boards handy, but I think I've got some OG ESP32s floating around in the junk drawer... Looks like that firmware also supports a standard Bluetooth HCI implementation. So BTStack might also be persuaded to play nicely with it. |
I tested it with Uno R4 with esp32 on SPI. but Uno R4 is in the same platform as the Portenta C33 for which the ESPHosted library was written. It uses HAL SPI. I did a rewrite with Arduino SPI library but for now that is slow or what. It misses the events from esp32. Arduino has some simple patches to firmware source code to use it with ArduinoBLE library. |
I can send out a couple of boards to anyone wanting to try this out @earlephilhower , @JAndrassy ? |
I noticed the design uses an additional (data ready) pin which differs from the esp-at SPI implementation which our boards are based on. But I guess repurposing the boot select pin would be doable enabling full functionality. |
I made some progress. I extracted the ESPHost library from the Renesas Core into a separate repository and I modified it to run on any ARM Arduino. The library has a test in examples. The test does the WiFi related functions like connecting to AP, scan and similar. The test works with this core. I integrated ESPHost into Arduino Mbed Core networking in form of ESPHosted-EMAC library. It is just a rough draft, but it works. The ESPHostEMAC.cpp shows how to integrate it with LwIP. |
That's awesome work! I can tell you've been very busy over the holidays! Will you be leaving those repos up? I've got home renovations taking up most of my "free" time and won't be able to give it a deep dive for a couple weeks. |
of course maybe I even start drafting the integration here. but first I want to fix the WiFi library in the Mbed Core, which I finally can test. |
this weekend I was able to make the esp-hosted firmware with the ESPHost library basic example on my new "Arduino Nano RP2040 Connect".
|
@PontusO Hello. I want to build the esp-hosted firmware for the Challenger boards so you can test the lwIP_ESPHost library. |
I'm having some issues with the esp-hosted-fg (built using their defaults) on an ESP32C6 board and the LWIP driver here, would appreciate any suggestions on how to debug. I've double checked the wiring between the RPIPico board and the ESP32-C6 and have everything agreeing AIUI, but other than an initial SPI transaction being dumped I see no other SPI transactions while enabling full core debug. The ESP32C6 dumps the following config info to serial:
My boards.local.txt is:
I've wired as follows:
And configured SPI to use the appropriate pins at the beginning of
I've started going down the driver code in GDB but it's real slow going. I was wondering if you have any suggestions on where to start, or if there are certain version dependencies or something higher level. Everything is the |
@earlephilhower your initial log of the fw should end with something like "leaving main()" (the handling tasks started). |
@JAndrassy awesome, thanks for the info! I had to move to a ESP32-S3 to get that tag Those minor diffs, rewiring, and voila! Very nice work.
|
@JAndrassy For the C3 board that is correct. The C6 board is connected a bit differently. MISO IO3, MOSI IO7, CLK IO6, SS IO12, HS IO2 and IO9 is also connected. |
@JAndrassy any reason to keep this open? You seem to have completed it. 😄 |
you can close it. |
@PontusO the esp-hosted fw configuration for C3 has 30 MHz SPI so use |
@PontusO sorry. the upload command in the README had a wrong address for the bootloader. on C3 the bootloader address is 0x0 |
Discussed in #1795
Originally posted by JAndrassy October 29, 2023
Espressif has for esp32 a fw which makes it a MAC level WiFi adapter. The host MCU then has the TCP/IP stack and a network interface driver for the esp32.
This could be used to allow esp32 as WiFi network interface for Pico LwIP.
The repository
https://github.com/espressif/esp-hosted/tree/master/esp_hosted_fg
Arduino uses this for their new Portenta C33 board which has STM32 MCU with esp32-C3 for WiFi with LwIP.
Here is the driver
https://github.com/arduino/ArduinoCore-renesas/tree/main/libraries/ESPhost/src
There are multiple RP2040 boards with esp32 on SPI for WiFi. The Challenger RP2040 WiFi/BLE MkII board, the Arduino Nano Connect
cc: @PontusO
The text was updated successfully, but these errors were encountered: