Modifications

Sauter à la navigation Sauter à la recherche
2 069 octets ajoutés ,  8 septembre 2017 à 09:24
Ligne 1 : Ligne 1 :  
{{RASP-FT232H-NAV}}
 
{{RASP-FT232H-NAV}}
   −
{{traduction}}
+
= Installation sous Windows =
 +
Il est nécessaire d'installer des logiciels spéciaux pour accéder au mode MPSSE du FT232H sous Windows. Nous allons utiliser un outil appelé "Zadig" pour remplacer le pilote FTDI du FT232H avec un pilote à base de libusb, libusb requis par libftdi. Ensuite, nous téléchargeons le binaire de libftdi que nous installerons pour y avoir accès depuis Python. Pour finir, nous installerons la bibliothèque Adafruit Python GPIO . '''Suivez très précisément les étapes ci-dessous pour réaliser l'installation des différents logiciels'''.
   −
= Installation sous Windows =
+
{{ambox|text=Le pilote UART Série est désactivé lorsque le mode MPSSE est activé. Voyez les instructions en fin de page si vous désirez désactiver le mode MPSSE pour réactiver le pilote UART série}}.
To access the MPSSE mode of the FT232H on Windows we need to install special drivers and software.  We'll use a tool called Zadig to replace the FTDI driver for the FT232H with a libusb-based driver required by libftdi.  Then we'll download a libftdi binary and install it for Python to access.  Finally we'll install the Adafruit Python GPIO library.  Carefully follow the steps below to setup the software.
     −
Note: When you enable MPSSE mode the serial UART driver will be disabled. If you want to disable MPSSE mode and enable the serial UART again I'll show instructions at the end of the page.
+
Avant de commencer, assurez vous d'avoir Python 2.7 installé sur votre machine. Vous pouvez [https://www.python.org/downloads/windows/ télécharger la dernière version de Python 2.7 ici] (<small>c'est la version 2.7.8 au moment où nous écrivons ces lignes, n'importe quelle version 2.7.x devrait convenir--'''les version 3.x ne sont malheureusement pas encore supportés'''</small>). Téléchargez l'installateur MSI correspondant à votre version de Windows, soit 32-bits ou 64-bits, puis exécutez le programme d'installation. Installez Python dans son répertoire d'installation standard, généralement C:\python27. Assurez vous d'avoir sélectionné l'option ajoutant "Python dans le ''system path''" de sorte que vous pourrez appeler l'interpréteur depuis n'importe quelle ligne de commande (ou terminal).
   −
First before you get started make sure you have Python 2.7 installed.  You can [https://www.python.org/downloads/windows/ download the latest Python 2.7 installer here] (at the time of writing it's version 2.7.8, but any 2.7.x version should work--unfortunately the 3.x series isn't supported yet).  Download the MSI installer for your version of Windows, either 32-bit or 64-bit, and run the installer. Install Python into its standard location, typically C:\python27.  Also make sure to install the option to add Python to the system path so you can easily call the Python interpretor from a command terminal.
+
{{ambox-stop|text=Attention: nous avons fait différents tests et avons remarqué qu'il est impossible de charger le bibliothèque "ftdi" (compilée en Win32) sur une installation Python 64 bit (tournant sur un Win 64Bit). Le simple fait d'utiliser un python win32 a résolu notre problème.}}
    
== Installation de libusb ==
 
== Installation de libusb ==
Download the appropriate Zadig tool for your version of Windows [http://zadig.akeo.ie/at its homepage]. This tool simplifies the installation of a libusb driver for the FT232H device.
+
Téléchargez l'outil Zadig correspondant à votre version de Windows [http://zadig.akeo.ie/ depuis la page Zadig]. Cet outil simplifie l'installation du pilote libusb pour le périphérique FT232H.
   −
Before you run the tool unplug all FTDI devices from your computerThis includes devices likebArduinos which include an FTDI chip as a USB to serial converter. You want to unplug these devices to make sure you don't accidentally select one with the tool and replace its driver.
+
Débranchez tous les périphériques FTDI de votre ordinateur avant d'exécuter l'outil. Cela inclus les périphériques tesl qu'Arduino qui inclus un composant FTDI utilisé comme convertisseur USB vers série. Vous devez débrancher des périphériques pour être certain de ne pas accidentellement l'un d'eux et remplacer son pilote avec l'outil.
   −
After all the FTDI devices are unplugged, plug in your FT232H breakout to the computer so it is the only FTDI device connected to the computer.
+
Après avoir déconnecté tous les périphériques FTDI, branchez votre breakout FT232H sur l'ordinateur... de sorte qu'il devrait être le seul périphérique FTDI connecté sur l'ordinateur.
   −
Now run the Zadig tool executable you just downloaded (there is no installation necessary, the executable is the program).  Click the '''Options''' menu and select the '''List All Devices''' item below:
+
Démarrez maintenant l'exécutable de l'outil Zadig que vous venez de télécharger (il n'est pas nécessaire d'installer le programme, Zadig est un simple exécutable).  Cliquez sur le menu '''Options''' et sélectionnez l'entrée '''List All Devices''' (lister tous les périphériques) comme ci-dessous:
    
{{ADFImage|RASP-FT232H-MPSSE-Windows-10.png}}
 
{{ADFImage|RASP-FT232H-MPSSE-Windows-10.png}}
   −
The list box of devices should populate with many devices. Select the USB Serial Converter device shown below.
+
La liste des périphériques devrait contenir plusieurs entrées. Sélectionnez le convertisseur USB-Série (comme présenté ci-dessous).
   −
'''Note: Make sure to select the device with Driver equal to FTDIBUS and USB ID equal to 0403 6014!''' If you pick the wrong device you might accidentally uninstall another device's driver and make it inoperable.
+
'''Note: Assurez vous d'avoir sélectionné le périphérique ayant FTDIBUS comme "Driver" (drivers) et un USB ID égal à 0403 6014!'''. Si vous vous trompez de périphérique, vous pourriez accidentellement désinstallé le pilote d'un autre périphérique (et le rendre inopérable).
    
{{ADFImage|RASP-FT232H-MPSSE-Windows-11.png}}
 
{{ADFImage|RASP-FT232H-MPSSE-Windows-11.png}}
   −
Click the up/down arrows on the driver select box to the right of the green arrow and select the '''libusbK''' driver as shown above.
+
A droite de la flèche verte; cliquez sur les flèches haut/bas de la sélection du "driver" (''pilote'') pour sélectionner le pilote '''libusbK''' (comme indiqué ci-dessus).
   −
Now click the Replace Driver button to replace the FTDI driver with the libusb-based driver. After the driver replacement finishes you can close Zadig tool.
+
Maintenant, cliquer sur le bouton "Replace Driver" (''remplacer le pilote'') pour remplacer le pilote FTDI par un pilote à base de libusb. Après avoir terminé le remplacement du pilote, vous pouvez fermer l'utilitaire Zadig.
   −
To check that the driver was successfully replaced, open Device Manager from Control Panel or searching in the Start menu. You should see a new top level node '''libusbK USB Devices''' and the '''USB Serial Converter''' underneath it as shown below.
+
Pour vérifier l'installation du pilote, ouvrez le gestionnaire de périphérique dans le centre de contrôle de Windows. Vous devriez voir un nouveau noeud principal '''libusbK USB Devices''' et un sous noeud '''USB Serial Converter''' juste en dessous.
    
{{ADFImage|RASP-FT232H-MPSSE-Windows-12.png}}
 
{{ADFImage|RASP-FT232H-MPSSE-Windows-12.png}}
   −
If you see the libusbK node and USB serial device, move on to the next step to install libftdi.
+
Si vous voyez les noeud '''libusbK''' et '''USB serial device''' alors vous pouvez passer au point suivant pour installer libftdi.
   −
If you don't see the libusbK node, try unplugging and plugging back in the FT232H breakout. If you still don't see the node, run Zadig tool again and follow the steps above again to make sure you replace the FTDI driver for the device with the libusbK driver.
+
Si vous ne voyez pas le noeud '''libusbK''' alors essayez de débrancher/rebrancher le breakout FT232H. Si vous ne voyez toujours pas le noeud alors ré-exécutez attentivement la procédure de remplacement du pilote avec l'utilitaire Zadig. Il est impératif de remplacer le pilote FTDI par le pilote libusbK .
    
== Installation libftdi ==
 
== Installation libftdi ==
This step will install libftdi's Python libraryCarefully follow the steps below to make sure the library is installed.
+
Cette étape installe la bibliothèque Python pour libftdi.  Suivez attentivement les étapes suivantes pour installer correctement la bibliothèque.
   −
Start by downloading the binary version of the libftdi library by clicking the button below. This binary is provided by the [https://sourceforge.net/projects/picusb/files/ picusb USB resources project].
+
Nous allons commencer par télécharger la version binaire de la bibliothèque libftdi en cliquant sur le bouton ci-dessous. Ce binaire est fournit dans [https://sourceforge.net/projects/picusb/files/ les ressources du picusb USB].
    
{{download-box|libftdi1-1.0_devkit_mingw32_17Feb2013.zip|http://downloads.sourceforge.net/project/picusb/libftdi1-1.0_devkit_mingw32_17Feb2013.zip}}
 
{{download-box|libftdi1-1.0_devkit_mingw32_17Feb2013.zip|http://downloads.sourceforge.net/project/picusb/libftdi1-1.0_devkit_mingw32_17Feb2013.zip}}
   −
Unzip the archive and you should see a series of folders like below:
+
En dézippant l'archive, vous devriez vous une série de répertoire comme ceci:
    
{{ADFImage|RASP-FT232H-MPSSE-Windows-20.png}}
 
{{ADFImage|RASP-FT232H-MPSSE-Windows-20.png}}
   −
We need to copy some files from libftdi into Python's package directory. Open another Explorer window and navigate to the location you installed Python earlier, typically '''C:\python27'''. Inside the Python directory navigate to the '''Lib > site-packages''' folder. Files you copy into this folder will be available globally as packages that your Python scripts can use.
+
Nous aurons besoin de copier quelques fichiers de libftdi dans le répertoire des paquet Python (un répertoire nommé "package"). Ouvrez un autre explorateur de fichier et naviguez dans le répertoire où vous avez installé Python, généralement '''C:\python27'''. Dans le répertoire Python, déplacez vous vers le sous répertoire '''Lib > site-packages'''.  
 +
 
 +
Les fichiers que vous copierez dans ce répertoire seront disponibles "globalement" pour vos propres scripts Python.
   −
From the libftdi archive folder, copy all the .DLL files from the '''bin''' folder into the Python '''site-packages''' folder, specifically:
+
Depuis le répertoire de l'archive libftdi, copiez tous les fichiers .DLL du répertoire '''bin''' vers le répertoires '''site-packages''' de python. Et plus spécialement:
 
* '''bin\libftdi1.dll'''
 
* '''bin\libftdi1.dll'''
 
* '''bin\libftdipp1.dll'''
 
* '''bin\libftdipp1.dll'''
Ligne 61 : Ligne 63 :  
* '''bin\libusb-1.0.dll'''
 
* '''bin\libusb-1.0.dll'''
   −
Then also copy in the files from the python2.7 folder of the libftdi archive into the Python site-packages folder:
+
Puis, copiez également les fichiers suivants contenu dans le sous répertoire python2.7 de l'archive libftdi. Ces fichiers doivent également être copiés dans le répertoire site-packages de python:
 
* '''python2.7\_ftdi.pyd'''
 
* '''python2.7\_ftdi.pyd'''
 
* '''python2.7\ftdi1.py'''
 
* '''python2.7\ftdi1.py'''
   −
To double check you copied in the right files, your Python site-packages folder should have at least the files below inside it (you might see other files & directories, but don't worry they can be ignored):
+
Vérifiez une nouvelle fois que les fichiers soient copiés au bon emplacement. Votre répertoire site-packages doit au moins contenir les fichiers listés ci-dessus (vous devriez également voir d'autres répertoires et fichier mais vous pouvez les ignorer):
    
{{ADFImage|RASP-FT232H-MPSSE-Windows-21.png}}
 
{{ADFImage|RASP-FT232H-MPSSE-Windows-21.png}}
   −
That's all you need to do to install libftdi. Let's move on to install the Adafruit Python GPIO library next.
+
Voilà, c'est tout ce dont vous aurez besoin pour installer libftdi.  
 +
 
 +
Maintenant, nous allons pouvoir installer la bibliothèque "Adafruit Python GPIO".
    
== Bibliothèque Adafruit Python GPIO ==
 
== Bibliothèque Adafruit Python GPIO ==
Finally let's install the Adafruit Python GPIO library which will allow your Python scripts to access the MPSSE functionality of the FT232H breakout
+
Voila, nous allons terminer par l'installation de la bibliothèque "Adafruit Python GPIO" qui permettra à vos scripts python d'accéder au fonctionnalités MPSSE du breakout FT232H.
   −
First download an archive of the library by clicking the button below:
+
Pour commencer, nous allons télécharger l'archive en cliquant sur le lien suivant:
    
{{download-box|Adafruit Python GPIO Library|https://github.com/adafruit/Adafruit_Python_GPIO/archive/master.zip}}
 
{{download-box|Adafruit Python GPIO Library|https://github.com/adafruit/Adafruit_Python_GPIO/archive/master.zip}}
   −
Unzip the contents and then open a command terminal and navigate to the directory where the library was unzipped. Execute the following command to install the library:
+
Dézipper le contenu de l'archiver dans un répertoire. Démarrez ensuite un terminal et rendre vous dans le répertoire où vous avez dézippé le contenu de l'archive.
 +
 
 +
Saisissez y la commande suivante:
    
  <nowiki>python setup.py install</nowiki>
 
  <nowiki>python setup.py install</nowiki>
   −
Note if you see an error that Python can't be found then make sure you installed Python 2.7 as mentioned at the top of the page, and that it was added to your system path. [http://stackoverflow.com/questions/6318156/adding-python-path-on-windows-7 Here's more details on how to manually add Python to your system path].
+
Note: si vous constatez un message d'erreur indiquant que python ne peut être trouvé alors assurez vous d'avoir installé Python 2.7 comme mentionné en début de cette page (et avoir ajouté python au répertoire de recherche système). [http://stackoverflow.com/questions/6318156/adding-python-path-on-windows-7 Vous trouverez des détails sur ajouter manuellement python au répertoire de recherche système] (''stackoverflow, anglais'').
   −
You should see the Python library install itself with text similar to the below:
+
Vous devriez voir la bibliothèque python s'installer toute seule... comme ci-dessous:
    
{{ADFImage|RASP-FT232H-MPSSE-Windows-30.png}}
 
{{ADFImage|RASP-FT232H-MPSSE-Windows-30.png}}
   −
Now let's test if both the libftdi and Adafruit Python GPIO libraries were correctly installedIn the command terminal run Python by executing:
+
Nous allons maintenant vérifier que les bibliothèques libftdi et Adafruit Python GPIO soient correctement installéeExécutez les commandes suivantes dans un terminal:
    
<nowiki>python</nowiki>
 
<nowiki>python</nowiki>
   −
Once the Python interpretor has loaded, type the following at the >>> prompt:
+
Une fois l'interpréteur chargé, saisissez les commandes suivantes sur l'invite de commande python (invite idéntifié par ">>>" ):
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
Ligne 99 : Ligne 105 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
You should see no response from the Python interpretor after entering each command like below:
+
Vous ne devriez pas voir de message de la part de l'interpréteur. Cela signifie que les commandes se ont étés exécutées avec succès et que les bibliothèques ont étés chargées... comme ci-dessous:
    
{{ADFImage|RASP-FT232H-MPSSE-Windows-31.png}}
 
{{ADFImage|RASP-FT232H-MPSSE-Windows-31.png}}
   −
No response from the Python interpretor is a good sign because it means Python was able to successfully load the libraries.
+
Si vous constatez un message d'erreur après la saisie d'une commande, cela signifie que quelque chose ne s'est pas déroulé convenablement durant l'installation des bibliothèques. Dans ce cas, revenez en arrière dans le tutoriel et vérifiez point par point les différentes étapes d'installation. Vous aurez besoin d'avoir tous les fichiers libftdi dans le répertoire site-packages de Python. La bibliothèque Adafruit Python GPIO doit également s'installer avec succès.
 
  −
If you see an error message or failure after entering a command, unfortunately something went wrong with the installation of the library. Go back through the steps above and carefully check that nothing was missed. You want to make sure all the libftdi files are copied into the Python site-packages folder, and that the Adafruit Python GPIO library installed itself successfully.
     −
Once you've confirmed Python can load the libraries, exit the Python interpretor by typing:
+
Une fois que vous avez confirmé le chargement des bibliothèques dans python, vous pourrez quitter l'interpréteur en saisissant la commande suivante:
    
  <nowiki>quit()</nowiki>
 
  <nowiki>quit()</nowiki>
   −
Congratulations, the MPSSE mode drivers and Python libraries are installed and ready to use! Move on to the next section to see how to use the MPSSE mode to access GPIO, SPI, I2C, etc.
+
Félicitation, le pilote en mode MPSSE et la biblothèque Python sont installés en prêt à l'emploi! Nous pouvons maintenant passer à la suite du tutoriel pour apprendre à utiliser le mode MPSSE et accéder aux GPIO, bus SPI, bus I2C, etc.
    
== Désinstallation de libusb ==
 
== Désinstallation de libusb ==
29 917

modifications

Menu de navigation