Pio device list: too many ports being listed?!

# [2024-09-17 19:57] maxg@x570 ~/Workspaces/PlatformIO/Projects/BoreLevel $
pio system info
--------------------------  --------------------------------------------
PlatformIO Core             6.1.15
Python                      3.10.12-final.0
System Type                 linux_x86_64
Platform                    Linux-6.8.0-40-generic-x86_64-with-glibc2.35
File System Encoding        utf-8
Locale Encoding             UTF-8
PlatformIO Core Directory   /home/maxg/.platformio
PlatformIO Core Executable  /home/maxg/.platformio/penv/bin/platformio
Python Executable           /home/maxg/.platformio/penv/bin/python
Global Libraries            0
Development Platforms       5
Tools & Toolchains          32

Since a few days (and I have no idea what did it), I am getting ports listed which have nothing connected to them. Is there a way to fix this?
Here the result from pio device list.

pio device list
/dev/ttyS0
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS1
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS2
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS3
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS4
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS5
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS6
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS7
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS8
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS9
----------
Hardware ID: n/a
Description: n/a

/dev/ttyS10
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS11
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS12
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS13
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS14
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS15
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS16
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS17
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS18
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS19
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS20
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS21
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS22
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS23
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS24
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS25
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS26
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS27
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS28
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS29
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS30
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyS31
-----------
Hardware ID: n/a
Description: n/a

/dev/ttyUSB0
------------
Hardware ID: USB VID:PID=1A86:7523 LOCATION=5-2.4
Description: USB2.0-Serial

/dev/ttyUSB1
------------
Hardware ID: USB VID:PID=1A86:7523 LOCATION=5-2.1.4
Description: USB Serial

Technically, these are serial ports as the Linux kernel sees them. /dev/ttyS* ports are usually the hardware serial ports of the motherboard (old-school RS232 connectors). They could have something connected behind them. The only thing that’s weird is that you have 32 of them. Maybe they are actually virtually created by something?

Is this inside a virtual machine? On my Oracle VirtualBox Ubuntu 24.10 machine, I get the same ports.

What does sudo cat /proc/tty/driver/serial say?

1 Like

Nope… not running in a VM; PIO is running on my Linux Mint 21.3 machine…

sudo cat /proc/tty/driver/serial
[sudo] password for maxg:        
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:0 rx:0
1: uart:unknown port:000002F8 irq:3
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
8: uart:unknown port:00000000 irq:0
9: uart:unknown port:00000000 irq:0
10: uart:unknown port:00000000 irq:0
11: uart:unknown port:00000000 irq:0
12: uart:unknown port:00000000 irq:0
13: uart:unknown port:00000000 irq:0
14: uart:unknown port:00000000 irq:0
15: uart:unknown port:00000000 irq:0
16: uart:unknown port:00000000 irq:0
17: uart:unknown port:00000000 irq:0
18: uart:unknown port:00000000 irq:0
19: uart:unknown port:00000000 irq:0
20: uart:unknown port:00000000 irq:0
21: uart:unknown port:00000000 irq:0
22: uart:unknown port:00000000 irq:0
23: uart:unknown port:00000000 irq:0
24: uart:unknown port:00000000 irq:0
25: uart:unknown port:00000000 irq:0
26: uart:unknown port:00000000 irq:0
27: uart:unknown port:00000000 irq:0
28: uart:unknown port:00000000 irq:0
29: uart:unknown port:00000000 irq:0
30: uart:unknown port:00000000 irq:0
31: uart:unknown port:00000000 irq:0

It’s not a biggie, rather a nuisance … it wasn’t there before… and the ports of interest come last; meaning I do not have to browse through the list to find my controllers.


Well, I do not want to waste your time with this. This is not a PIO thing, is seems to be a Linux thing: tty - Why so many Virtual consoles? - Ask Ubuntu

The first port seems to actually be real, backed by a hardware UART, but the other ones just look wrong. Not sure what’s up with the Linxu kernel there, why they were created or detected.