All of lore.kernel.org
 help / color / mirror / Atom feed
* Serial Port
@ 2021-02-11 11:22 Leandro Bucci
  2021-02-11 12:52 ` Philippe Gerum
  0 siblings, 1 reply; 16+ messages in thread
From: Leandro Bucci @ 2021-02-11 11:22 UTC (permalink / raw)
  To: xenomai

hello everyone, I wanted to ask if it is possible to make two devices
(Raspberry with xenomai) communicate through rs232 serial port, without
having to go to Linux and do domain switch

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Serial Port
  2021-02-11 11:22 Serial Port Leandro Bucci
@ 2021-02-11 12:52 ` Philippe Gerum
  0 siblings, 0 replies; 16+ messages in thread
From: Philippe Gerum @ 2021-02-11 12:52 UTC (permalink / raw)
  To: Leandro Bucci; +Cc: xenomai


Leandro Bucci via Xenomai <xenomai@xenomai.org> writes:

> hello everyone, I wanted to ask if it is possible to make two devices
> (Raspberry with xenomai) communicate through rs232 serial port, without
> having to go to Linux and do domain switch

There is more than a single PI model, you may want to be more
specific. Anyway, there are two types of uarts on a pi, one or more
PL011 uarts and a single mini-uart which is a 8250. The CPU frequency
affects the baud rate of the mini-uart, so using it implies fixing the
governor to get a stable rate. Although there is a RTDM driver for the
8250, there is none for the the PL011.

Back to your question, the answer is yes, provided you implement a RTDM
driver for the PL011 uart unless the capabilities and requirements of
the mini-uart are fine with you.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-19  7:18       ` Daryl Van Humbeck
@ 2007-11-19 17:13         ` Vesa Jääskeläinen
  0 siblings, 0 replies; 16+ messages in thread
From: Vesa Jääskeläinen @ 2007-11-19 17:13 UTC (permalink / raw)
  To: The development of GRUB 2

Daryl Van Humbeck wrote:
> If you wanted to enable both serial and graphical terminals (or any
> other kind(s) of terminals, just that there are more than one enabled at
> once), you'd really have to switch to using the Model/View/Controller
> architecture for user interaction.

That has been the plan.

> However there is also the difficulty that when you have two separate
> terminals into the same session (or whatever else you want to think of),
> that might become a security issue.

That is up-to user to choose what to do. If user do not care about
security through any of the terminals then he/she can disable it (or
better not to enable it at all). Then again you can reconsider whole
security concept of the whole system if you do not trust one input.
Making system secure is quite hard job, it kinda requires total
knowledge of the system and that is not always even possible.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 12:12     ` Vesa Jääskeläinen
  2007-11-18 12:24       ` Robert Millan
  2007-11-18 12:32       ` Marco Gerards
@ 2007-11-19  7:18       ` Daryl Van Humbeck
  2007-11-19 17:13         ` Vesa Jääskeläinen
  2 siblings, 1 reply; 16+ messages in thread
From: Daryl Van Humbeck @ 2007-11-19  7:18 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 1749 bytes --]

Vesa Jääskeläinen wrote:
> Robert Millan wrote:
>   
>> On Sun, Nov 18, 2007 at 12:33:00PM +0100, Marco Gerards wrote:
>>     
>>> Robert Millan <rmh@aybabtu.com> writes:
>>> Perhaps because the serial command sets it up?  Although I agree it
>>> seems a bit weird that it works this way.  Perhaps it should be
>>> enabled with the same defaults from the beginning?
>>>
>>> One problem of initializing it is that hardware will be accessed,
>>> while it might not be desirable.
>>>       
>> Maybe we could move this to grub_term.init ?  This way hardware is not
>> accessed untill user requests a switch.
>>     
>
> This is the same way it works with gfxterm. You define video mode
> beforehand of the switch.
>
> But there is actually a one architectual issue here... How are we going
> to support graphical terminal and serial terminal at the same time? eg.
> allow user to enable multiple terminals...
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>   
Just thought I'd put my two cents in to this discussion, I'm not really 
planning on contributing code to Grub 2, though I might help stimulate 
discussion...

If you wanted to enable both serial and graphical terminals (or any 
other kind(s) of terminals, just that there are more than one enabled at 
once), you'd really have to switch to using the Model/View/Controller 
architecture for user interaction.

However there is also the difficulty that when you have two separate 
terminals into the same session (or whatever else you want to think of), 
that might become a security issue.

Just my two cents on this matter.

Hope this helps (though it might not),
Daryl Van Humbeck.

[-- Attachment #2: Type: text/html, Size: 2476 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 12:32       ` Marco Gerards
@ 2007-11-18 12:43         ` Vesa Jääskeläinen
  0 siblings, 0 replies; 16+ messages in thread
From: Vesa Jääskeläinen @ 2007-11-18 12:43 UTC (permalink / raw)
  To: The development of GRUB 2

Marco Gerards wrote:
> Vesa Jääskeläinen <chaac@nic.fi> writes:
>> This is the same way it works with gfxterm. You define video mode
>> beforehand of the switch.
>>
>> But there is actually a one architectual issue here... How are we going
>> to support graphical terminal and serial terminal at the same time? eg.
>> allow user to enable multiple terminals...
> 
> It's not possible yet.  It would be a nice feature to have.  The
> problem is that the sizes do not match.  Should we use the smallest
> terminal?

Or just completely different ones?

For graphical menu I see that menu system would use different rendering
method than text mode menu. Actually this is a requirement for graphical
menu anyway. Different input methods could be merged after input
translations has been completed. And separate output methods for
specific terminal types? How this would work in reality I have not
thought it yet.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 12:24       ` Robert Millan
@ 2007-11-18 12:41         ` Marco Gerards
  0 siblings, 0 replies; 16+ messages in thread
From: Marco Gerards @ 2007-11-18 12:41 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan <rmh@aybabtu.com> writes:

> On Sun, Nov 18, 2007 at 02:12:59PM +0200, Vesa Jääskeläinen wrote:
>> Robert Millan wrote:
>> > On Sun, Nov 18, 2007 at 12:33:00PM +0100, Marco Gerards wrote:
>> >> Robert Millan <rmh@aybabtu.com> writes:
>> >> Perhaps because the serial command sets it up?  Although I agree it
>> >> seems a bit weird that it works this way.  Perhaps it should be
>> >> enabled with the same defaults from the beginning?
>> >>
>> >> One problem of initializing it is that hardware will be accessed,
>> >> while it might not be desirable.
>> > 
>> > Maybe we could move this to grub_term.init ?  This way hardware is not
>> > accessed untill user requests a switch.
>> 
>> This is the same way it works with gfxterm. You define video mode
>> beforehand of the switch.
>> 
>> But there is actually a one architectual issue here... How are we going
>> to support graphical terminal and serial terminal at the same time? eg.
>> allow user to enable multiple terminals...
>
> For input or output?

Both?  IT would be a nice feature to have.

--
Marco




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 12:12     ` Vesa Jääskeläinen
  2007-11-18 12:24       ` Robert Millan
@ 2007-11-18 12:32       ` Marco Gerards
  2007-11-18 12:43         ` Vesa Jääskeläinen
  2007-11-19  7:18       ` Daryl Van Humbeck
  2 siblings, 1 reply; 16+ messages in thread
From: Marco Gerards @ 2007-11-18 12:32 UTC (permalink / raw)
  To: The development of GRUB 2

Vesa Jääskeläinen <chaac@nic.fi> writes:

> Robert Millan wrote:
>> On Sun, Nov 18, 2007 at 12:33:00PM +0100, Marco Gerards wrote:
>>> Robert Millan <rmh@aybabtu.com> writes:
>>> Perhaps because the serial command sets it up?  Although I agree it
>>> seems a bit weird that it works this way.  Perhaps it should be
>>> enabled with the same defaults from the beginning?
>>>
>>> One problem of initializing it is that hardware will be accessed,
>>> while it might not be desirable.
>> 
>> Maybe we could move this to grub_term.init ?  This way hardware is not
>> accessed untill user requests a switch.
>
> This is the same way it works with gfxterm. You define video mode
> beforehand of the switch.
>
> But there is actually a one architectual issue here... How are we going
> to support graphical terminal and serial terminal at the same time? eg.
> allow user to enable multiple terminals...

It's not possible yet.  It would be a nice feature to have.  The
problem is that the sizes do not match.  Should we use the smallest
terminal?

--
Marco





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 12:12     ` Vesa Jääskeläinen
@ 2007-11-18 12:24       ` Robert Millan
  2007-11-18 12:41         ` Marco Gerards
  2007-11-18 12:32       ` Marco Gerards
  2007-11-19  7:18       ` Daryl Van Humbeck
  2 siblings, 1 reply; 16+ messages in thread
From: Robert Millan @ 2007-11-18 12:24 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Nov 18, 2007 at 02:12:59PM +0200, Vesa Jääskeläinen wrote:
> Robert Millan wrote:
> > On Sun, Nov 18, 2007 at 12:33:00PM +0100, Marco Gerards wrote:
> >> Robert Millan <rmh@aybabtu.com> writes:
> >> Perhaps because the serial command sets it up?  Although I agree it
> >> seems a bit weird that it works this way.  Perhaps it should be
> >> enabled with the same defaults from the beginning?
> >>
> >> One problem of initializing it is that hardware will be accessed,
> >> while it might not be desirable.
> > 
> > Maybe we could move this to grub_term.init ?  This way hardware is not
> > accessed untill user requests a switch.
> 
> This is the same way it works with gfxterm. You define video mode
> beforehand of the switch.
> 
> But there is actually a one architectual issue here... How are we going
> to support graphical terminal and serial terminal at the same time? eg.
> allow user to enable multiple terminals...

For input or output?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 11:56   ` Robert Millan
  2007-11-18 12:12     ` Vesa Jääskeläinen
@ 2007-11-18 12:14     ` Marco Gerards
  1 sibling, 0 replies; 16+ messages in thread
From: Marco Gerards @ 2007-11-18 12:14 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan <rmh@aybabtu.com> writes:

> On Sun, Nov 18, 2007 at 12:33:00PM +0100, Marco Gerards wrote:
>> Robert Millan <rmh@aybabtu.com> writes:
>> 
>> Hi,
>> 
>> > Any reason why the serial port is not enabled in grub_serial_init() ?
>> >
>> > grub> terminal
>> > Available terminal(s): console
>> > Current terminal: console
>> > grub> serial
>> > grub> terminal
>> > Available terminal(s): serial console
>> > Current terminal: serial
>> 
>> Perhaps because the serial command sets it up?  Although I agree it
>> seems a bit weird that it works this way.  Perhaps it should be
>> enabled with the same defaults from the beginning?
>> 
>> One problem of initializing it is that hardware will be accessed,
>> while it might not be desirable.
>
> Maybe we could move this to grub_term.init ?  This way hardware is not
> accessed untill user requests a switch.

As long as it stays within serial.mod.  Is that what you propose?

--
Marco




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 11:56   ` Robert Millan
@ 2007-11-18 12:12     ` Vesa Jääskeläinen
  2007-11-18 12:24       ` Robert Millan
                         ` (2 more replies)
  2007-11-18 12:14     ` Marco Gerards
  1 sibling, 3 replies; 16+ messages in thread
From: Vesa Jääskeläinen @ 2007-11-18 12:12 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan wrote:
> On Sun, Nov 18, 2007 at 12:33:00PM +0100, Marco Gerards wrote:
>> Robert Millan <rmh@aybabtu.com> writes:
>> Perhaps because the serial command sets it up?  Although I agree it
>> seems a bit weird that it works this way.  Perhaps it should be
>> enabled with the same defaults from the beginning?
>>
>> One problem of initializing it is that hardware will be accessed,
>> while it might not be desirable.
> 
> Maybe we could move this to grub_term.init ?  This way hardware is not
> accessed untill user requests a switch.

This is the same way it works with gfxterm. You define video mode
beforehand of the switch.

But there is actually a one architectual issue here... How are we going
to support graphical terminal and serial terminal at the same time? eg.
allow user to enable multiple terminals...




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-18 11:33 ` Marco Gerards
@ 2007-11-18 11:56   ` Robert Millan
  2007-11-18 12:12     ` Vesa Jääskeläinen
  2007-11-18 12:14     ` Marco Gerards
  0 siblings, 2 replies; 16+ messages in thread
From: Robert Millan @ 2007-11-18 11:56 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Nov 18, 2007 at 12:33:00PM +0100, Marco Gerards wrote:
> Robert Millan <rmh@aybabtu.com> writes:
> 
> Hi,
> 
> > Any reason why the serial port is not enabled in grub_serial_init() ?
> >
> > grub> terminal
> > Available terminal(s): console
> > Current terminal: console
> > grub> serial
> > grub> terminal
> > Available terminal(s): serial console
> > Current terminal: serial
> 
> Perhaps because the serial command sets it up?  Although I agree it
> seems a bit weird that it works this way.  Perhaps it should be
> enabled with the same defaults from the beginning?
> 
> One problem of initializing it is that hardware will be accessed,
> while it might not be desirable.

Maybe we could move this to grub_term.init ?  This way hardware is not
accessed untill user requests a switch.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2007-11-10 21:31 serial port Robert Millan
@ 2007-11-18 11:33 ` Marco Gerards
  2007-11-18 11:56   ` Robert Millan
  0 siblings, 1 reply; 16+ messages in thread
From: Marco Gerards @ 2007-11-18 11:33 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan <rmh@aybabtu.com> writes:

Hi,

> Any reason why the serial port is not enabled in grub_serial_init() ?
>
> grub> terminal
> Available terminal(s): console
> Current terminal: console
> grub> serial
> grub> terminal
> Available terminal(s): serial console
> Current terminal: serial

Perhaps because the serial command sets it up?  Although I agree it
seems a bit weird that it works this way.  Perhaps it should be
enabled with the same defaults from the beginning?

One problem of initializing it is that hardware will be accessed,
while it might not be desirable.

--
Marco




^ permalink raw reply	[flat|nested] 16+ messages in thread

* serial port
@ 2007-11-10 21:31 Robert Millan
  2007-11-18 11:33 ` Marco Gerards
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Millan @ 2007-11-10 21:31 UTC (permalink / raw)
  To: grub-devel


Hi

Any reason why the serial port is not enabled in grub_serial_init() ?

grub> terminal
Available terminal(s): console
Current terminal: console
grub> serial
grub> terminal
Available terminal(s): serial console
Current terminal: serial

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: serial port
  2005-02-17  7:41 Tim Newsham
@ 2005-02-18  1:36 ` Tim Newsham
  0 siblings, 0 replies; 16+ messages in thread
From: Tim Newsham @ 2005-02-18  1:36 UTC (permalink / raw)
  To: xen-devel

No answers yet so I'll provide my own:

>  - When I start up domains, the domain console seems to be
>    listening on a high tcp port.  Is there a way to either fix
>    the port or cause it to bind in a way that cannot be accessed
>    remotely?

There is a "console = <port#>" option in "xm create" that fixes
the console port.  I would still prefer an option to bind to
127.0.0.1 or use a unix domain socket instead.


>  - Now that I'm using xen, I can still connect to my serial port
>    but it appears "dead".  Is this because xen is using my serial
>    port for diagnostic output?  Is there some way I can redirect
>    the output to a different serial port or disable it entirely?
>    I need the serial port for debugging another machine :)

This was my fault, my serial lines werent coming up in domain zero.
A rebuild of the kernel fixed it.

Tim N.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 16+ messages in thread

* serial port
@ 2005-02-17  7:41 Tim Newsham
  2005-02-18  1:36 ` Tim Newsham
  0 siblings, 1 reply; 16+ messages in thread
From: Tim Newsham @ 2005-02-17  7:41 UTC (permalink / raw)
  To: xen-devel

Hi,  I am new to xen.  I have a couple of questions:

   - When I start up domains, the domain console seems to be
     listening on a high tcp port.  Is there a way to either fix
     the port or cause it to bind in a way that cannot be accessed
     remotely?

   - Now that I'm using xen, I can still connect to my serial port
     but it appears "dead".  Is this because xen is using my serial
     port for diagnostic output?  Is there some way I can redirect
     the output to a different serial port or disable it entirely?
     I need the serial port for debugging another machine :)

Thanks for the great software,
Tim N.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Serial port.
  2004-07-24 15:11 serial port read working but not write Jan-Benedict Glaw
@ 2004-08-03 17:41 ` suresh shenoy
  0 siblings, 0 replies; 16+ messages in thread
From: suresh shenoy @ 2004-08-03 17:41 UTC (permalink / raw)
  To: linux-serial

Hi,

  Thanks a lot to Benedict and Frank for suggestions.
The serial sniffer really made my day. I was able to
detect the problem to as handshake and write errors.
Basically the device was getting some garbage value
for some reason and hence was throwing away the data.
I fixed it and now the sniffer gives me 0 bytes
It worked for some commands i sent to the device. I am
just left with the checking of a motor. Then
everything is done.


Thanks a lot,
Suresh M Shenoy

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-02-11 12:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 11:22 Serial Port Leandro Bucci
2021-02-11 12:52 ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2007-11-10 21:31 serial port Robert Millan
2007-11-18 11:33 ` Marco Gerards
2007-11-18 11:56   ` Robert Millan
2007-11-18 12:12     ` Vesa Jääskeläinen
2007-11-18 12:24       ` Robert Millan
2007-11-18 12:41         ` Marco Gerards
2007-11-18 12:32       ` Marco Gerards
2007-11-18 12:43         ` Vesa Jääskeläinen
2007-11-19  7:18       ` Daryl Van Humbeck
2007-11-19 17:13         ` Vesa Jääskeläinen
2007-11-18 12:14     ` Marco Gerards
2005-02-17  7:41 Tim Newsham
2005-02-18  1:36 ` Tim Newsham
2004-07-24 15:11 serial port read working but not write Jan-Benedict Glaw
2004-08-03 17:41 ` Serial port suresh shenoy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.