Modifications

Sauter à la navigation Sauter à la recherche
1 977 octets ajoutés ,  24 juillet 2013 à 20:35
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{RASP-GPS-ULTIME-NAV}}
 
{{RASP-GPS-ULTIME-NAV}}
   −
xxx
+
== 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:
 +
 
 +
{{ambox-stop|text=AdaFruit a designed the Ultimate GPS with a built-in regulator, so even if it's powered with 5V, the signal levels are still 3.3V - safe for your Pi!}}
 +
 
 +
[[Fichier:RASP-GPS-ULTIME-Uart-01.png|640px]]
 +
 
 +
== Etape 1: Modifier /boot/cmdline.txt ==
 +
Next, enter the following command from the command line:
 +
 
 +
<nowiki>$ sudo nano /boot/cmdline.txt</nowiki>
 +
 
 +
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:
 +
 
 +
<nowiki>$ sudo nano /etc/inittab</nowiki>
 +
 
 +
Et modifiez:
 +
 
 +
'''#Spawn a getty on Raspberry Pi serial line<br />
 +
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100'''
 +
 
 +
en
 +
 
 +
'''#Spawn a getty on Raspberry Pi serial line<br />
 +
#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:
 +
 +
<nowiki>$ sudo killall gpsd
 +
$ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock</nowiki>
 +
 
 +
As with the USB example, you can test the output with:
 +
 
 +
<nowiki>$ cgps -s</nowiki>
    
{{RASP-GPS-ULTIME-TRAILER}}
 
{{RASP-GPS-ULTIME-TRAILER}}
29 879

modifications

Menu de navigation