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 Rating: Thread Rating: 4 votes, 4.00 average. Display Modes
Old 21-01-2013, 11:42   #151
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

Marius,

Thanks for your concise response. Would it be reasonable to expect the second API providing "cooked" information is giving a less reliable package of gps readings than the first that uses nmea data directly? Seems to me android has executed this haphazardly, without much concern for the potential consequences a person relying on the internal gps for guidance may endure.

armido
armido is offline   Reply With Quote
Old 21-01-2013, 11:52   #152
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 654
Re: OpenCpn install on android tablets easier now.

armido,

I think your conclusions re android are incorrect. They (Android) simply provide two different APIs (interfaces) to GPS data. They give programmers choice. 'If you want to deal with NMEA, interpret it yourself etc.. be our guest - here is the API for just that. OTOH if you are not interested in NMEA, only in position, speed, elevation and other bells and whistles re satellites - be our guest too - here is the other API'.

If you look at it closely, the 'cooked' API gives *more* information, just no NMEA.

IMHO it was executed correctly.

BTW, both APIs will use data from the same GPS hardware module, so there is no reason one should be less reliable than the other.

Marius
mrm is offline   Reply With Quote
Old 21-01-2013, 11:58   #153
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

Marius,

So, can OpenCPN use both?

armido
armido is offline   Reply With Quote
Old 26-01-2013, 11:35   #154
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

O.k.,

Let's get our effort to enable using your gps with OpenCPN on your tablet running in a chroot environment in motion again.

I asked my sailor/geek friend if it would be doable to work around the lack of standardization in handling nmea data between the various manufacturers of android devices. He replied that while his plate was full and time to do this himself was lacking, he could at least make a recommendation.

"...there are two GPS API's in Android. The easiest tack might be to just make and APK that constructs fake NMEA sentences for OpenCPN, if the raw NMEA API isn't available on the given device. This shouldn't be a big deal at all, and then you don't need to coordinate any changes in OpenCPN with the core folks there. It'll just work with the stock version.

----------------
If the raw NMEA API is not available, use the Android Location API to get position, and then output fake NMEA sentences for OpenCPN to read.

Sample Java code to write an NMEA sentence is in the 'writeGGASentence' method in:
http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwind/formats/nmea/NmeaWriter.java>

So, if you're still on board Marius, what's your take on this? Anyone with friends who may be able to comment/contribute here please invite them to participate.

Other ideas are welcome.

armido
armido is offline   Reply With Quote
Old 26-01-2013, 11:49   #155
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 654
Re: OpenCpn install on android tablets easier now.

armido, I am on board, had the same idea (i.e. construct NMEA). However, I expect to be able to make some progress around mid February earliest. Work commitments have priority (plus I am fighting a nasty cold).

Anyway, once I get to it, my first priority is to have a stable service app, offering the native NMEA.

Once this is done, I'll look into extending the app with the ability to use the other API. Since most tests so far returned with a positive feedback re access to NMEA, this is lower priority.

Marius
mrm is offline   Reply With Quote
Old 26-01-2013, 11:57   #156
Registered User
 
familycruisers's Avatar

Join Date: Aug 2011
Location: On the boat
Boat: Westerly Centaur. 26'
Posts: 500
Send a message via Skype™ to familycruisers
Re: OpenCpn install on android tablets easier now.

I have a marine section on a buddies tablet site. I posted the question there. Lots of people there smarter than I.
Open CPN on Tablet -------HELP NEEDED
familycruisers is offline   Reply With Quote
Old 27-01-2013, 08:19   #157
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

Marius, thanks for your continued involvement and hope you recover from the cold soon. Your approach makes sense with most results of your nmea test positive. In the mean while there will be device owners who's system will fail the test - either because they are using a custom ROM like myself or are unfortunate to have a stock ROM that doesn't play well with nmea data. The primary objective is to enable as many sailors (or commuters - heaven forbid) to use nav software on their device. family cruisers, thanks for extending our request for assistance to your marine section. Every bit of assistance we can get is welcome.

armido
armido is offline   Reply With Quote
Old 31-01-2013, 10:48   #158
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

I don't believe I stated clearly why the information that follows was provided in my earlier post.

We need someone with the right experience and skills, and who has the time - to write an apk as described by my friend below.

I asked my sailor/geek friend if it would be doable to work around the lack of standardization in handling nmea data between the various manufacturers of android devices. He replied that while his plate was full and time to do this himself was lacking, he could at least make a recommendation.

"...there are two GPS API's in Android. The easiest tack might be to just make and APK that constructs fake NMEA sentences for OpenCPN, if the raw NMEA API isn't available on the given device. This shouldn't be a big deal at all, and then you don't need to coordinate any changes in OpenCPN with the core folks there. It'll just work with the stock version.

----------------
If the raw NMEA API is not available, use the Android Location API to get position, and then output fake NMEA sentences for OpenCPN to read.

Sample Java code to write an NMEA sentence is in the 'writeGGASentence' method in:
http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwind/formats/nmea/NmeaWriter.java>

Any volunteers?

armido
armido is offline   Reply With Quote
Old 17-02-2013, 06:47   #159
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

While we wait for resolutions to the gps problem, I am soliciting feedback from folks who have installed linux and OpenCPN per my instructions here: Building on Motorola Xoom | Official OpenCPN Homepage to to let me know. If there have been sufficient significant numbers of success stories I'll put together a video instructing how to use OpenCPN on a tablet - and show how useful having OpenCPN on a tablet is, even without a gps.

armido
armido is offline   Reply With Quote
Old 17-02-2013, 21:04   #160
Registered User

Join Date: Feb 2013
Location: Moscow, Russia
Boat: Duet 16
Posts: 16
Re: OpenCpn install on android tablets easier now.

I asked the developer of Linux Deploy program. He says that /dev under linux and /dev under android is the same. So i have successfully connected external bluetooth GPS receiver to my tablet under android 4.0.3 and debian wheezy. GPS works well with ocpn.
sevanopula is offline   Reply With Quote
Old 18-02-2013, 06:37   #161
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

sevanopula,

It's refreshing to hear something positive about gps usage with OpenCPN running in a chroot environment on an Android tablet. A bluetooth gps may be for the moment the only solution available to those who demand gps functionality with OpenCPN on their tablet. The possibility was discussed in this thread, but nobody actually tried bluetooth because their devices are apparently all usb.

Will you please provide specific information concerning which tablet you own, it's features, and clarify your ROM is stock android 4.0.3.? Manufacturer and model of your bluetooth gps? Steps you took in setting up and connecting to OpenCPN?

Thanks!
armido
armido is offline   Reply With Quote
Old 18-02-2013, 07:45   #162
Registered User

Join Date: May 2012
Location: Live aboard 19 years
Boat: Norsea, center cockpit/aft cabin, 27'0"
Posts: 354
Re: OpenCpn install on android tablets easier now.

To all:

I copied this over from sevanopula's comment in the Opencpn runs on embedded arm thread, this forum.

"Armido, i have bluetooth GPS receiver and my tablet under android has bluetooth. I connected GPS and tablet under debian and GPS receiver works well with OpenCPN. I did it like at this link: Using Bluetooth GPS - Ubuntu Forums. I can add to this that you should run opencpn under root or do chmod 666 /dev/rfcomm0 every time you run ocpn. So, bluetooth under debian start connection automatically to GPS."

More to come.
armido
armido is offline   Reply With Quote
Old 18-02-2013, 11:11   #163
Registered User

Join Date: Feb 2013
Location: Moscow, Russia
Boat: Duet 16
Posts: 16
Re: OpenCpn install on android tablets easier now.

armido,

My device is Qumo Helios. It has one core CPU 1 GHz, 512 MB RAM, 8 GB nand flash. I use it with 32 GB micro sd card. Version on stock was 4.0.3. Bluetooth GPS - old BT-74S.

Steps to connecting GPS:

1) Install package bluez-utils via synaptic or: sudo apt-get install bluez-utils
2) Look in the / etc / default / bluetooth, should be a line: BLUETOOTH_ENABLED = 1
3) Edit the file / etc / bluetooth / serial.service. If not present, create it. The contents should be as follows:

[Bluetooth Service]
Identifier = serial
Name = Serial service
Description = Bluetooth Serial Port service
Autostart = true

4) Edit the file / etc / bluetooth / hcid.conf If not present, create it. The contents should be as follows

#
# HCI daemon configuration file.
#
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# None - Security manager disabled
# Auto - Use local PIN for incoming connections
# User - Always ask user for a PIN
#
security user;
# Pairing mode
# None - Pairing disabled
# Multi - Allow pairing with already paired devices
# Once - Pair once and deny successive attempts
pairing multi;
# PIN helper
# Pin_helper / usr / bin / bluepin;
# D-Bus PIN helper
# Dbus_pin_helper;
# Default PIN code for incoming connections
passkey "0000";
}
# Default settings for HCI devices
device {
# Local device name
#% D - device id
#% H - host name
name "% h-% d";
# Local device class
class 0x3e0100;
# Default packet type
# Pkt_type DH1, DM1, HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# None - no specific policy
# Accept - always accept incoming connections
# Master - become master on incoming connections,
# Deny role switch on outgoing connections
lm accept;
# Default link policy
# None - no specific policy
# Rswitch - allow role switch
# Hold - allow hold mode
# Sniff - allow sniff mode
# Park - allow park mode
lp rswitch, hold, sniff, park;
# Authentication and Encryption (Security Mode 3)
# Auth enable;
# Encrypt enable;
}


Passkey - is a pin code for the bluetooth gps. It may be 0000 or 1234, For my bluetooth 0000

5) Know the channel number and the MAC address of bluetooth GPS. Under android bluetooth GPS should not be paired, if paired, unpaire it. Under android bluetooth should be turned on.

a) restart bluetooth:

sudo / etc / init.d / bluetooth restart

b) turn on our GPS-receiver and type:

hcitool scan
c) See the output:

Scanning ...
00:0 D: B5: 37:3 B: A9 Nokia LD3W

... and recording the MAC address.

d) know exactly receiver channel:

sdptool browse 00:0 D: B5: 37:3 B: A9

6) Edit the file / etc / bluetooth / rfcomm.conf. Adds information about channel and MAC address.

rfcomm0 {
bind yes;
device 00:0 D: B5: 37:3 B: A9;
channel 1;
comment "Serial Port";
}

in my example is rfcomm0, because there was no other serial connections .
Respectively, for each additional unit number increases by
1 (rfcomm1, rfcomm2 etc)

7) Starting:

sudo rfcomm release 0

0 - means rfcomm0

sudo rfcomm connect 0

8) Look NMEA messages c GPS.

cat / dev/rfcomm0

If all goes well, you should see NMEA messages.

9) In OCPN choos / dev/rfcomm0
If the program does not start as root, then each time it is necessary to enter sudo chmod 666 / dev/rfcomm0.


Now GPS will connect automatically (if enabled Bluetooth and there are no pairing with him under android) when linux starts under Linux Deploy. If you need bluetooth GPS for android you should stops linux by clicking pause button of Linux deploy and paire with him under the android. Do not forget to unpair with it if you need it for Linux.

Concerning USB GPS, i think if your android kernel supports PL2303 or FT232 chips then you can use GPS. If no the way is to find drivers to your core or to compile it if source is available. To check supporting you should connect GPS and see the answer to dmesg command. I intend to check supporting of prolific pl2303 chip for my kernel.
Sorry for my english.
sevanopula is offline   Reply With Quote
Old 18-02-2013, 22:10   #164
Registered User

Join Date: Feb 2013
Location: Moscow, Russia
Boat: Duet 16
Posts: 16
Re: OpenCpn install on android tablets easier now.

Here is the link haw to compile pl2303 or ft232 driver. You need to find source code for your version of current kernel, select driver supporting from menuconfig of kernel:
device drivers --> USB support --> USB Serial Converter support --> USB Prolific 2303 Single Port Serial Driver (or USB FTDI Single Port Serial Driver, you should know which chip is present in your USB GPS), then compile kernel and copy *.ko driver to current driver directory. Then reboot device. How to enable FTDI Support for your USB Host featuring Honeycomb Tablet (including sample native application)
sevanopula is offline   Reply With Quote
Old 18-02-2013, 23:50   #165
Registered User

Join Date: Feb 2013
Location: Moscow, Russia
Boat: Duet 16
Posts: 16
Re: OpenCpn install on android tablets easier now.

Here is other method to use GPS USB with pl2303 chip.
This link is traslated from russian: Translated link. Original link
sevanopula is offline   Reply With Quote
Reply

Tags
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
Xoom Quad Band Int'l Armel Running OpenCPN armido OpenCPN 25 03-11-2012 06:44
Open CPN and Google Earth bgrimwade OpenCPN 19 09-12-2011 15:32
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


All times are GMT -7. The time now is 17:29.


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.