将树莓派变成蓝牙GPS

作者:V君 发布于:2015-5-3 3:35 Sunday 分类:折腾手记

TL;DR: 

你需要准备USB蓝牙和USBGPS各一个,插上树莓 上电

sudo apt-get -y update;sudo apt-get -y upgrade;sudo apt-get -y autoremove

sudo apt-get install -y bluetooth bluez-utils blueman

#启用配对

sudo hciconfig hci0 piscan

sudo bluetooth-agent 0000 &

#添加串口

sudo sdptool add --channel=3 SP

#监听串口

sudo rfcomm watch hci0 3  /home/pi/send-gps.sh {}

#send-gps.sh 内容为 cat /dev/ttyACM0 > $1

在手机安装个蓝牙gps提供程序,配对OK可以连上来了, 推荐使用开源的Bluetooth GPS for Android

 

听我慢慢扯:

阅读全文>>

标签: 树莓派 linux 蓝牙 GPS

评论(0) 引用(0) 浏览(3707)

Powered by emlog 去你妹的备案 sitemap