Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 12-05-2013, 19:08   #1
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
GPS Working with OpenCPN on Androids

As of May 12, 2013 we can state unequivocably two solutions for using built in gps on android devices running OpenCPN in a Linux chroot environment are available.

'Turbo GPS', downloadable for free from Google Play can be used with gps chips that generate nmea data. Instructions are pretty clear and included.

'GPS Share WIFI' also available from Google Play must be used with built in gps chips that do not generate nmea data and provide position, speed and course information only. The latter may possibly be used with the nmea generating chips too.

Note that 'GPS Share WIFI' does not need an external router or hot spot to work, provided your android device has a hot spot capability. WIFI off, network data off, device hot spot on. GPS Share settings - local port, default port #12776, Use WIFI hot - on.

OpenCPN settings:

Properties; network, tcp, address 192.168.43.1, data port 12776. Press apply then o.k..

You may have to stop and restart GPS Share WIFI if at first it appears OpenCPN is not receiving nmea sentences.

Enjoy!
armido
armido is offline   Reply With Quote
Old 12-05-2013, 19:11   #2
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: GPS working with OpenCPN on androids

To all,

I should have mentioned instructions for installing OpenCPN in a Linux chroot environment on an android device is here:

Building on Motorola Xoom | Official OpenCPN Homepage

armido
armido is offline   Reply With Quote
Old 13-05-2013, 16:23   #3
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: GPS working with OpenCPN on androids

GPS Share WIFI has an option for pairing with a bluetooth device. If someone who has a bluetooth gps would test to see if they are able to use their device with OpenCPN through GPS Share WIFI and report their results here it will be very much appreciated.

Thanks,
armido
armido is offline   Reply With Quote
Old 27-05-2013, 13:33   #4
Registered User

Join Date: May 2013
Posts: 1
Re: GPS working with OpenCPN on androids

anyone who have tried on a galaxy note 10.1?
pettern1972 is offline   Reply With Quote
Old 27-05-2013, 15:14   #5
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: GPS working with OpenCPN on androids

pattern1972,

Are you asking if anyone has installed linux and OpenCPN on an android device following my instructions, or has anyone tried the android programs that enable using the built in gps with OpenCPN?

Either way you are not likely to receive a response. Most people probably just do it then go away. I have rarely received reports from people. Not even complaints. Nada.

So, it is on you to try. The Galaxy note in discussions at xda-developers is a hackable device. Go for it, and if you run into problems post here:

http://www.cruisersforum.com/forums/...now-94064.html

armido
armido is offline   Reply With Quote
Old 31-05-2013, 17:33   #6
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: GPS working with OpenCPN on androids

As of May 31, 2013 I can report success using my USB Garmin GPSmap 76Cx with OpenCPN running in a linux chroot environment on my Xoom!

Details soon.

armido
armido is offline   Reply With Quote
Old 31-05-2013, 19:58   #7
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: GPS working with OpenCPN on androids

For details pertaining how an external USB gps can be made to work follow posts here: http://www.cruisersforum.com/forums/...now-94064.html

armido
armido is offline   Reply With Quote
Old 01-06-2013, 09:51   #8
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: GPS working with OpenCPN on androids

Quote:
Originally Posted by armido View Post
As of May 31, 2013 I can report success using my USB Garmin GPSmap 76Cx with OpenCPN running in a linux chroot environment on my Xoom!

Details soon.

armido
Bringing forward an earlier post to summarize that as of June 01, 2013 that external USB gps and internal gps works. See related thread for details related to USB gps - OpenCpn install on Android Devices easier now.

As of June 01, 2013 we can state unequivocably two solutions for using built in gps on android devices running OpenCPN in a Linux chroot environment are available.

'Turbo GPS', downloadable for free from Google Play can be used with gps chips that generate nmea data. Instructions are pretty clear and included.

'GPS Share WIFI' also available from Google Play must be used with built in gps chips that do not generate nmea data and provide position, speed and course information only. The latter may possibly be used with the nmea generating chips too.

Note that 'GPS Share WIFI' does not need an external router or hot spot to work, provided your android device has a hot spot capability. WIFI off, network data off, device hot spot on. GPS Share settings - local port, default port #12776, Use WIFI hot - on.

OpenCPN settings:

Properties; network, tcp, address 192.168.43.1, data port 12776. Press apply then o.k..

You may have to stop and restart GPS Share WIFI if at first it appears OpenCPN is not receiving nmea sentences.

Enjoy!
armido
armido is offline   Reply With Quote
Old 01-06-2013, 10:28   #9
ejs
Registered User

Join Date: Mar 2013
Location: From San Francisco
Boat: Leopard 48
Posts: 179
Re: GPS working with OpenCPN on androids

Hello Armido,

The IP address that you show will vary a bit from device to device depending on the address assigned by your local DHCP server. If you put the word "localhost" into the address field in OpenCPN it will use the correct IP address even if it changes.

Cheers, Eric
ejs is offline   Reply With Quote
Old 02-06-2013, 07:05   #10
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: GPS working with OpenCPN on androids

Thanks ej,

Instruction edited accordingly:

OpenCPN settings:

Properties; network, tcp, address, 'localhost', data port 12776. Press apply then o.k..

armido
armido is offline   Reply With Quote
Old 25-07-2013, 13:57   #11
Registered User
 
Wrong's Avatar

Join Date: Jul 2013
Posts: 1,702
Re: GPS working with OpenCPN on androids

Here is how "mrickma" got bluetooth to work:

First I made sure that the GPS was not paired with Android, then
apt-get install bluez nano
That was all what I needed to install. nano is a command line text editor.
hcitool scan
The mac address of my dongle is 00:1C:88:01:08:09
sdptool records 00:1C:88:01:08:09
Yes the channel number is 1. So I made the following file using nano
/etc/bluetooth/rfcomm.conf

rfcomm0 {
bind yes;
device 00:1C:88:01:08:09;
channel 1;
comment "iBT-GPS";
}

Registered that file for later usage:
rfcomm bind 0
“bind” is enough. It generates a device node, in my case /dev/rfcomm0. The connection to the dongle will be established when one reads from that node. Try it
cat /dev/rfcomm0
At least some NMEA sentences should become visible in the terminal, stop it
Ctrl-C
The /dev/rfcomm0 had still wrong permissions, only root had access. Apparently the chrooted Linux does not obey udev rules. My user which runs OpenCPN is android and in the group android. That is the default for a LinuxDeploy installation. He has to be allowed to read the NMEA data. I wanted to setup everything when Linux is started. So I made the next file using nano:
/etc/init.d/myscript

#!/bin/bash

/usr/bin/rfcomm bind 0
/bin/chgrp android /dev/rfcomm0
/bin/chmod g+rw /dev/rfcomm0

Made that file executable:
chmod a+x /etc/init.d/myscript
I told LinuxDeploy to run that script during startup by tagging “Custom startup”. In OpenCPN > Options > Connections > Add Connection, scroll down > DataPort I entered /dev/rfcomm0 and pressed apply. And there they were, green NMEA sentences in the debug window and three green bars in the top right corner.

Linux bluetooth seems to change constantly and one never knows which instructions are up to date for which distribution. This was for Ubuntu Precise (12.04), Debian Wheezy may be similar.
Regards

Michael
Wrong is offline   Reply With Quote
Old 27-07-2013, 10:13   #12
Registered User
 
Wrong's Avatar

Join Date: Jul 2013
Posts: 1,702
Re: GPS Working with OpenCPN on Androids

Instructions for getting U.S.B. g.p.s. working with OpenCPN running in the chroot linux environment see posts #265, 267 and 268 here:

http://www.cruisersforum.com/forums/...-94064-18.html
Wrong is offline   Reply With Quote
Old 29-07-2013, 02:15   #13
Registered User

Join Date: Jul 2013
Posts: 4
Re: GPS Working with OpenCPN on Androids

Hello Wrong,
I have repeated my procedure of using bluetooth GPS in a completely fresh install. This time I took care to understand what I was doing. The principle is very simple. I was using Linux tools in the chrooted environment to communicate with the bluetooth stack which had been started by Android. Up to Android 4.1.2 this is possible as both operating systems use the Bluez stack. Here are some instructions for Android <= 4.1.2 and a dongle which transmits NMEA data via bluetooth.

In Android pair the dongle and make sure you have no app running which uses its data.
In Linux install the bluez package:

apt-get install bluez<enter>

Find out the mac ADDRESS of your dongle. It has six hexadecimal numbers arranged like xx:xx:xx:xx:xx:xx .

hcitool scan<enter>

Record that ADDRESS and use it to find out the channel NUMBER:

sdptool records ADDRESS<enter>

In the output look for a line starting with Channel followed by a NUMBER. Record that. Now make a script, that is a text file, with the following contents supplying the recorded ADDRESS and NUMBER

#!/bin/bash

/usr/bin/rfcomm bind 0 ADDRESS NUMBER
/bin/chgrp android /dev/rfcomm0
/bin/chmod g+rw /dev/rfcomm0

and store it as /etc/init.d/myscript . To make that text file from the command line type

cat > /etc/init.d/myscript<enter>

then paste/type above lines terminating each with<enter>. On the last, empty line press ctrl-d. Make that file executable:

chmod a+x /etc/init.d/myscript<enter>

Run the script:

/etc/init.d/myscript<enter>

Now everything should be set up to receive the NMEA data from the dongle. You can test that by typing

cat /dev/rfcomm0<enter>

There should be some output which you can stop it by pressing ctrl-c .
Now in OpenCPN's settings, make a new serial connection with /dev/rfcomm0 as DataPort. Press apply and NMEA sentences should appear in the debug window.
To run above script every time LinuxDeploy starts Linux tag “Custom startup” in the startup options.

Unfortunately I doubt that above instructions work with Android versions >= 4.2 as Google has switched to the Bluedroid stack.
Regards
Michael
mrickma is offline   Reply With Quote
Old 29-07-2013, 06:16   #14
Registered User
 
Wrong's Avatar

Join Date: Jul 2013
Posts: 1,702
Re: GPS Working with OpenCPN on Androids

Michael,

Thanks for the very clear instructions for how to use a bluetooth gps with OpenCPN in a chroot linux environment. It's contributions like yours that make this project work and worthwhile.
Wrong is offline   Reply With Quote
Old 12-08-2015, 12:10   #15
Registered User
 
Wrong's Avatar

Join Date: Jul 2013
Posts: 1,702
Re: GPS Working with OpenCPN on Androids

Please note this correction to erroroneous information in post #8. Corrections are in bold type.

Note that 'GPS Share WIFI' does not need an external router or hot spot to work, provided your android device has a hot spot capability. WIFI off, network data off, device hot spot OFF. GPS Share settings - local port, default port #12776, Use WIFI hot - OFF.

OpenCPN settings:

Properties; network, tcp, address 'localhost', data port 12776. Press apply then o.k..

You may have to stop and restart GPS Share WIFI if at first it appears OpenCPN is not receiving nmea sentences.
Wrong is offline   Reply With Quote
Reply

Tags
gps, opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCpn Install on Android Tablets Easier Now. armido OpenCPN 400 31-03-2024 15:36
Test Polauto by using OpenCpn w/o instruments rgleason OpenCPN 93 27-12-2013 14:58
Open CPN and Google Earth bgrimwade OpenCPN 19 09-12-2011 15:32
GPS Stops Working ? No Problem - We Have GLONASS . . . barnakiel Navigation 74 03-09-2011 19:45
eMap GPS to OpenCPN 2.3.1 Charts ewanfish Navigation 8 04-07-2011 05:40

Advertise Here


All times are GMT -7. The time now is 21:31.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.