All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] rtser not showing up
@ 2007-05-08 17:34 Brandt Erickson
  2007-05-08 18:42 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Brandt Erickson @ 2007-05-08 17:34 UTC (permalink / raw)
  To: xenomai

Hi,
I'm trying to get realtime communication over the serial port to work
using the example found here

	http://www.captain.at/xenomai-serial-port-example.php

I compiled a 2.6.20-6 kernel with xenomai-2.3.1 and configure the
realtime serial driver to be a loadable module.  I disabled the default
linux serial driver using 'setserial'.  However, when I run

	modprobe xeno_16550A ioaddr=0x3f8 irq=4
or
	insmod ./xeno16550A.ko ioaddr=0x3f8 irq=4

no rtser<N> nodes turn up in /dev.  No errors are generated when I
insert the module and an lsmod reveals it is in.  Have I missed
something?  Thanks.
-Brandt




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

* Re: [Xenomai-help] rtser not showing up
  2007-05-08 17:34 [Xenomai-help] rtser not showing up Brandt Erickson
@ 2007-05-08 18:42 ` Gilles Chanteperdrix
  2007-05-08 21:23   ` Brandt Erickson
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-05-08 18:42 UTC (permalink / raw)
  To: Brandt Erickson; +Cc: xenomai

Brandt Erickson wrote:
 > Hi,
 > I'm trying to get realtime communication over the serial port to work
 > using the example found here
 > 
 > 	http://www.captain.at/xenomai-serial-port-example.php
 > 
 > I compiled a 2.6.20-6 kernel with xenomai-2.3.1 and configure the
 > realtime serial driver to be a loadable module.  I disabled the default
 > linux serial driver using 'setserial'.  However, when I run
 > 
 > 	modprobe xeno_16550A ioaddr=0x3f8 irq=4
 > or
 > 	insmod ./xeno16550A.ko ioaddr=0x3f8 irq=4
 > 
 > no rtser<N> nodes turn up in /dev.  No errors are generated when I
 > insert the module and an lsmod reveals it is in.  Have I missed
 > something?  Thanks.
 > -Brandt

No node will turn up in /dev, you will find the list of available RTDM
devices in /proc/xenomai/rtdm/named_devices.

-- 


					    Gilles Chanteperdrix.


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

* Re: [Xenomai-help] rtser not showing up
  2007-05-08 18:42 ` Gilles Chanteperdrix
@ 2007-05-08 21:23   ` Brandt Erickson
  2007-05-08 21:45     ` Brandt Erickson
  2007-05-08 21:52     ` Gilles Chanteperdrix
  0 siblings, 2 replies; 6+ messages in thread
From: Brandt Erickson @ 2007-05-08 21:23 UTC (permalink / raw)
  To: xenomai


> No node will turn up in /dev, you will find the list of available RTDM
> devices in /proc/xenomai/rtdm/named_devices.

Okay,
there is a /proc/xenomai/rtdm/rtser0.  The example opens the file
"rtser0", does this default to the full path name when I use
rt_dev_open?

Right now, it appears I can open the file (rt_dev_open returns 0) and
configure the serial port (using rt_dev_ioctl), however, every call to
rt_dev_write returns -1.  I'm using the configuration from the example
code which basically has everything set to defaults.  Is there an
equivalent of errno I can get to find out what's going wrong?  Thanks.
-Brandt



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

* Re: [Xenomai-help] rtser not showing up
  2007-05-08 21:23   ` Brandt Erickson
@ 2007-05-08 21:45     ` Brandt Erickson
  2007-05-08 21:52     ` Gilles Chanteperdrix
  1 sibling, 0 replies; 6+ messages in thread
From: Brandt Erickson @ 2007-05-08 21:45 UTC (permalink / raw)
  To: xenomai


> Right now, it appears I can open the file (rt_dev_open returns 0) and
> configure the serial port (using rt_dev_ioctl), however, every call to
> rt_dev_write returns -1.  I'm using the configuration from the example
> code which basically has everything set to defaults.  Is there an
> equivalent of errno I can get to find out what's going wrong?  Thanks.
> -Brandt

Slight modification here, it does write correctly if I call rt_dev_write
from a task spawned by main, but not if I call it from main itself.  So
I guess this is less about rtser per se and more about the rtdm API.



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

* Re: [Xenomai-help] rtser not showing up
  2007-05-08 21:23   ` Brandt Erickson
  2007-05-08 21:45     ` Brandt Erickson
@ 2007-05-08 21:52     ` Gilles Chanteperdrix
  2007-05-09  6:30       ` Jan Kiszka
  1 sibling, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-05-08 21:52 UTC (permalink / raw)
  To: Brandt Erickson; +Cc: xenomai

Brandt Erickson wrote:
 > 
 > > No node will turn up in /dev, you will find the list of available RTDM
 > > devices in /proc/xenomai/rtdm/named_devices.
 > 
 > Okay,
 > there is a /proc/xenomai/rtdm/rtser0.  The example opens the file
 > "rtser0", does this default to the full path name when I use
 > rt_dev_open?
 > 
 > Right now, it appears I can open the file (rt_dev_open returns 0) and
 > configure the serial port (using rt_dev_ioctl), however, every call to
 > rt_dev_write returns -1.  I'm using the configuration from the example
 > code which basically has everything set to defaults.  Is there an
 > equivalent of errno I can get to find out what's going wrong?  Thanks.
 > -Brandt

The errors of the serial driver are documented here:

http://www.xenomai.org/documentation/trunk/html/api/group__rtserial.html

-1 is -EPERM... which is not documented. -EPERM probably means that you
are trying to use a real-time call from a non real-time thread. See
rt_task_shadow or rt_task_create.

-- 


					    Gilles Chanteperdrix.


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

* Re: [Xenomai-help] rtser not showing up
  2007-05-08 21:52     ` Gilles Chanteperdrix
@ 2007-05-09  6:30       ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2007-05-09  6:30 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

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

Gilles Chanteperdrix wrote:
> Brandt Erickson wrote:
>  > 
>  > > No node will turn up in /dev, you will find the list of available RTDM
>  > > devices in /proc/xenomai/rtdm/named_devices.
>  > 
>  > Okay,
>  > there is a /proc/xenomai/rtdm/rtser0.  The example opens the file
>  > "rtser0", does this default to the full path name when I use
>  > rt_dev_open?
>  > 
>  > Right now, it appears I can open the file (rt_dev_open returns 0) and
>  > configure the serial port (using rt_dev_ioctl), however, every call to
>  > rt_dev_write returns -1.  I'm using the configuration from the example
>  > code which basically has everything set to defaults.  Is there an
>  > equivalent of errno I can get to find out what's going wrong?  Thanks.
>  > -Brandt
> 
> The errors of the serial driver are documented here:
> 
> http://www.xenomai.org/documentation/trunk/html/api/group__rtserial.html
> 
> -1 is -EPERM... which is not documented. -EPERM probably means that you
> are trying to use a real-time call from a non real-time thread. See
> rt_task_shadow or rt_task_create.
> 

That's the point. The serial driver's write operation requires real-time
context and return -EPERM otherwise. Documentation should be enhanced...

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

end of thread, other threads:[~2007-05-09  6:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 17:34 [Xenomai-help] rtser not showing up Brandt Erickson
2007-05-08 18:42 ` Gilles Chanteperdrix
2007-05-08 21:23   ` Brandt Erickson
2007-05-08 21:45     ` Brandt Erickson
2007-05-08 21:52     ` Gilles Chanteperdrix
2007-05-09  6:30       ` Jan Kiszka

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.