Skip to content

No network inface found when enabling ethernet with the "Arduino portenta H7 board" and the "Portenta Hat Carrier" shield #79589

Closed
@El-Bucheron

Description

@El-Bucheron

Describe the bug

Hello,
As mentioned in the title, I am having trouble enabling Ethernet on the Arduino Portenta H7 when using a Portenta Hat Carrier, which includes an Ethernet port. My initial goal was to enable Ethernet, connect the board to my computer, and perform a simple ping test. However, each time I boot the board, the logs display:
[00:00:00.010,000] <err> net_if: There is no network interface to work with!
despite my belief that I have configured the Ethernet layer correctly.

I am confident the issue is not related to my Ethernet cable or network, as I have successfully received UDP packets from my computer to the board using an Arduino example code. I also doubt that the problem lies in my code, as it is just a simple k_sleep(K_FOREVER);. Additionally, my prj.conf file is straightforward, with basic settings to enable Ethernet, assign an IP address, and enable logging and the network shell (as detailed in the To Reproduce section).

I suspect the issue could be related to the fact that the shield I’m using may not be fully supported by Zephyr. However, after reviewing the schematic of the Portenta Hat Carrier (see the image below), the pin configuration does not appear to have been altered, which leads me to believe the shield should be compatible with the Ethernet implementation.

image

Therefore, I believe the problem lies in how the Ethernet configuration is initialized for the Arduino Portenta H7 in the source code—possibly due to incorrect pin configuration or something similar. I would appreciate any assistance or advice. Thank you in advance for your help!


To Reproduce

Here is the structure of my project "test_ethernet" and the content of the files

test_ethernet
├── src
│   ├── main.c
├── app.overlay
├── CMakeLists.txt
└── prj.conf
  • main.c
#include <zephyr/kernel.h>

int main(void)
{
	/* This sample uses the shell */
	k_sleep(K_FOREVER);

	return 0;
}
  • app.overlay : empty
  • CMakeLists.txt
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(test_ethernet)

target_sources(app PRIVATE src/main.c)
  • prf.config
# Enabling networking and Ethernet
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NETWORKING=y
CONFIG_NET_DRIVERS=y
CONFIG_NET_L2_ETHERNET=y

# IPv4 Configuration
CONFIG_NET_IPV4=y
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.56.2"
CONFIG_NET_CONFIG_MY_IPV4_NETMASK="255.255.255.0"

# Logs
CONFIG_NET_LOG=y
CONFIG_LOG=y
CONFIG_NET_STATISTICS=y
CONFIG_PRINTK=y

# Network shell
CONFIG_NET_SHELL=y
CONFIG_SHELL=y

Expected behavior
Something like that (obtained by simulating a qemu board)

uart:~$ net iface
Hostname zephyr

Interface eth0 (0x111111) (Ethernet) [1]
======================
.
# Interface Description
.

Logs and console output

Here are the logs when the board boots

[00:00:00.010,000] <err> net_if: There is no network interface to work with!
*** Booting Zephyr OS build v3.7.0-2392-g8c32a82e47f5 ***
[00:00:00.010,000] <wrn> net_config: No auto-started network interface - network-bound app initialization skipped.

Environment (please complete the following information):

  • OS: Windows
  • Toolchain: Zephyr SDK 0.16.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug, or the PR is fixing a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions