Modifications

Sauter à la navigation Sauter à la recherche
3 494 octets ajoutés ,  19 février 2017 à 21:24
Page créée avec « {{RASP-FT232H-NAV}} {{traduction}} = Mac OSX = To access the MPSSE mode on Mac OSX we need to install libftdi and the Adafruit Python GPIO library. Carefully follow the... »
{{RASP-FT232H-NAV}}

{{traduction}}

= Mac OSX =
To access the MPSSE mode on Mac OSX we need to install libftdi and the Adafruit Python GPIO library. Carefully follow the steps below to install these libraries.

Note that these steps were tested using OSX Mavericks. The steps should work for later versions like Yosemite, but you might need to search for extra help on installing Xcode command line tools below.

First before you get started you will need to make sure you have [https://developer.apple.com/xcode/ Xcode] and the Xcode command line tools installed. This is required to compile and build libraries from source. [http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-line-tools Follow the steps in the answer to this Stackoverflow question] for a good walkthrough of how to install the Xcode command line tools.

Next install the [http://brew.sh/ Homebrew package manager] which will be used to install the necessary libftdi depedencies. Follow the installation instructions from the bottom of [http://brew.sh/ Homebrew's homepage] to install it.

Now run the following commands in a terminal in order to install libftdi and its dependencies:

<syntaxhighlight lang="bash">
brew install cmake
brew install libusb
brew install swig
brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/99ebd41decde2dd0fbab799bed88cfcb230a096a/Formula/libftdi.rb
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
</syntaxhighlight>

The commands above should complete without any errors. If you do see errors, make sure you have Xcode and Homebrew successfully installed and try again.

Next download the Adafruit Python GPIO library by clicking the button below:

{{download-box|Adafruit Python GPIO library|https://github.com/adafruit/Adafruit_Python_GPIO/archive/master.zip}}

Unzip the archive and navigate to the folder inside a terminal. Then run the following command to install the library:

<nowiki>sudo python setup.py install</nowiki>

You should see the Python library successfully install without any errors.

To test the libraries are installed run the following command in a terminal to open the Python interpretor:

<nowiki>python</nowiki>

At the Python interpretor >>> prompt type the following commands to test loading the libraries:

<syntaxhighlight lang="python">
import Adafruit_GPIO
import ftdi1
</syntaxhighlight>

You should see no response from the Python interpretor after entering each line. If you do see an error that a module cannot be loaded, go back to the libftdi installation steps above and carefully check they completed successfully.

If there are no errors, congratulations you've successfully installed libftdi and the Adafruit Python GPIO library! Move on to the next section to learn how to access the MPSSE mode GPIO, SPI, I2C, etc.

To quit the Python interpretor enter the following:

<nowiki>quit()</nowiki>

== Désactiver le pilote FTDI sous OSX 10.11 El Capitan ==
Note on OSX 10.11 El Capitan and higher you might need to permanently disable Apple's built in FTDI serial driver in order to use all of the FT232H's functions. This can be accomplished by following section 7.3 Block with D2xxHelper from the [http://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf FTDI app note here].

{{RASP-FT232H-TRAILER}}
29 922

modifications

Menu de navigation