{"id":171,"date":"2020-12-28T10:43:56","date_gmt":"2020-12-28T01:43:56","guid":{"rendered":"http:\/\/34.127.79.68\/wordpress\/?p=171"},"modified":"2020-12-28T10:50:18","modified_gmt":"2020-12-28T01:50:18","slug":"raspberry-pi%e3%81%abgps%e3%83%ac%e3%82%b7%e3%83%bc%e3%83%90%e3%82%92bluetooth%e3%81%a7%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/takenokonosato.myvnc.com\/wordpress\/2020\/12\/28\/raspberry-pi%e3%81%abgps%e3%83%ac%e3%82%b7%e3%83%bc%e3%83%90%e3%82%92bluetooth%e3%81%a7%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b\/","title":{"rendered":"Raspberry Pi\u306bBluetooth\u3067GPS\u30ec\u30b7\u30fc\u30d0\u3092\u63a5\u7d9a\u3059\u308b"},"content":{"rendered":"<p>\u524d\u63d0\u6761\u4ef6<\/p>\n<table>\n<thead>\n<tr>\n<th>\u9805\u76ee<\/th>\n<th>\u6761\u4ef6<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u672c\u4f53<\/td>\n<td>Raspberry Pi 3 Model B<\/td>\n<\/tr>\n<tr>\n<td>OS<\/td>\n<td>Raspberry Pi OS 5.4.79-v7+ (Raspbian Buster)<\/td>\n<\/tr>\n<tr>\n<td>GPS<\/td>\n<td>747 Pro<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>1.\u30da\u30a2\u30ea\u30f3\u30b0<\/h1>\n<pre><code class=\"language-shell \">pi@raspberrypi:~ $ bluetoothctl\n<\/code><\/pre>\n<pre><code class=\"language-shell \">[bluetooth]# scan on\n(\u203b1)\n[bluetooth]# scan off\n[bluetooth]# pair **:**:**:**:**:**\n(\u203b2)\n[bluetooth]# connect **:**:**:**:**:**\n(\u203b3)\n[bluetooth]# trust **:**:**:**:**:**\n[bluetooth]# quit\n<\/code><\/pre>\n<p>(\u203b1)\u3053\u3053\u3067MAC\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3002<br \/>\n[NEW] Device <strong>:<\/strong>:<strong>:<\/strong>:<strong>:<\/strong> 747PRO GPS<br \/>\n(\u203b2)PIN\u30b3\u30fc\u30c9\u5165\u529b<br \/>\nEnter PIN code: 0000<br \/>\n(\u203b3)\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u307e\u3059\u304c\u3001\u554f\u984c\u306a\u3057\u3002\u3082\u3057\u304b\u3057\u305f\u3089\u3001\u30b3\u30de\u30f3\u30c9\u81ea\u4f53\u4e0d\u8981\uff1f<br \/>\nAttempting to connect to <strong>:<\/strong>:<strong>:<\/strong>:<strong>:<\/strong><br \/>\n[CHG] Device <strong>:<\/strong>:<strong>:<\/strong>:<strong>:<\/strong> Connected: yes<br \/>\n[CHG] Device <strong>:<\/strong>:<strong>:<\/strong>:<strong>:<\/strong> ServicesResolved: yes<br \/>\nFailed to connect: org.bluez.Error.NotAvailable<br \/>\n[CHG] Device <strong>:<\/strong>:<strong>:<\/strong>:<strong>:<\/strong> ServicesResolved: no<br \/>\n[CHG] Device <strong>:<\/strong>:<strong>:<\/strong>:<strong>:<\/strong> Connected: no<\/p>\n<h1>2.\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\u306e\u8a2d\u5b9a<\/h1>\n<p>USB\u63a5\u7d9a\u3068\u306f\u7570\u306a\u308a\u3001Bluetooth\u63a5\u7d9a\u306e\u5834\u5408\u3001\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\u306e\u53d7\u3051\u53e3\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-shell \">pi@raspberrypi:~ $ sudo rfcomm bind 0 **:**:**:**:**:**\n<\/code><\/pre>\n<p>bind \u306e\u5f8c\u306e0\u306f\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u30020\u3060\u3068\u3001\/dev\/rfcomm0\u306b\u63a5\u7d9a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u8d77\u52d5\u6642\u306b\u81ea\u52d5\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u3001\/etc\/rc.local\u306b\u8ffd\u8a18\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h1>3.\u52d5\u4f5c\u78ba\u8a8d<\/h1>\n<p>cat\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-shell \">pi@raspberrypi:~ $ cat \/dev\/rfcomm0\n$GPGGA,012004.445,,,,,0,0,,,M,,M,,*4A\n$GPGSA,A,1,,,,,,,,,,,,,,,*1E\n$GPGSV,1,1,01,15,61,030,*48\n$GPRMC,012004.445,V,,,,,0.00,0.00,140501,,,N*4E\n$GPGGA,012004.800,,,,,0,0,,,M,,M,,*47\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u63d0\u6761\u4ef6 \u9805\u76ee \u6761\u4ef6 \u672c\u4f53 Raspbe<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-171","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/comments?post=171"}],"version-history":[{"count":15,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts\/171\/revisions"}],"predecessor-version":[{"id":186,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/posts\/171\/revisions\/186"}],"wp:attachment":[{"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/media?parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/categories?post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takenokonosato.myvnc.com\/wordpress\/wp-json\/wp\/v2\/tags?post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}