Pi-Zero-Headless-Depanner

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Dépanner avec câble console USB

 
Crédit: AdaFruit Industries www.adafruit.com

Si vous n'arrivez pas à faire de ping ou de ssh sur votre Pi Zero alors il sera nécessaire de faire un peu de dépannage pour voir ce qui se passe. C'est là que le câble console USB (ou PiUart savent se montrer très utiles.

Il existe déjà un excellent guide qui décrivant l'usage du câble USB console avec instruction et pre-requis pour les différents systèmes d'exploitation. Prenez le temps de lire ce tuto avant de poursuivre.

Ce guide utilisera screen sur Linux pour les différents exemples. Comme tout se passe en ligne de commande (et qu'il y a beaucoup d'affichage de texte), cela devrait être similaire sur presque tous les OS.

Interfacer avec le Pi Zero

Le Pi Zero est généralement distribué dans connecteur sur le GPIO. C'est génial car cela vous permet de souder votre propre connecteur (mâle, femelle, à 50%, etc).

 
Crédit: AdaFruit Industries www.adafruit.com

Sur l'image ci-dessus:

  • (A) présente un Pi Zero sans connecteur,
  • (B) présente un Pi Zero W avec un connecteur mâle,
  • (C) présente un Pi Zero avec un connecteur femelle à angle droit,
  • (D) présente un custom topper with serial pins indicated.

If you have male headers, you can connect the console cable directly. If you have female headers, just use some short lengths of prototyping wire.

 
Crédit: AdaFruit Industries www.adafruit.com

Power Options

There are a couple of different ways to power the Pi Zero when using a console cable. Both options are shown below.

 
Crédit: AdaFruit Industries www.adafruit.com

You should be able to power the Pi Zero directly from the USB cable (A). However, if you have other items attached to the Pi Zero that require more power, you may need to provide power through the micro-USB connector (B). In that case, do not connect the red power lead.

Booting With A Console Cable

Proper wiring is critical, esp. for the red power cable. Carefully examine the images below to insure you have the correct cable connections.

 
Crédit: AdaFruit Industries www.adafruit.com

 
Crédit: AdaFruit Industries www.adafruit.com

OK. Let's bring it up. Do things in this order:

  1. Insert SD card into Pi Zero.
  2. Connect the green, white, and black cable leads to the GPIO header. Leave red disconnected for now.
  3. Insert USB console cable into host computer.
  4. Launch whatever terminal program you use.
  5. Make 110% sure you know where the 5V pins are on the GPIO header.
  6. Swiftly and carefully attach the red cable lead to one of the 5V pins on the header. THIS IS THE SPARK OF LIFE! (or death if you chose the wrong pin)

You should now see some signs of life on the green ACT LED.

 
Crédit: AdaFruit Industries www.adafruit.com

And in your terminal window, you should see boot messages scrolling by.

 
Crédit: AdaFruit Industries www.adafruit.com

Eventually you should get to a login prompt.

 
Crédit: AdaFruit Industries www.adafruit.com

Use the following user name and password to login:

  • pi
  • raspberry

 
Crédit: AdaFruit Industries www.adafruit.com

And you're in.

What's next depends on what the problem is. We can't cover them all here. But now you have access to the Pi Zero and can navigate the system and edit things as needed based on whatever guidance you receive.

Some common basic commands are:

  • dmesg to check the kernel log for anything odd
  • ifconfig to see network status and settings
  • lsusb to see what's connected to USB port
  • lsmod to check for kernel modules

Source: Raspberry Pi Zero Headless Quick Start

Tutoriel créé par Carter Nelson pour AdaFruit Industries. Tutorial created by Carter Nelson for AdaFruit Industries.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com