{"id":5108,"date":"2015-02-06T02:21:20","date_gmt":"2015-02-06T01:21:20","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=5108"},"modified":"2023-08-20T14:55:10","modified_gmt":"2023-08-20T12:55:10","slug":"raspberry-pi-gps-module-gy-gps6mv2-einrichten","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=5108","title":{"rendered":"Raspberry Pi: GPS-Module GY-GPS6MV2 einrichten"},"content":{"rendered":"<p>Haben nun auch einen GPS-Empf\u00e4nger (Datenblatt (pdf)) bekommen. Hier ein paar Highlights:<\/p>\n<ul>\n<li>Model: GY-GPS6MV2<\/li>\n<li>Power Supply Range: 3 V to 5 V<\/li>\n<li>Ceramic antenna<\/li>\n<li>EEPROM for saving the configuration data when powered off<\/li>\n<li>Backup battery<\/li>\n<li>LED signal indicator<\/li>\n<li>Antenna Size: 25 x 25 mm<\/li>\n<li>Module Size: 25 x 35 mm<\/li>\n<li>Default Baud Rate: 9600 bps<\/li>\n<\/ul>\n<p>Klein und billig:<!--more--><br \/>\n<figure id=\"attachment_5115\" aria-describedby=\"caption-attachment-5115\" style=\"width: 1224px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3414-e1423167143502.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3414-e1423167143502.jpg\" alt=\"GPS Empf\u00e4nger\" width=\"1224\" height=\"1632\" class=\"size-full wp-image-5115\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3414-e1423167143502.jpg 1224w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3414-e1423167143502-225x300.jpg 225w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3414-e1423167143502-768x1024.jpg 768w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3414-e1423167143502-900x1200.jpg 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption id=\"caption-attachment-5115\" class=\"wp-caption-text\">GPS Empf\u00e4nger<\/figcaption><\/figure><br \/>\nWie kann der nun in Betrieb gehen? Wie in diesem Beitrag gut erkl\u00e4rt, die Serielle Schnittstelle <a href=\"https:\/\/raspberry.tips\/raspberrypi-einsteiger\/uart-auf-dem-raspberrypi-nutzen\" title=\"gps-1\" target=\"_blank\" rel=\"noopener noreferrer\">aktivieren<\/a> und den Empf\u00e4nger <a href=\"https:\/\/raspberry.tips\/raspberrypi-tutorials\/gps-modul-mit-dem-raspberry-pi-ortung-und-navigation#comment-7206\" title=\"gps-2\" target=\"_blank\" rel=\"noopener noreferrer\">einrichten<\/a>.<\/p>\n<p>Den GPS-Empf\u00e4nger mit dem rPi Verbinden, f\u00fcr das P1 Modell sind nur 4 Verbindungen n\u00f6tig:<\/p>\n<pre class=\"lang:default decode:true \" >\r\nVCC - 3,3V - PIN 1 (von oben links)(grau)\r\nRX  - TXD0 - PIN 8 GPIO14 (lila)\r\nTX  - RXDO - PIN 10 GPIO15 (gr\u00fcn)\r\nGND - Minus - PIN6 (3.von oben, rechts)(blau)\r\n<\/pre>\n<p>Hier kann man die Anschl\u00fcsse und mein Geh\u00e4use f\u00fcr den GPS-Empf\u00e4nger gut erkennen:<br \/>\n<figure id=\"attachment_5116\" aria-describedby=\"caption-attachment-5116\" style=\"width: 1224px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3412-e1423167257901.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3412-e1423167257901.jpg\" alt=\"rPi und GPS\" width=\"1224\" height=\"1632\" class=\"size-full wp-image-5116\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3412-e1423167257901.jpg 1224w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3412-e1423167257901-225x300.jpg 225w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3412-e1423167257901-768x1024.jpg 768w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3412-e1423167257901-900x1200.jpg 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption id=\"caption-attachment-5116\" class=\"wp-caption-text\">rPi und GPS<\/figcaption><\/figure><\/p>\n<p>Also kurz zusammengefasst:<\/p>\n<pre class=\"lang:default decode:true \" >\r\nsudo apt-get update\r\nsudo apt-get upgrade\r\n# (nur Kali Linux) Verzeichnis f\u00fcr den Boot Bereich erstellen\r\nmkdir \/fat32\r\n# (nur Kali Linux) Verzeichnis mounten\r\nmount \/dev\/mmcblk0p1 \/fat32\/\r\n\r\n# in Datei entfernen: console=ttyAMA0,115200 kgdboc=ttyAMA0,115200\r\nsudo nano \/boot\/cmdline.txt\r\n# und in Datei erg\u00e4nzen oder die Datei neu anlegen mit diesem Inhalt: init_uart_baud=9600\r\nsudo nano \/boot\/config.txt\r\n# (nur Kali Linux) Verzeichnis umount\r\numount \/fat32\r\n# in Datei auskommentieren: # T0:23:respawn:\/sbin\/getty -L ttyAMA0 115200 vt1001\t\r\n# T0:23:respawn:\/sbin\/getty -L ttyAMA0 115200 vt100\r\nsudo nano \/etc\/inittab\r\nsudo reboot\r\n\r\n# (optional) zum checken ob Daten ankommen\r\nsudo apt-get -y install minicom\r\nstty -F \/dev\/ttyAMA0 9600\r\nminicom -b 9600 -o -D \/dev\/ttyAMA0\r\n\r\n# GPS Programme install\r\nsudo apt-get -y install gpsd gpsd-clients\r\n# Datei wie folgt erg\u00e4nzen:  \/etc\/default\/gpsd\r\n# Default settings for gpsd.\r\n# Please do not edit this file directly - use `dpkg-reconfigure gpsd' to\r\n# change the options.\r\n#START_DAEMON=\"true\"\r\n#GPSD_OPTIONS=\"-n -G\"\r\n#DEVICES=\"\/dev\/ttyAMA0\"\r\n#USBAUTO=\"false\"\r\n#GPSD_SOCKET=\"\/var\/run\/gpsd.sock\"\r\nsudo nano \/etc\/default\/gpsd\r\n\r\n# GPSD manuel starten\r\n\/etc\/init.d\/gpsd start\r\n\r\n# Starten cgps\r\n#Usage: cgps [-h] [-V] [-l {d|m|s}] [server[:port:[device]]]\r\n#\r\n#  -h\t  Show this help, then exit\r\n#  -V\t  Show version, then exit\r\n#  -s\t  Be silent (don't print raw gpsd data)\r\n#  -l {d|m|s}  Select lat\/lon format\r\n#\t\td = DD.dddddd\r\n#\t\tm = DD MM.mmmm'\r\n#\t\ts = DD MM' SS.sss\"\r\n# -m      Display heading as the estimated magnetic heading\r\n#         Valid only for USA (Lower 48 + AK) and Western Europe.\r\ncgps -s \r\n# oder:  gpsmon [-?hVln] [-D debuglevel] [-t type] [server[:port:[device]]]\r\ngpsmon\r\n<\/pre>\n<p>Die Ausgabe von <code>cgps -s<\/code><br \/>\n <figure id=\"attachment_5119\" aria-describedby=\"caption-attachment-5119\" style=\"width: 883px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-05-um-17.53.26.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-05-um-17.53.26.png\" alt=\"cgps -s\" width=\"883\" height=\"418\" class=\"size-full wp-image-5119\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-05-um-17.53.26.png 883w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-05-um-17.53.26-300x142.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption id=\"caption-attachment-5119\" class=\"wp-caption-text\">cgps -s<\/figcaption><\/figure><\/p>\n<p>oder auch von <code>gpsmon<\/code><br \/>\n<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-03-12-um-19.21.32.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-03-12-um-19.21.32.png\" alt=\"gpsmon\" width=\"881\" height=\"727\" class=\"aligncenter size-full wp-image-5381\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-03-12-um-19.21.32.png 881w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-03-12-um-19.21.32-300x248.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>Es k\u00f6nnen also leicht der Standort (L\u00e4ngen und Breitengrad), Geschwindigkeit, H\u00f6he, anzahl der Sateliten usw. angezeigt werden (Fotos alle im Raum).<\/p>\n<p>Nun wollen wir die Daten in eine Datei schreiben. Das geht mit <a href=\"http:\/\/www.catb.org\/gpsd\/gpspipe.html\" title=\"gpspipe\" target=\"_blank\" rel=\"noopener noreferrer\">gpspipe<\/a> z.B. schreiben wir erst mal 10 S\u00e4tze in die Datei gps-data.txt.<\/p>\n<pre class=\"lang:default decode:true \" >\r\ngpspipe -r -n 10 -o gps-data.txt\r\n<\/pre>\n<p>Liefert z.B. folgende Daten in der Datei (Beschreibung der Felder &#8211; siehe University of Nebraska Cooperative Extension EC 01-157F):<\/p>\n<pre class=\"lang:default decode:true \" >\r\n{\"class\":\"VERSION\",\"release\":\"3.6\",\"rev\":\"3.6\",\"proto_major\":3,\"proto_minor\":7}\r\n{\"class\":\"DEVICES\",\"devices\":[{\"class\":\"DEVICE\",\"path\":\"\/dev\/ttyAMA0\",\"activated\":\"2015-02-05T18:53:09.576Z\",\"flags\":1,\"driver\":\"Generic NMEA\",\"native\":1,\"bps\":9600,\"parity\":\"N\",\"stopbits\":1,\"cycle\":1.00}]}\r\n{\"class\":\"WATCH\",\"enable\":true,\"json\":false,\"nmea\":true,\"raw\":0,\"scaled\":false,\"timing\":false}\r\n$GPRMC,185310.00,A,5226.33701,N,00944.56788,E,0.203,,050215,,,A*74\r\n$GPVTG,,T,,M,0.203,N,0.377,K,A*21\r\n$GPGGA,185310.00,5226.33701,N,00944.56788,E,1,07,3.07,49.5,M,46.0,M,,*63\r\n$GPGSA,A,3,22,13,25,18,12,15,24,,,,,,4.26,3.07,2.96*06\r\n$GPGSV,3,1,12,01,06,015,,06,01,107,10,12,49,234,28,13,10,157,13*78\r\n$GPGSV,3,2,12,14,12,319,,15,38,187,10,17,37,060,08,18,13,261,33*74\r\n$GPGSV,3,3,12,22,15,296,18,24,80,287,22,25,11,239,25,28,05,058,*73\r\n<\/pre>\n<p>Nun noch mal die ganze Schaltung zum nachbauen:<br \/>\n<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3413-e1423167358696.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3413-e1423167358696.jpg\" alt=\"GPS Schaltung\" width=\"1224\" height=\"1632\" class=\"aligncenter size-full wp-image-5117\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3413-e1423167358696.jpg 1224w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3413-e1423167358696-225x300.jpg 225w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3413-e1423167358696-768x1024.jpg 768w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/IMG_3413-e1423167358696-900x1200.jpg 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>Bald kann es also mit einem Accu losgehen&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Haben nun auch einen GPS-Empf\u00e4nger (Datenblatt (pdf)) bekommen. Hier ein paar Highlights: Model: GY-GPS6MV2 Power Supply Range: 3 V to 5 V Ceramic antenna EEPROM for saving the configuration data when powered off Backup battery LED signal indicator Antenna Size: 25 x 25 mm Module Size: 25 x 35 mm Default Baud Rate: 9600 bps &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=5108\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eRaspberry Pi: GPS-Module GY-GPS6MV2 einrichten\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[220,538,1023,1101,1319],"tags":[1943,1940,1941,1944,1942,1121,2190],"class_list":["post-5108","post","type-post","status-publish","format-standard","hentry","category-anleitung","category-elektronik","category-raspberry-pi","category-reisen","category-sicherheit-2","tag-cgps","tag-gps","tag-gps-modul","tag-gpspipe","tag-gy-gps6mv2","tag-kali","tag-raspberry-pi"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/5108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5108"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/5108\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5108"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}