siemens / meta-iot2050

SIMATIC IOT2050 Isar/Debian Board Support Package
MIT License
131 stars 77 forks source link

Issue in configuring externel COM port serial mode #562

Closed ananthakr23 closed 1 month ago

ananthakr23 commented 1 month ago

Hello all,

I tired to configure the modes of external COM port via iot2050setup tool on the example image built from tag V01.04.02 Following is the behavior observed: image

Observed the error on IOT2050-Advacanced-PG2 board

When directly using the switchserialmode tool observed similar error.

root@iot2050-debian:~# switchserialmode -m rs232
Read config failed
Cp2102n init falied
Init error
root@iot2050-debian:~#
root@iot2050-debian:~# switchserialmode -d
Read config failed
Cp2102n init falied
Init error
root@iot2050-debian:~#

Thank you.

huaqianli commented 1 month ago

Hi @ananthakr23 ,

Thank you for bringing this to our attention.

I hope you can help to clarification the below questions:

I tested on IOT2050 PG2 A with the same version, but I haven't encountered the issue yet.

Please provide more details so we can assist you better. And also:

Thanks.

ananthakr23 commented 1 month ago

Hi @huaqianli,

Thank you for pointing out the probing of CP210x module.

Is there a specific path to reproduce your problem?

No I just normally launch the iot2050setup at runtime and select configure external COMs

Can the issue be resolved by rebooting?

Rebooting did not resolve the issue.

Logs: (Observed the cp210x was not probed)

root@iot2050-debian:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 10c4:ea62 Silicon Labs
Bus 003 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@iot2050-debian:~#

dmesg.log

However i took the opportunity to test on another IOT2050 PG2 Advanced device that we had and the issue was not reproduced in that board.

root@iot2050-debian:~# cat /proc/device-tree/model
SIMATIC IOT2050 Advanced PG2root@iot2050-debian:~#
root@iot2050-debian:~#
root@iot2050-debian:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 003 Device 003: ID 413c:2113 Dell Computer Corp. KB216 Wired Keyboard
Bus 003 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0781:5581 SanDisk Corp. Ultra
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@iot2050-debian:~#
root@iot2050-debian:~# switchserialmode -d
rs232 low setup-time(0x00aa) hold-time(0x00aa)
root@iot2050-debian:~#

root@iot2050-debian:~# switchserialmode -d
rs485 high setup-time(0x00aa) hold-time(0x00aa)
root@iot2050-debian:~#

So it seems only the board I originally tested had this issue.

huaqianli commented 1 month ago

Hi @ananthakr23 ,

Based on your description, it is possible that the CP210x chip on the board is malfunctioning. The dmesg.log also indicates that no CP210x device was detected during probing.

Thanks.