Re: [Lazarus] How to list available serial ports on Linux?

2020-10-07 Thread Bo Berglund via lazarus
On Wed, 7 Oct 2020 11:43:50 +1300, Wolf via lazarus wrote: >By submitting your question to DuckDuckGo, I found >https://stackoverflow.com/questions/2530096/how-to-find-all-serial-devices-ttys-ttyusb-on-linux-without-opening-them > >To quote: > >|To see which tty's are currently in use, you can

Re: [Lazarus] How to list available serial ports on Linux?

2020-10-06 Thread Corpsman via lazarus
That is how do it: Function GetSerialPortNames(): String; Var   sl: TStringlist; Var   Info: TSearchRec;   hdl: THandle;   b: Boolean; Begin   sl := TStringlist.create;   If FindFirst('/dev/tty*', faSysFile, Info) = 0 Then Begin     Repeat   b := true;   Try     hdl :=

Re: [Lazarus] How to list available serial ports on Linux?

2020-10-06 Thread Wolf via lazarus
By submitting your question to DuckDuckGo, I found https://stackoverflow.com/questions/2530096/how-to-find-all-serial-devices-ttys-ttyusb-on-linux-without-opening-them To quote: |To see which tty's are currently in use, you can simply look into the file /proc/tty/drivers: and get a rather

[Lazarus] How to list available serial ports on Linux?

2020-10-06 Thread Bo Berglund via lazarus
Is there a way to list the available (working) serial ports on a Linux platform like the RaspberryPi? I would like to offer a dropdown list of working serial ports to the user to select among, but I am dissuaded from it when I do the following: ls -la /dev/tty* It returns a very long list of