siemens / meta-iot2050

SIMATIC IOT2050 Isar/Debian Board Support Package
MIT License
129 stars 76 forks source link

Ethernet Port X1P2 RX is 0 #368

Closed applea9 closed 1 year ago

applea9 commented 1 year ago

Hi,

I met a problem with IOT2050's Ethernet Port.

The network configuration is X1P1 port is in DHCP mode, X1P2 port is in static IP mode. My PC is connected to X1P2 port, and in the same subnet with X1P2.

After reboot several times, I found I can't ping the IP of IOT2050 X1P2 port. Then I logged in the IOT2050 through X1P1 port, and I saw that the RX of X1P2 port is 0.

The hardware is IOT2050 PG2, The OS image is customized based on V1.2.2.

And I use /etc/network/interfaces to manage the LAN port instead of Network Manager.

Could you help check this problem? Thanks.

jan-kiszka commented 1 year ago

Anything of your solution worth the share with the community? Or was it related to local specifics?

applea9 commented 1 year ago

In order to avoid the issues caused by /etc/network/interfaces, I switch to use NetworkManger to manage the LAN port.

But I can still meet such problem sometimes. And the problem is always occurd on eno2.

I use ifconfig and ethtool to get some diagnosis information, below is the inforamtion

eno2-ifconfig

eno2-ethtool

eno2-ethtool-errorl

muneale commented 1 year ago

Hi everyone, we are facing the same issue described here. We have done a bunch of experiments and these are the results:

We are using NetworkManager service, hardware is IoT2050 PG2 and the OS is based v1.2.2.

Any ideas how to solve this? If there is anything that could help you to solve this problem, just ask.

AsuraZeng commented 1 year ago

hi can you share your configuration in the /etc/network/interface.d?

AsuraZeng commented 1 year ago

Hi everyone, we are facing the same issue described here. We have done a bunch of experiments and these are the results:

* This error happens even when both iface are set with static IPs;

* This error happens randomly after few reboots.

We are using NetworkManager service, hardware is IoT2050 PG2 and the OS is based v1.2.2.

Any ideas how to solve this? If there is anything that could help you to solve this problem, just ask.

hi @muneale

I want to know how do you configure your IP address?

muneale commented 1 year ago

Hi everyone, we are facing the same issue described here. We have done a bunch of experiments and these are the results:

* This error happens even when both iface are set with static IPs;

* This error happens randomly after few reboots.

We are using NetworkManager service, hardware is IoT2050 PG2 and the OS is based v1.2.2. Any ideas how to solve this? If there is anything that could help you to solve this problem, just ask.

hi @muneale

I want to know how do you configure your IP address?

Hi @AsuraZeng !

So, when the device is booted/rebooted the NetworkManager service automatically loads each connection's configuration that is inside the folder /etc/NetworkManager/system-connections.

If a user needs to modify some properties (e.g. the IP address), it uses a custom service that communicates with NetworkManager through DBus API.

To be more precise:

  1. The custom service retrieves the connection configuration by query the NetworkManager through DBus.
  2. A configuration's copy is modified according to user input.
  3. The service deactivates the current connection, applies the modified configuration and reactivates the connection (always through DBus API).

Every changes to the connection's parameters is also applied to its configuration file, so at every reboot the changes will persist over time.

Currently the X1P2 configuration's file is the following (I just replaced id and uuid values):

[connection]
id=<my-id>
uuid=<my-uuid>
type=ethernet
interface-name=eth1
permissions=

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.10.100/24
address2=192.168.253.252/24
dns-search=
method=manual

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=ignore

Lastly, I'm sure that this bug is not related to my custom service since:

AsuraZeng commented 1 year ago

hi @muneale
could you pls provide what's the image version you use?

use

cat /etc/os-release
muneale commented 1 year ago

hi @muneale could you pls provide what's the image version you use?

use

cat /etc/os-release

This is the output of the command that you provided:

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
BUILD_ID="V01.02.01-15-gc54fe24"
VARIANT="IOT2050 Debian Example Image"
VARIANT_VERSION="1.0"
AsuraZeng commented 1 year ago

hi @muneale could you pls provide what's the image version you use? use

cat /etc/os-release

This is the output of the command that you provided:

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
BUILD_ID="V01.02.01-15-gc54fe24"
VARIANT="IOT2050 Debian Example Image"
VARIANT_VERSION="1.0"

I have reproduced this problem. I would look into this issue.

muneale commented 1 year ago

@AsuraZeng thank you so much! Let me know if you need anything else.

BTW, I also opened a topic on the Siemens support (link here). They stated this:

[...] according to R&D this behavior is known and a bug we currently have.
R&D is working on it, but it is really hard as it is a sporadic issue and has no real pattern to reproduce.

And also:

R&D did the tests with only one interface set to dhcp.
So it seems that it is not only your connection settings, but also others. 
Besides the reboot nobody could tell me another workaround unfortunately. 
I hope they will find out something soon
muneale commented 1 year ago

@AsuraZeng any news about the issue?

AsuraZeng commented 1 year ago

@AsuraZeng any news about the issue?

hi meueal

After catching up the icssg driver. it's ok. But this is needing more tests. currently, we are planning to do the tests.

you can refer https://github.com/siemens/meta-iot2050/pull/374

applea9 commented 1 year ago

Is this issue solved by PRhttps://github.com/siemens/meta-iot2050/pull/411?

jan-kiszka commented 1 year ago

We are still seeing sporadic issues after reboots (view in hundreds of them). If you still have a way to reproduce your issue, it would still be worth revalidating with that update. It's in line right now with latest BSP patches from TI, but that may not be yet sufficient for all setups.

applea9 commented 1 year ago

ok, I will try the updated version. So does it mean that further improvement or bug fix for this issue will depend on future BSP patches form TI?

muneale commented 1 year ago

I will also give it a try, thank you for your job. Also, could you tell us approximately when this patch will be part of an official release?