From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: Date: Fri, 23 Feb 2007 16:23:17 +0100 From: "Nicolas BLANCHARD" Subject: Re: [Xenomai-help] error after timeout on serial port Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__Part012596F5.1__=" List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nathan.Lauener@domain.hid Cc: xenomai@xenomai.org --=__Part012596F5.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit >>>> Jan Kiszka 23.02 15:51 >>> >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). In the struct rtser_config you have the event_timeout parameter that cause ETIMEDOUT (if it's different than RTSER_DEF_TIMEOUT). Have a look on rt_dev_ioctl(uiFd, RTSER_RTIOC_WAIT_EVENT, &rx_event ). >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? Is your device correctly open (file descriptor>=0) ? > >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 Blanchard nicolas --=__Part012596F5.1__= Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Description: HTML

>>>= >=20 Jan Kiszka <jan.kiszka@domain.hid> 23.02 15:51 >>>
>Lauener Nathan wrote:
>> Hi,
>>
>> I = am=20 polling on a serial port during an init sequence of a positioning
>&g= t;=20 device. Every once in a while I get a return code indicating that = a
>>=20 timeout occured, code -110 (ETIMEDOUT).
 
In the struct rtser_config you have the event_timeout parameter that = cause=20
ETIMEDOUT (if it's different than RTSER_DEF_TIMEOUT).
Have a look on rt_dev_ioctl(uiFd, RTSER_RTIOC_WAIT_EVENT, &rx_even= t=20 ).
 
>After a timeout occured I can't
>> read the port = anymore.=20 Whenever I call rt_dev_read() again the function
>> returns the = error=20 code -14 (EFAULT). Is there a flag I must clear to get
>> the = port=20 operatioanl again?
 
Is your device correctly open (file descriptor>=3D0) ?

>
>I /tend/ to say it's an application bug, because we = are=20 using the driver
>heavily, and our sluggish devices often cause = timeouts=20 during setup.
>Some colleague should have already slapped me = otherwise.=20 :)
>
>Are you sure that a valid buffer and a valid size is = passed=20 to
>rt_dev_read after the timeout (because those should be the = reason=20 for
>EFAULT)? If yes, maybe you can post a simple demo for the=20 effect.
>
>Jan
 
Blanchard nicolas
--=__Part012596F5.1__=-- From mboxrd@z Thu Jan 1 00:00:00 1970 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C75756.F77E91ED" Date: Fri, 23 Feb 2007 15:29:03 +0100 Message-ID: From: "Lauener Nathan" Subject: [Xenomai-help] error after timeout on serial port List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C75756.F77E91ED Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 =20 ------_=_NextPart_001_01C75756.F77E91ED Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable error after timeout on serial port

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  


------_=_NextPart_001_01C75756.F77E91ED-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <45DEFF7D.6080507@domain.hid> Date: Fri, 23 Feb 2007 15:51:41 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Xenomai-help] error after timeout on serial port References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig972DB727E1064D44298DDE62" Sender: jan.kiszka@domain.hid List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lauener Nathan Cc: xenomai@xenomai.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig972DB727E1064D44298DDE62 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Lauener Nathan wrote: > Hi, >=20 > 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 ge= t > 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 --------------enig972DB727E1064D44298DDE62 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF3v99niDOoMHTA+kRAjAWAJ4l6KNw7IgqUigtYc1q0rZ0Cg8RmwCeIJeu YAQxgsYFq1ALC8ZNT+DKd1M= =6QmT -----END PGP SIGNATURE----- --------------enig972DB727E1064D44298DDE62--