Bug 542849 - Allow SerialPort.list() to return devices starting with ttyS on Linux
Summary: Allow SerialPort.list() to return devices starting with ttyS on Linux
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: Next   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-17 07:29 EST by Waqas Ilyas CLA
Modified: 2020-09-04 15:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Waqas Ilyas CLA 2018-12-17 07:29:43 EST
Would be nice if SerialPort.list() returns devices that start with "ttyS". I have seen this prefix being used commonly on Ubuntu.
Comment 1 Eclipse Genie CLA 2019-01-08 10:59:57 EST
New Gerrit change created: https://git.eclipse.org/r/134782
Comment 2 Doug Schaefer CLA 2019-01-08 14:27:42 EST
On my Ubuntu machine I have 32 such ports. Is the user experience of seeing such a big list overwhelming, or do you think it's OK?
Comment 3 Jonah Graham CLA 2019-01-08 16:00:38 EST
(In reply to Doug Schaefer from comment #2)
> On my Ubuntu machine I have 32 such ports. Is the user experience of seeing
> such a big list overwhelming, or do you think it's OK?

I think this is fine. /dev/ttyS* is the normal thing for serial ports on Ubuntu. gtkterm lists /dev/ttyS0-11 on my machine *but* there are more than that in /dev/. If you really want to get fancy you can use things like /dev/serial/by-id to find out what is really there.

Seeing as how at least SerialPortConnectionBlock uses the returned list in a read only combo if you don't list it then a user cannot use it. (And on a quick review it looks like SerialSettingsPage will not really let users edit, save and reload properly if not in the list).

So all in all I would err on including them. Doug, I have +1'ed, I leave +2/-2 to you.
Comment 4 Doug Schaefer CLA 2019-01-08 16:41:46 EST
Thanks Jonah. I'm really on the fence so I'll push it.

Really like your idea on /dev/serial. I have a couple of ports plug-in through USB and can't tell from the number which is which. the by-id at least tells me some real info on which is which.

total 0
lrwxrwxrwx 1 root root 13 Jan  8 09:49 usb-FTDI_TTL232R-3V3_FTAJZJF3-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Jan  8 09:49 usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 -> ../../ttyUSB1