Dear ML,
how can I instruct the kernel (if possible) to map a certain serial
port to a specific device ttySx?
I have 4 16550 ports and kernel ( the driver, I suppose) say to me:
Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A
I would like to change the map ttySx -> I/O port. I try with setserial
but it doesn't work....Any clue?
TIA
p
On Thursday 2009-01-29 12:02, Pazzo Da Legare wrote:
>Dear ML,
>
>how can I instruct the kernel (if possible) to map a certain serial
>port to a specific device ttySx?
>I have 4 16550 ports and kernel ( the driver, I suppose) say to me:
>
>Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
>serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
>serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
>00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
>00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A
>
>I would like to change the map ttySx -> I/O port. I try with setserial
>but it doesn't work....Any clue?
If you want to access ttyS4, etc. you need to increase
CONFIG_SERIAL_8250_NR_UARTS. I found that using setserial(8)
to change ports for an existing ttyS[0-3] has no effects.
Am Thursday 29 January 2009 13:43:02 schrieb Jan Engelhardt:
> >Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
> >serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> >serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
> >serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
> >serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
> >00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> >00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
> >00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
> >00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A
> >
> >I would like to change the map ttySx -> I/O port. I try with setserial
> >but it doesn't work....Any clue?
They are just names. Create device nodes with the name you like and
the correct major:minor combination. Udev can do this for you.
Regards
Oliver
On Thu, 29 Jan 2009 12:02:49 +0100
Pazzo Da Legare <[email protected]> wrote:
> Dear ML,
>
> how can I instruct the kernel (if possible) to map a certain serial
> port to a specific device ttySx?
The kernel mapping defaults are from a table so you could recompile
the kernel. However applications should always let you select a serial
port.
Alan
Dear Alan,
Thank you very much for your help.
I'm going to have a look at the table you mentioned. Yes, I know that
usually one should make the selection from application, in my case I'm
trying to uniform two different hardware maintaining the
configuration for applications (running on both).
The hws have a different combination of kind serials and I would like
to present the same ttyS* to applications. I need to have different
kernel configuration so I thought I could uniform things there....I'm
going to evaluate the hardness
p
2009/1/29 Alan Cox <[email protected]>:
> On Thu, 29 Jan 2009 12:02:49 +0100
> Pazzo Da Legare <[email protected]> wrote:
>
>> Dear ML,
>>
>> how can I instruct the kernel (if possible) to map a certain serial
>> port to a specific device ttySx?
>
> The kernel mapping defaults are from a table so you could recompile
> the kernel. However applications should always let you select a serial
> port.
>
> Alan
>
Dear Oliver,
Thank you very much for your help. I'm going to try your suggestion.
p
2009/1/29 Oliver Neukum <[email protected]>:
> Am Thursday 29 January 2009 13:43:02 schrieb Jan Engelhardt:
>> >Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
>> >serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>> >serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>> >serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
>> >serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
>> >00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>> >00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>> >00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
>> >00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A
>> >
>> >I would like to change the map ttySx -> I/O port. I try with setserial
>> >but it doesn't work....Any clue?
>
> They are just names. Create device nodes with the name you like and
> the correct major:minor combination. Udev can do this for you.
>
> Regards
> Oliver
>
>
> The hws have a different combination of kind serials and I would like
> to present the same ttyS* to applications. I need to have different
By having multiple different kernels for the different systems ? That
sounds like a really really complicated way to go about the problem when
you could just add a config file to your application.
On Thu, 29 Jan 2009, Alan Cox wrote:
> > The hws have a different combination of kind serials and I would like
> > to present the same ttyS* to applications. I need to have different
> By having multiple different kernels for the different systems ? That
> sounds like a really really complicated way to go about the problem when
> you could just add a config file to your application.
Another possibility is udev rule.
--
Jiri Kosina
SUSE Labs
On Thu, 29 Jan 2009 17:22:54 +0100 (CET)
Jiri Kosina <[email protected]> wrote:
> On Thu, 29 Jan 2009, Alan Cox wrote:
>
> > > The hws have a different combination of kind serials and I would like
> > > to present the same ttyS* to applications. I need to have different
> > By having multiple different kernels for the different systems ? That
> > sounds like a really really complicated way to go about the problem when
> > you could just add a config file to your application.
>
> Another possibility is udev rule.
If its a simple naming choice then a symlink might do the job. What
Fedora and several other distros do is to create symbolic links from
"virtual" names like /dev/modem and /dev/cdrom to the relevant port using
ln -s
Dear Alan,
Thanks again. I think I will follow your last (easier) advice.
p
2009/1/29 Alan Cox <[email protected]>:
> On Thu, 29 Jan 2009 17:22:54 +0100 (CET)
> Jiri Kosina <[email protected]> wrote:
>
>> On Thu, 29 Jan 2009, Alan Cox wrote:
>>
>> > > The hws have a different combination of kind serials and I would like
>> > > to present the same ttyS* to applications. I need to have different
>> > By having multiple different kernels for the different systems ? That
>> > sounds like a really really complicated way to go about the problem when
>> > you could just add a config file to your application.
>>
>> Another possibility is udev rule.
>
> If its a simple naming choice then a symlink might do the job. What
> Fedora and several other distros do is to create symbolic links from
> "virtual" names like /dev/modem and /dev/cdrom to the relevant port using
> ln -s
>