Bluetooth GPS output
Bluetooth GPS output
February 08, 2017 07:00PM
I installed PolarView on my laptop running Linux Mint 18 Xfce 64-bit and it works fine.
Now, I try to connect my Android smartphone to use his GPS receiver and send NMEA 0183 data to PolarView using "Bluetooth GPS Output" app by meowsbox.
The smartphone is paired and connected on my laptop, but the port manager is unable to find the right port.
I tried on a laptop running windows 7, same trouble, even by checking the SPP Slave mode. The port list is empty.
Re: Bluetooth GPS output
February 08, 2017 11:15PM
I am not familiar with this application, so I can't speak of its capabilities. In general, for PolarView to receive NMEA 0183 data, the data must arrive over either an actual (rare today) or a virtual serial port (also known as "COM port"winking smiley. This is something that is usually provided by GPS devices and various emulators.
You may want to check with the application author to find out whether it does provide such an interface, and if so - what are the configuration options it requires.

Polar Navy Support
Re: Bluetooth GPS output
February 09, 2017 08:01AM
On your laptop running unix, and with your GPS receiver device connected to the laptop via BLUETOOTH, you should be able to discover the device name of the BLUETOOTH device as follows:

--in a terminal window, type

ls /dev/cu*


ls /dec/tty.*

This should return a list of devices available. From the list you will have to deduce which of the devices is the BLUETOOTH connection to your GPS. You should see something like:

Re: Bluetooth GPS output
February 09, 2017 03:11PM
My approach, in details, step by step :
- connect and pair the laptop and the smartphone
- in Terminal ,
+ sudo rfkill list
+ hcitool scan
- start "Bluetooth GPS output" (Android) on the smartphone
- in Terminal :
+ sdptool browse 55:55:55:55:55:55
+ sudo rfcomm connect hci0 55:55:55:55:55:55 6
Where 55:55:55:55:55:55 is the smartphone mac address, and 6 the channel
Terminal answers :
"Connected /dev/rfcomm0 to 55:55:55:55:55:55 on channel 6"
- start PolarView, open Port Manager
- Port : /dev/rfcomm0
- Data type : NMEA 0183
- Direction : input
- Speed : 4800
- Retry delay : 10 s / idle timeout : 60 s

Then start the port, but State remains "waiting" and the NMEA console black.
Re: Bluetooth GPS output
February 09, 2017 03:29PM
- First, you need to find out whether data is actually being delivered through /dev/rfcomm0 and, if so, what are the appropriate settings (in particular baud rate).
- To verify, open this port using any available terminal emulator program. You can use "screen" utility to do so, by running it from the command line:

screen /dev/rfcomm0 4800

You may need to try several baud rate values. You can also use several other serial port utilities, as described in this article:

- Once the serial port is successfully open, and provided the remote application is sending NMEA 0183 data, you should see NMEA sentences printed in the terminal window. These appear as ASCII text with a 5 letter command prefix. As long as you see readable text lines, you are probably getting the correct input.

- At that point note the baud rate that works and use the same settings in PolarView.

Polar Navy Support

Edited 2 time(s). Last edit at 02/09/2017 03:31PM by Polar Navy Support.
Re: Bluetooth GPS output
February 09, 2017 06:29PM
Perfect ! it works !
It is a matter of rights, permissions !
When I start PolarView with my user account, PolarView can't connect to the port /dev/rfcomm0, but when I launch it with sudo (root permissions), NMEA data are displayed in the console, and the sailing boat is on the map !
Last things to do, firstly, find the good permissions, secondly, try it on the boat, saturday afternoon.
Re: Bluetooth GPS output
February 09, 2017 11:29PM
You should be able to run PolarView from your account by adding your account to the group that owns /dev/rfcomm0 (usually uucp, but check) and then making the device group readable and writeable (chmod /dev/rfcomm0 g+rw)

Polar Navy Support
Re: Bluetooth GPS output
February 10, 2017 05:34PM
For Linux Mint the group is dialout :
sudo usermod -a -G dialout <username>
But rfcomm still refused to start using my user account.
In fact, it seems there's a trouble with rfcomm, so to fix it :
sudo chmod u+s /usr/bin/rfcomm
Then :
rfcomm connect hci0 55:55:55:55:55:55 6
works without sudo.
But PolarView still refuses to detect the port rfcomm0, except with sudo.
With my user account, PolarView starts with "Gtk-Message: Failed to load module "atk-bridge"", any ideas ?
Re: Bluetooth GPS output
February 10, 2017 11:10PM
Did you change permissions on the /dev/rfcomm0? What are they currently?

The log message can be ignored.

Polar Navy Support
Re: Bluetooth GPS output
February 11, 2017 07:56AM
Permissions :
/ $ groups
<myaccount> root adm dialout cdrom sudo dip plugdev lpadmin sambashare

drwxrwxr-x 19 root root 4540 Feb 11 11:49 dev/
crw-rw---- 1 root dialout 216, 0 Feb 11 11:50 rfcomm0
Re: Bluetooth GPS output
February 12, 2017 01:10AM
This should be sufficient, unless there is something within the rfcomm driver that requires suid. As a test (especially since this is probably your personal system) it may be worth trying to add "rw" permissions for others (chmod o+rw).

Polar Navy Support
Re: Bluetooth GPS output
February 13, 2017 02:32PM
Dear Support,

New permissions :
drwxrwxrwx 19 root root 4560 Feb 13 18:25 dev/
crwxrwxrwx 1 root dialout 216, 0 Feb 13 18:25 rfcomm0

But PolarView, launched with my account, isn't able to detect the data coming from the smartphone and starts with the same error message : Gtk-Message: Failed to load module "atk-bridge"
Re: Bluetooth GPS output
February 14, 2017 02:30AM
As you have established the issue is with permissions of the device. Have you been able to open and read this device using a different terminal software from your account (i.e. not from the root account)?

Polar Navy Support
Re: Bluetooth GPS output
February 16, 2017 02:16PM
No, i'm still looking for an issue.
But i tested Polarview on my Linux laptop connected with my smartphone in real conditions on board a sailing boat (night, day, thick fog ...) and i'm really satisfied.
Please log in to post in this forum.

Click here to login