cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP257x-EV1 TSN/Ethernet Not Working

user_ABCD
Associate II

Hello -

I have the STM32MP257x-EV1 up and running the base image. I have included the layers for the Ethernet switch and TSN. I am trying to understand the embedded Ethernet Switch better. I am working with the assumption that I can plug in two endpoints to ETH1 and ETH3 with no interaction from the MPU and pass ethernet traffic (e.g., ping).

But this does not work from the get-go. Is there something that needs to be done to enable it?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Bernard PUEL
ST Employee

BernardPUEL_0-1726155758473.png

Hello, Here is the network config after you applied the linux expansion for tsnswch. There is no application so you have to do it manually. For ex, if you assign IP 192.168.0.20 on the PC plugged on ETH1, you will be able to ping sw0ep or ping another PC plugged on ETH3 with a static IP set to 192.168.0.30. If Then you want to test ETH2, you can assign end0 a static new network IP address and activate IPforwarding on the board.

 

View solution in original post

18 REPLIES 18
Bernard PUEL
ST Employee

BernardPUEL_0-1726155758473.png

Hello, Here is the network config after you applied the linux expansion for tsnswch. There is no application so you have to do it manually. For ex, if you assign IP 192.168.0.20 on the PC plugged on ETH1, you will be able to ping sw0ep or ping another PC plugged on ETH3 with a static IP set to 192.168.0.30. If Then you want to test ETH2, you can assign end0 a static new network IP address and activate IPforwarding on the board.

 

Here is the link for additional information: https://wiki.st.com/stm32mpu/wiki/Ethernet_switch_overview

This article will be updated soon to give more.

Thank you!

The issue I am bringing up, is the fact that what you suggest is exactly what I tried, and it does not work.

I confirmed I have tsnswch image up and running, I get interfaces sw0p1,2,3 and end0/end1. I do not get a Sw0ep endpoint though (or br0), unsure if I need to configure that?

Lastly, the links for sw0p3 and sw0p2 go up and down accordingly when pulling cables, so the links are up, but no traffic will pass. I have the machines configured as 10.0.0.1/24 and 10.0.0.2/24, but they cannot ping each other.

 

Hello,

What I described before is what I did on my EV board and it was working so we need to check.

I did this = https://github.com/STMicroelectronics/meta-st-stm32mp-tsn-swch/blob/mickledore/README.md

Then flash the resulting image on my EV1 board. Here is the network config result on my side:

root@stm32mp2:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: end1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 10:e7:7a:e3:b8:e2 brd ff:ff:ff:ff:ff:ff
    altname ethernet1
    altname ethernet1.eth1
    inet6 fe80::12e7:7aff:fee3:b8e2/64 scope link 
       valid_lft forever preferred_lft forever
3: end0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 10:e7:7a:e3:b8:e1 brd ff:ff:ff:ff:ff:ff
    altname ethernet0
    altname ethernet0.eth2
    inet6 fe80::12e7:7aff:fee3:b8e1/64 scope link 
       valid_lft forever preferred_lft forever
4: sw0p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UNKNOWN group default qlen 1000
    link/ether 7a:99:45:83:3d:00 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::7899:45ff:fe83:3d00/64 scope link 
       valid_lft forever preferred_lft forever
5: sw0p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
    link/ether 7a:99:45:83:3d:01 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::7899:45ff:fe83:3d01/64 scope link 
       valid_lft forever preferred_lft forever
6: sw0p3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel master br0 state DOWN group default qlen 1000
    link/ether 7a:99:45:83:3d:02 brd ff:ff:ff:ff:ff:ff
7: sw0ep: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 10:e7:7a:e3:b8:e2 brd ff:ff:ff:ff:ff:ff permaddr 7a:99:45:83:3d:ff
    inet 192.168.0.10/32 scope global sw0ep
       valid_lft forever preferred_lft forever
    inet6 fe80::12e7:7aff:fee3:b8e2/64 scope link 
       valid_lft forever preferred_lft forever
8: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 
9: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 
10: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether e2:52:de:58:54:5d brd ff:ff:ff:ff:ff:ff
    inet6 fe80::e052:deff:fe58:545d/64 scope link 
       valid_lft forever preferred_lft forever

 

So I guess if you change IP adresse of "sw0ep" to 10.0.0.x you will be able to ping it and ping the machines connected to the switch interface.

 

ip a results in no br0 and sw0ep being in the down state for me.

user_ABCD_0-1726238346915.png

Here is what I am trying in the below picture that doesn't work.

user_ABCD_1-1726238438779.png

 

user_ABCD
Associate II

Was there any updates or thoughts on this?

did you try to set IP address like I advised ?

It seems your default network configuration is wrong, so need to check why ....

As described in wiki the network config is set thanks to this script = /usr/sbin/ttt-ip-init-systemd.sh 

So try to apply manually the config and check what is failling.

especially this sequence =

    ip link add name br0 type bridge

    ip link set dev br0 up

    ip link set dev sw0p1 master br0 up

    ip link set dev sw0p2 master br0 up

    ip link set dev sw0p3 master br0 up

    ip link set dev sw0ep up