libftdi Archives

Subject: Re: problems with US232R and serial connection

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 12 Feb 2009 09:43:26 +0100
On Wednesday, 11. February 2009 16:33:12 Matthias Janke wrote:
> I'm on x86 intel, intel uhci, and my ftdi ia a FT232R

Should be fine.

> > Why is the ftdi_usb_purge_buffers() and ftdi_usb_reset call in there?
>
> just to leave a clean device, and get a clean device. To be sure not to
> read junk still in the buffers leftover from another process.

ftdi_usb_open_dev() issues ftdi_usb_reset() automatically for you. So I guess 
you can remove those two calls, though they shouldn't hurt either.

> > And one more thing: Which libftdi version to you use?
>
> libftdi-0.15 either wit libusb-0.1.8 or 1.1.12 as backend

Ok. The reference libusb we test libftdi with is 0.1.12 (released 2007).

What's really odd is the error code returned from libusb. If there's no data,
it should return without error. Does it help if you add sleep calls
between the read/write operations?

Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread