Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to reference the n'th port on a multiple port device #10

Open
davidc0le opened this issue Oct 31, 2024 · 3 comments
Open

Add ability to reference the n'th port on a multiple port device #10

davidc0le opened this issue Oct 31, 2024 · 3 comments

Comments

@davidc0le
Copy link

Some devices expose multiple serial ports on a single USB port. For example, the AMD/Xilinx KR260 development kit uses a FTDI FT4232H and when you connect to a system, you see 4 serial ports.

[721176.705420] usb 2-1: new high-speed USB device number 3 using xhci-hcd
[721176.835666] usb 2-1: New USB device found, idVendor=0403, idProduct=6011, bcdDevice= 8.00
[721176.835675] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[721176.835679] usb 2-1: Product: KR Carrier Card
[721176.835683] usb 2-1: Manufacturer: Xilinx
[721176.835687] usb 2-1: SerialNumber: XFL1UUHT425Y
[721176.838668] usb 2-1: Detected FT4232H
[721176.838817] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB2
[721176.840615] usb 2-1: Detected FT4232H
[721176.840784] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB3
[721176.842555] usb 2-1: Detected FT4232H
[721176.842684] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB4
[721176.844399] usb 2-1: Detected FT4232H
[721176.844520] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB5

It would be good if we could reference the SN ('XFL1UUHT425Y' from the example above) , with some reference to the n'th serial number in the consrv toml file, for example 'XFL1UUHT425Y;2' could be mapped to the 2nd port on the FT4232H

@mdlayher
Copy link
Owner

Interesting, yeah makes sense to me. Is there a standard syntax for that type of addressing? Otherwise I'd be inclined to go with serial:port because it matches IP:port syntax.

@mdlayher
Copy link
Owner

One other thing: I don't have a device with this capability and thus can't poke around the sysfs entries. A contribution would be welcome. Basically:

[[devices]]
name = "desktop"
serial = "DEADBEEF:0"
baud = 115200

[[devices]]
name = "desktop"
serial = "DEADBEEF:1"
baud = 115200

Or similar is what I had in mind.

@mdlayher
Copy link
Owner

mdlayher commented Nov 4, 2024

One other config option that might be better:

[[devices]]
name = "desktop"
serial = "DEADBEEF"
port = 0
baud = 115200

Where port = 0 is implied by default but can be explicitly set to index 1 or more for multi port devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants