Path: csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Don Kuenz Newsgroups: sci.electronics.design Subject: Re: Windows USB question Date: Tue, 14 Nov 2017 00:04:53 -0000 (UTC) Organization: A noiseless patient Spider Lines: 34 Distribution: world Message-ID: <20171113b@crcomp.net> References: <32d3477f-ddf2-45c7-80e4-0108933742ca@googlegroups.com> <2364c479-1318-4b49-8b5f-5ca0d3c08dde@googlegroups.com> Injection-Date: Tue, 14 Nov 2017 00:04:53 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a7511082335c683dd809e337bc3fce1e"; logging-data="8133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ojjuZNoJVuIPPt4VAY6ND" Cancel-Lock: sha1:nQv71Cz5hjTkVCpPq+cVdVZ/uNk= Xref: csiph.com sci.electronics.design:485125 Lasse Langwadt Christensen wrote: > Den mandag den 13. november 2017 kl. 21.51.33 UTC+1 skrev John Larkin: >> On Mon, 13 Nov 2017 12:43:38 -0800 (PST), Michael Elwood >> wrote: >> >> >John, this doesn't answer your question, but scanning the attached port devi ces is not ridiculously messy. I wrote some code that uses the Windows SetupAPI to scan the Ports Device Class, find the desired device by matching to desired f riendly name, then extract the COM port number; a few dozen lines of C code. I c an send you the code if you're interested. >> > >> >With best regards, >> > >> >MKE >> > >> >> >> The code's not that hard, but we plug and unplug cables during tests, >> and we may get comm errors, so all sorts of locations in a program may >> have to re-scan the ports. And we may test multiple units, so it would >> be nice if we knew which unit a physical USB cable connects to. > > the same ftdi cable should get the same com port number every time you > plug it in, it should be based on serial number Indeed. It's all there in the app note that you kindly posted earlier. Several hacks are available that enable users to exercise some control over FTDI's enumeration behavior. Thank you, -- Don Kuenz, KB7RPU