ESP32 virtual network interface

pmoneta
Posts: 6
Joined: Wed Oct 06, 2021 5:49 pm

ESP32 virtual network interface

Postby pmoneta » Wed Jul 26, 2023 9:17 pm

Hello, i would like to know if there is a way to point to esp32 netif ethernet interface (like "en1" or "ETH_DEF") while using an HAL library from software that runs on linux. I already figured out how to port the storage HAL, filesystem HAL and threads HAL, and i'm currently trying to port the ethernet HAL, with no success.

The library show the following line to choose a virtual network interface using NIC names:
esp32.jpg
esp32.jpg (22.94 KiB) Viewed 2058 times
I've tried every possible combination from esp_netif ("/dev/net/en1", "en1", "eth0", "eth", "ETH_DEF", etc) and couldn't get it to work, and i have already configured the ethernet interface and obtained these parameters (i'm using the WT32-ETH01 board):
esp322.jpg
esp322.jpg (9.74 KiB) Viewed 2058 times
So i was wondering if i'm really ABLE to point that interface in the first place, because esp uses freertos and i don't know if i can use these NIC names on this operating system.
Last edited by pmoneta on Thu Jul 27, 2023 9:58 am, edited 1 time in total.

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 virtual network interface

Postby ESP_Sprite » Thu Jul 27, 2023 1:40 am

This probably doesn't work as any Linux calls on that interface don't have an equivalent in LwIP (the TCP/IP stack ESP-IDF uses). Possibly you need to track down those calls and change them to their ESP-IDF equivalents.

pmoneta
Posts: 6
Joined: Wed Oct 06, 2021 5:49 pm

Re: ESP32 virtual network interface

Postby pmoneta » Thu Jul 27, 2023 9:56 am

So i should point to the ethernet driver and not netif? I didnt find any esp32 interface in the programming guide

pmoneta
Posts: 6
Joined: Wed Oct 06, 2021 5:49 pm

Re: ESP32 virtual network interface

Postby pmoneta » Sat Jul 29, 2023 3:37 pm

Thanks! i figured out that i have to create my own HAL for esp32!

andreaslundeen
Posts: 1
Joined: Wed Oct 04, 2023 12:46 pm

Re: ESP32 virtual network interface

Postby andreaslundeen » Wed Oct 04, 2023 1:04 pm

I am also interrested in this setup. Can you share some of your progress?

pmoneta
Posts: 6
Joined: Wed Oct 06, 2021 5:49 pm

Re: ESP32 virtual network interface

Postby pmoneta » Thu Mar 21, 2024 4:28 pm

andreaslundeen wrote:
Wed Oct 04, 2023 1:04 pm
I am also interrested in this setup. Can you share some of your progress?
sry for the late response. what do you want to know?

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 111 guests