-
Notifications
You must be signed in to change notification settings - Fork 2
/
reset.sh
executable file
·31 lines (29 loc) · 903 Bytes
/
reset.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# This is a script I use when there seems to be a problem with the GPS.
# I Don't know if all of it is necessary, but it works (most of the
# time).
#
# I'm using a Bluetooth rfcomm configuration similar to the one found
# at: <http://www.catb.org/gpsd/bt.html>
echo "******************************************************"
echo """
Procedure:
* Remove BT dongle form Pi
* Turn on Pi
* Turn on GPS
* Plug in BT dongle
* Make sure it's working (blue light blinking)
* Run this script
"""
echo "******************************************************"
sudo service bluetooth restart
sleep 5
sudo rfcomm release /dev/rfcomm0
sleep 1
sudo rfcomm bind rfcomm0
sleep 5
sudo service gpsd restart
sleep 5
echo "******************************************************"
echo " Should be ready now. Try running one of the scripts. "
echo "******************************************************"