rtser not showing up
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
Quoted 10 lines · Brandt Erickson
Hi,
I'm trying to get realtime communication over the serial port to work using the example found herehttp://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
Quoted 8 lines
modprobe xeno_16550A ioaddr=0x3f8 irq=4 or insmod ./xeno16550A.ko ioaddr=0x3f8 irq=4no 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.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 3 lines
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
Quoted 7 lines
Right now, it appears I can open the file (
rt_dev_openreturns 0) and configure the serial port (usingrt_dev_ioctl), however, every call tort_dev_writereturns -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.
Quoted 9 lines · Brandt Erickson
Quoted 3 lines
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 usert_dev_open?
Quoted 6 lines
Right now, it appears I can open the file (
rt_dev_openreturns 0) and configure the serial port (usingrt_dev_ioctl), however, every call tort_dev_writereturns -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.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 17 lines · Gilles Chanteperdrix
Quoted 9 lines · Brandt Erickson
Quoted 3 lines
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 usert_dev_open?Quoted 6 lines
Right now, it appears I can open the file (
rt_dev_openreturns 0) and configure the serial port (usingrt_dev_ioctl), however, every call tort_dev_writereturns -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
Quoted 8 lines
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.-EPERMprobably means that you are trying to use a real-time call from a non real-time thread. Seert_task_shadoworrt_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