parallaxinc / BlocklyPropClient

Client to provide access to the propeller for loading binaries and serial terminal
9 stars 7 forks source link

Add code to detect FTDI driver state for Windows. #51

Closed zfi closed 7 years ago

zfi commented 7 years ago

This code uses the Windows querydriver.exe utility embedded within Windows to identify the FTDI driver. A device must be connected to the Windows client in order for this detection to work. Otherwise, the driver is not detected as installed or running.

PropGit commented 7 years ago

@zfi - I'm curious as to why you say a USB device must be connected for this to work? The driverquery.exe shows "stopped" or "running" depending on whether a device is connected, and won't show FTDIBUS and FTSER2K at all if one or both of the drivers are not installed; as shown here: https://github.com/parallaxinc/BlocklyPropClient/issues/37#issuecomment-279865515

zfi commented 7 years ago

On my Windows 10 Pro system, the rules referenced in #37 did not appear to apply. For example, when I installed the FTDI driver, querydriver did not report that the driver was installed. Driverquery started reporting a single FTDI device only after I connected a device to the computer, in this case, a Badge. When the badge is disconnected, querydriver again reports no FTDI devices. Clearly these results differ from your experience but that is why I wrote what I did.

PropGit commented 7 years ago

@zfi - Yes, that definitely is different ~than on Win 7~ than I witnessed in testing. Darn. We might have to enhance to using something else. In the DevCon.exe, which I tried yesterday, it did not seem to show any driver results without a device attached either. I'll explore this more when I can.

PropGit commented 7 years ago

Tested and verified this PR works!