OK, so I guess that you can’t run shell commands either?
To find ports in Linux at the operating system level, you use lsusb
and in case of problems dmesg -w
; I have no reason to believe that it would be different on a Raspberry Pi. But you need a monitor and a keyboard. In which case your statement printArray(Serial.list());
should also give the required data.
Can’t you iterate over the list of serial ports and print each entry on that screen?