libftdi Archives

Subject: Re: opening device given its serial and hardware flow control

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 24 Feb 2009 10:03:15 +0100
On Sunday, 22. February 2009 19:47:19 frrrt_ wrote:
> The Fixed Serial Number of a device can be found by running MPROG
> utility on Windows.

You could also use "lsusb" to get the serial number.

> Can somebody explain what's the point of having a function called
> ftdi_read_chipid?
>  From my understanding it is specific for FTDI 232R devices only but it
> doesn't check it is being called upon a 232R device,
> and it calculates a number, the chipid, which is not related to the true
> Fixed Serial Number..
> Obviously I'm not criticizing, just trying to understand...

Yes, that is correct. The documentation states
"Read the FTDIChip-ID from R-type devices".

It does not force a check for R-type devices in case a new FTDI product 
supports this functionality, too, so libftdi will support it out of the box.

> Problem #2: hardware flow control, in other words the RTS handshaking
> signal misbehaves after setting hardware flow control.
>
> Sounds like FTDI device never sets RTS to GND (logic 0) even though
> ReaderThread continues to read FTDI RX buffer by
> repeatedly calling function ftdi_read_data. Under this circumstance the
> FTDI RX hardware FIFO buffer should be empty
> or nearly empty, hence the FTDI chip should automatically lower RTS to
> GND (logic 0).
>
> Can somebody sugget a way of debugging this issue? Function
> ftdi_setflowctrl returns 0 to indicate correct operation.
> I am starting to think it may be a hardware bug in the FTDI 232R chip???
> Help please!

Hmm, one thing that concerns me is thread safety. libftdi or libusb are
not explicitly stated to be thread safe, you could try to add resource locking
to your threads before using the "ctx" variable.

Cheers,
Thomas


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

Current Thread