hello, i don't know how call the function rt_dev_ioctl() after the timeout happened, this function is called in the begining of "while" loop (cross-link program). I get the value of struct rtser_status, line status = 96 modem status = 176 to be honest, i don't know why cross-line program works without the function rt_dev_ioctl() with RTSER_RTIOC_WAIT_EVENT in option. main : write-file opened main : write-config written main : read-file opened main : read-config written main : write-task created main : read-task created main : starting write-task main : starting read-task Nr | write->irq | irq->read | write->read | ----------------------------------------------------------- 0 |17113389816533987823 |1333354257183912191 | 8348398 1 |17113389815533997483 |1333354258183885264 | 8331131 2 |17113389814533998100 |1333354259183882033 | 8328517 3 |17113389813534000420 |1333354260183884535 | 8333339 4 |17113389812533998430 |1333354261183888665 | 8335479 ...... i tried to send a character table, and it also worked. On Fri, Mar 30, 2012 at 4:48 PM, Wolfgang Grandegger wrote: > On 03/30/2012 04:34 PM, Minh GIANG wrote: > > hi, > > > > with option RTSER_RTIOC_WAIT_EVENT in rt_dev_ioctl(), this function > returns > > un number -110 (Connection timed out) > > with option RTSER_RTIOC_GET_STATUS in rt_dev_ioctl(), this function > returns > > un number 0 (not message) > > You should call this function *after* the timeout happened. What does > the "struct rtser_status" contain? Especially the "line_status" is of > interest. > > > > > Anyway, currently it works without rt_dev_ioctl(), i can see > rt_dev_read() > > wait data event (with debug mode) while giving the period of write > > task, for exemple = two seconds. > > > > so can i remove the funtion rt_dev_ioctl? > > The rt_dev_ioctl should work. You can remove it, but the problem will > remain. To debug the problem you could also add some printk's here: > > > http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/drivers/serial/16550A.c#223 > > Especially the value of "iir" might be interesting. > > Wolfgang. >