parallaxinc / BlocklyPropClient

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

Add Mac FTDI driver detection #38

Closed PropGit closed 7 years ago

PropGit commented 7 years ago

Add support for Mac OS X FTDI driver detection.

This should be used for logging as well as an error check before downloading to prompt the user that there's a specific roadblock in their way. Ideally, it will provide instruction and a link/button to get the necessary drivers installed.

This relates partially to Issue #35.

PropGit commented 7 years ago

[EDITED]

NOTES:

Steps for detection and response:

  1. Issue this command: kextstat | grep FTDI
    • if the response includes the string com.FTDI.driver.FTDIUSBSerialDriver then all is well. Skip the rest.
    • if the response is blank (no response), then no USB-based Parallax development board is connected to the system. Prompt user to connect their board at this time. NOTE: This response will be amended when PropLoader (which supports wireless downloads) is integrated into BlocklyPropClient.
    • if the response includes the string com.apple.driver.AppleUSBFTDI then either the FTDI driver has not been installed, or the system has not been rebooted since the FTDI driver was installed (letting the Apple-supplied driver continue to take over). Check Step 2 to figure out which case it is.
      1. Check the /Library/Extensions/ folder for FTDIUSBSerialDriver.kext
        • If it exists, then the system hasn't been rebooted after driver installation. Prompt user to reboot their system for proper USB driver operation.
        • If it doesn't exist, then the FTDI USB driver was not installed. Prompt the user to install the drivers a and reboot.
PropGit commented 7 years ago

The "prompts" mentioned above can be an obvious message in the BlocklyPropClient UI (rather than a dialog). Ideally, we'd have it communicate something to the editor also so that the editor can prompt the user in some way to call attention to it, at the moment they try to download, for example.

paragitadmin commented 7 years ago

@PropGit Can you verify that the path to the installed FTDIUSBSerialDriver is under /Libraries and not under /Library ? In MacOS Sierra (10.12.x), I am seeing the driver under /Library.

PropGit commented 7 years ago

@zfi - Oops, my mistake, it's /Library. I edited the top post to fix it.

PropGit commented 7 years ago

Verified, this enhancement logs the existence (or lack of) the FTDI USB Driver and the existence (or lack of) an FTDI-based board connected to a USB port.

It does not seem to prompt the user in a visible way (in the Client application).

Is prompting intended to be in the Client application, or the Editor?

zfi commented 7 years ago

I have not addressed an UI enhancement to notify the user of the FTDI issue. The original issue was simply detecting the state of the driver. I'll add an issue to create the UI change.

PropGit commented 7 years ago

@zfi - perfect, thanks. I think the UI change needs to be a separate issue too, to fit our necessary workflow.

PropGit commented 7 years ago

Issue #47 will carry on the final part of this task.