Re: [Ftdi-usb-sio-devel] latency on serial port
Brought to you by:
bryder
From: Bill R. <bil...@gm...> - 2010-06-23 06:48:21
|
Y On Wed, Jun 23, 2010 at 5:36 PM, Tao Jin <jin...@gm...> wrote: > Hi Bill, > > Thanks a lot for your quick response! I set VMIN=1, VTIME=0 so the > serial device works in block mode. > > I just tried the serial echo test on my linksys linux router, which > has onboard serial port. setserial works for me and the RTT latency > can be reduced down to below 1ms > > But when I did the same test on my laptop with a FT232RL usb-to-serial > adapter, the setserial doesn't work. Probably the usb serial device > works in different way? Sorry I am new to Linux kernel > Y ou could try using stty instead of setserial. I can't remember the calls setserial makes. It's possible one is not supported by the driver. I think stty does it using supported calls. If you could send an output of strace -v setserial what ever options you used it'll give me a hint. Also you might need to hold the device open. (in a separate window run cat > /dev/ttyUSBthenumberoftheport and just leave it running - it's doing nothing except holding the port open) then try setserial or stty and your test program > Thanks again! > > jintao > > On Wed, Jun 23, 2010 at 1:14 AM, Bill Ryder <bil...@gm...> > wrote: > > Have a look at this: > > > > http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/index.html > > > > You are probably setup to do 0.1s timeout when reading the port which is > the > > default. > > > > you need to set VMIN/VTIME properly. > > > > > > > > > > On Wed, Jun 23, 2010 at 4:57 PM, Tao Jin <jin...@gm...> wrote: > >> > >> Dear all,http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/index.html > >> > >> I am trying to get my laptop running Ubuntu to communicate with a > >> sensor through serial interface. I used usb-to-serial adapter to > >> connect the laptop and sensor serial RX/TX pins. I observed a long > >> latency when I do a one-byte serial echo test, around 10ms. > >> > >> I googled a bit, and seems a lot of people had the same issue. someone > >> said setserial /dev/ttyS* low_latency can get the serial device work > >> in low latency mode, with higher CPU load. I tried, that doesn't work > >> for me. > >> > >> Anyone here know about this latency issue on serial link? Could you > >> please provide some guidance to resolve this issue? > >> > >> Thanks a lot in advance! > >> > >> jintao > >> > >> > >> > ------------------------------------------------------------------------------ > >> ThinkGeek and WIRED's GeekDad team up for the Ultimate > >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > >> lucky parental unit. See the prize list and enter to win: > >> http://p.sf.net/sfu/thinkgeek-promo > >> _______________________________________________ > >> Ftdi-usb-sio-devel mailing list > >> Ftd...@li... > >> https://lists.sourceforge.net/lists/listinfo/ftdi-usb-sio-devel > > > > > |