RASP-GPS-ULTIME-Uart

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.

Utiliser l'UART

Il est possible d'utiliser directement l'UART du Raspberry Pi à la place de l'USB.

If you wish to use HW UART instead of the USB cable, it's perfectly possible ... you just need to do a bit more work to free the UART up on your Pi.

To get started, hook the GPS module up to your Pi as follows, cross-connecting the TX and RX pins (TX on one device goes to RX on the other and vice versa), and supply 5V from the Pi to the VIN pin on the GPS module:

RASP-GPS-ULTIME-Uart-01.png

Etape 1: Modifier /boot/cmdline.txt

Next, enter the following command from the command line:

$ sudo nano /boot/cmdline.txt

et modifier:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

en

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

Etape 2: modifier /etc/inittab

From the command prompt enter the following command:

$ sudo nano /etc/inittab

Et modifiez:

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

en

#Spawn a getty on Raspberry Pi serial line

  1. T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Etape 3: Rebooter votre Pi

After rebooting the Pi for the above changes to take effect, you can proceed with running gpsd ...

Etape 4: Redémarrer GPSD avec l'UART matériel

Restart gpsd and redirect it to use HW UART instead of the USB port we pointed it to earlier. Simply entering the following two commands:

$ sudo killall gpsd
$ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock

As with the USB example, you can test the output with:

$ cgps -s

Source: Adafruit Ultimate GPS on the Raspberry Pi écrit par Kevin Townsend pour Adafruit Industrie
Traduction réalisée par Meurisse D pour MCHobby.be.

Créé par Kevin Townsend pour 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