
There are still many questions on the web when it comes to RFCOMM connections. In this tutorial i will explain some of the basic methods to get you up and running with RFCOMM connection to an external bluetooth GPS and read NMEA data.
First, switch on the GPS and identify the BT address.
hcitool scan hci0Now, edit
/etc/bluetooth/rfcomm.conf to appear like the image above.Restart your BT services:
root@ronnieflip:~$ /etc/init.d/bluetooth stoproot@ronnieflip:~$ /etc/init.d/bluetooth start
You should now be able to bind your GPS to /dev/rfcomm0, like this:
root@ronnieflip:~$ rfcomm bind 0Confirm your connection:
root@ronnieflip:~$ rfcommrfcomm0: 00:11:22:33:44:55 channel 1 clean....watch the NMEA strings coming from your GPS:
root@ronnieflip:~$ cat /dev/rfcomm0 $GPGGA,111748.000,5907.6964,N,01121.1787,E,1,06,1.2,57.7,M,40.1,M,,0000*6F$GPRMC,111748.000,A,5907.6964,N,01121.1787,E,0.00,94.94,160807,,,A*50$GPVTG,94.94,T,,M,0.00,N,0.0,K,A*3D