* [Xenomai-help] error after timeout on serial port
@ 2007-02-23 14:29 Lauener Nathan
2007-02-23 14:51 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Lauener Nathan @ 2007-02-23 14:29 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
Hi,
I am polling on a serial port during an init sequence of a positioning
device. Every once in a while I get a return code indicating that a
timeout occured, code -110 (ETIMEDOUT). After a timeout occured I can't
read the port anymore. Whenever I call rt_dev_read() again the function
returns the error code -14 (EFAULT). Is there a flag I must clear to get
the port operatioanl again?
Regards
Nathan
[-- Attachment #2: Type: text/html, Size: 935 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] error after timeout on serial port
2007-02-23 14:29 [Xenomai-help] error after timeout on serial port Lauener Nathan
@ 2007-02-23 14:51 ` Jan Kiszka
2007-02-23 15:16 ` AW: " Lauener Nathan
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2007-02-23 14:51 UTC (permalink / raw)
To: Lauener Nathan; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 856 bytes --]
Lauener Nathan wrote:
> Hi,
>
> I am polling on a serial port during an init sequence of a positioning
> device. Every once in a while I get a return code indicating that a
> timeout occured, code -110 (ETIMEDOUT). After a timeout occured I can't
> read the port anymore. Whenever I call rt_dev_read() again the function
> returns the error code -14 (EFAULT). Is there a flag I must clear to get
> the port operatioanl again?
I /tend/ to say it's an application bug, because we are using the driver
heavily, and our sluggish devices often cause timeouts during setup.
Some colleague should have already slapped me otherwise. :)
Are you sure that a valid buffer and a valid size is passed to
rt_dev_read after the timeout (because those should be the reason for
EFAULT)? If yes, maybe you can post a simple demo for the effect.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* AW: [Xenomai-help] error after timeout on serial port
2007-02-23 14:51 ` Jan Kiszka
@ 2007-02-23 15:16 ` Lauener Nathan
0 siblings, 0 replies; 3+ messages in thread
From: Lauener Nathan @ 2007-02-23 15:16 UTC (permalink / raw)
To: jan.kiszka; +Cc: xenomai
Hi Jan,
Thank you for your advice. After receiving a timeout I didn't set the size again before calling rt_dev_read(). It now works smoothly. Thanks again.
Nathan
-----Ursprüngliche Nachricht-----
Von: jan.kiszka@domain.hid [mailto:jan.kiszka@domain.hid
Gesendet: Freitag, 23. Februar 2007 15:52
An: Lauener Nathan
Cc: xenomai@xenomai.org
Betreff: Re: [Xenomai-help] error after timeout on serial port
Lauener Nathan wrote:
> Hi,
>
> I am polling on a serial port during an init sequence of a positioning
> device. Every once in a while I get a return code indicating that a
> timeout occured, code -110 (ETIMEDOUT). After a timeout occured I
> can't read the port anymore. Whenever I call rt_dev_read() again the
> function returns the error code -14 (EFAULT). Is there a flag I must
> clear to get the port operatioanl again?
I /tend/ to say it's an application bug, because we are using the driver heavily, and our sluggish devices often cause timeouts during setup.
Some colleague should have already slapped me otherwise. :)
Are you sure that a valid buffer and a valid size is passed to rt_dev_read after the timeout (because those should be the reason for EFAULT)? If yes, maybe you can post a simple demo for the effect.
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-23 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-23 14:29 [Xenomai-help] error after timeout on serial port Lauener Nathan
2007-02-23 14:51 ` Jan Kiszka
2007-02-23 15:16 ` AW: " Lauener Nathan
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.