libftdi Archives

Subject: Re: How do I discover port names (/dev/cu.usb… or COM…) from devices

From: Robert Poor <rdpoor@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 9 Mar 2018 07:18:40 -0800
After glancing at usbdk (and its requirement for Visual Studio and other compilation tools), it occurs to me that there's another approach: Use Python's ctypes to write a bespoke interface to the FTDI API.  For example, see:


(which happens to be about writing an interface to an FTDI device...)


On Fri, Mar 9, 2018 at 7:01 AM, Robert Poor <rdpoor@xxxxxxxxx> wrote:
@Xiaofan: this is very useful information.  

So far, I've only had success with libusb-win12, and yes, it has the problem you describe.  (That's a big issue for my clients' customers.) 

I tried installing libusb-1.0 using Zadig, but as you point out, I lose the bitbang functionality for the FTDI chip that we require.

So I'll try the usbdk approach.  I'll report back here!

Thanks again.


On Fri, Mar 9, 2018 at 5:25 AM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
On Fri, Mar 9, 2018 at 6:14 PM, Robert Poor <rdpoor@xxxxxxxxx> wrote:
> @Uwe:
>
> I confess I was slightly confused in my original note.  It turns out that
> libftdi isn't causing any trouble: I can reliably wiggle the CBUS pins under
> program control.
>
> However, other parts of our system depend upon using the FTDI part in serial
> mode.
>
> My real problem is that I haven't found a reliable way to load a backend
> driver (e.g. libusb-win32) for use by PySerial.  The manifestation is that I
> can create a "filter" for the FTDI that makes it known to Windows, but on
> occasion (and I can't tell what that occasion is) it forgets about the
> device and I have to re-run the filter installer.
>
> So...truly this issue doesn't belong in the libftdi.  However, perhaps
> someone on this list has had some experience with the problem I describe.


pyftdi uses pyusb, and pyusb has different backend, libusb-0.1/libusb-win32,
libusb-1.0 and openusb.

Even though I am the admin of libusb-win32 project (the other admin who
is the main developer, is not active now), I confess I have
not use the filter for a long time. I remember that if you insert to a
different USB port you may need to install the filter again.

Anyway, libusb-win32 is old. So you may want to switch libusb-1.0
backend of pyftdi/pyusb. In that case you need to use
supported driver.

1) Use Zadig to install WinUSB to replace vendor FTDI driver. You will
lose the FTDI vendor driver function.
2) Use usbdk, it kinds of act as a filter driver, so the FTDI vendor driver
is still functional.

I gather from your libftdi mailing list post that you want to use Option 2
(usbdk).

It is the same for users who want to use libftdi.

--
Xiaofan

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





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


Current Thread