Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 4.00 average. Display Modes
Old 05-01-2013, 04:00   #121
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: OpenCpn install on android tablets easier now.

Hello

I read somewhere that Ubuntu is about to launch a smart phone and tablet version
of it's OS
Does that means O will work on these devise ?
JP
__________________

__________________
Ptizef is offline   Reply With Quote
Old 05-01-2013, 06:04   #122
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.

Ptizef,

See: Canonical Announces Ubuntu for Smartphones

The only reason any flavour of linux running as the primary operating system on an arm device would not allow OpenCPN or other open source software program to be installed, is if the system is altered to prevent it. Such a move would be diabolical. An insult to the spirit and design of linux. But, where profit is the motive anything can be built around the linux kernel - take android for example - as long as programs remain free or coders only receive "donations". The downside of android is the total loss of security and privacy for the user. Devices running android are sophisticated tracking tools. A boon to marketers and anybody who writes a "free" program capable of stealing your personal information. Will Canonical follow android's example? We can only hope the answer is no, because it would destroy a powerful reason for using linux - security.

armido
__________________

__________________
armido is offline   Reply With Quote
Old 05-01-2013, 10:34   #123
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.

mrm,

I missed your post until now. Your idea makes sense. Since a linux browser running in a chrooted environment is able to connect to the internet - it seems entirely reasonable that a gps should be able to communicate data to a navigation program like OpenCPN through a network socket.

There is an .apk called "slick usb 2 serial" that apparently connects serial devices to android. What may be required to bridge the divide between the android connection and a chrooted linux is a mystery to me. I'll see if it is possible to enquire with the apk's author about doing this.

In the meanwhile, if there is anybody skilled in writing android apps who understands the problem and may be able to produce a solution - we're all ears.

armido
__________________
armido is offline   Reply With Quote
Old 05-01-2013, 11:58   #124
mrm
Registered User

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

armido, I started to dig a bit deeper and there are some good and some bad news.

The good news first:

  • there is a method addNmeaListener in LocationManager class, which gives Android applications a direct access to the NMEA stream from device's GPS;
  • the low level Java serverSocket class is available, as well as are Threads.
So writing a TCP server providing NMEA on a socket appears to be trivial, but, bad news:

Android environment was designed to forbid programmers (using Android SDK) from creating persistent background daemons, as Android insists on being able to kill any app at any time for memory/resource management. There seem to be two ways to mitigate/circumvent this limitation. One is to ensure a highest possible priority for server app process by registering a (foreground) service. Another is to program using NDK (native apps) but (as far as I was able to understand) installation of such an app requires a rooted device and not sure about access to NMEA data from NDK apps.

I have too much work to dive even deeper, so I hope that some experienced Android developer will chime in.

Marius
__________________
mrm is offline   Reply With Quote
Old 05-01-2013, 12:09   #125
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,

The requirement a device be rooted is not a problem - since devices must be rooted in order to install linux and OpenCPN anyway. I'm going to pass this by a sailor/nerd friend who is a programmer. If he can't help maybe he knows somebody who can.

armido
__________________
armido is offline   Reply With Quote
Old 06-01-2013, 19:46   #126
Registered User

Join Date: Feb 2011
Posts: 242
Re: OpenCpn install on android tablets easier now.

Quote:
Originally Posted by mrm View Post
Given the above assumptions are true, the solution I propose is to write a small Android native server app (daemon), which will bind to a TCP/IP interface (on Android side) and serve NMEA stream to any app which can connect to it. Once such service is up and running, OpenCPN may be able to connect to it directly.

Only an idea, maybe helpful, maybe rubbish...
That was a great idea ... until I just checked on the OpenCPN online manual and read:

Quote:
Full Network input and output, including TCP, UDP, and GPSD services.
Now it's an outstanding idea. Looks like it no work needed on the OpenCPN side, just an Android side generic (re)transmission of the GPS data from the API. This little utility could help many Linux gps apps too, not just OpenCPN.
__________________
dave777 is offline   Reply With Quote
Old 07-01-2013, 07:20   #127
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.

Dave777, mrm,

Dave, where'd you grab the quote in your last post. mrm's proposal to write an android server application? I don't see it anywhere in this thread. Anyway, mrm - if you do there a lot of sailors who will be grateful for your contribution!

Thanks,
armido
__________________
armido is offline   Reply With Quote
Old 07-01-2013, 09:41   #128
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.,

I just went back to mrm's first post in this thread. His proposal preceded revelation in his subsequent post he is too busy right now.

However, a friend of mine may be working on this now.

armido
__________________
armido is offline   Reply With Quote
Old 09-01-2013, 12:32   #129
mrm
Registered User

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

Quote:
Originally Posted by armido View Post
O.K.,

I just went back to mrm's first post in this thread. His proposal preceded revelation in his subsequent post he is too busy right now.

However, a friend of mine may be working on this now.

armido
Well... I kind of found a welcome change of focus from current workload in this small coding project. Couldn't spend much time on it so it is *far* from being finished, but I would like to ask everyone who is interested to do a little testing.

Here is the app: http://infinity.eti.pg.gda.pl/tmp/NMEATest.apk

At the moment the only functionality is as follows:
- if device's GPS is switched off, application will patiently wait;
- if the GPS is on, first 200 NMEA sentences received will be displayed, then the app will stop;
- minimum Android version supported is 2.3.3, API 10.

All testers: please report if it works for you as described or not and include the device make/model and Android version in your feedback.
TIA

Marius
__________________
mrm is offline   Reply With Quote
Old 09-01-2013, 14:00   #130
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.

mrm,

Is the test for built in, external or both gps types? I have my built in gps on and nothing registers in your test. Xoom UMTS, 3g euro running xda JB 4.2.1 nightly build 124.

Thanks for you continued participation in this thread!

armido
__________________
armido is offline   Reply With Quote
Old 09-01-2013, 14:15   #131
mrm
Registered User

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

It is for built in GPS.

I target minimum 2.3.3 (API 10).

I tested on physical device HTC Desire S, 2.3.5. Also got it running in emulator at 4.0 (API 14) and 4.2 (API 17) (however without actual NMEA, as emulator support for this feature is buggy).

How far did you get? Did the app display anything? Was GPS on?

Can you try on original vendor installed image? Googling suggests, that Cyanogen derived images have problems with NMEA. May be well true for other images based on stock Android. Seems that vendors are patching NMEA support themselves, but do not give back...
Attached Thumbnails
Click image for larger version

Name:	IMAG0160.jpg
Views:	100
Size:	54.4 KB
ID:	52536  
__________________
mrm is offline   Reply With Quote
Old 10-01-2013, 05:51   #132
mrm
Registered User

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

Got a 'working OK' report from two friends. One with SE Xperia X10, other with Samsung Galaxy. One variance observed was that on Xperia NMEA sentences started to arrive only after GPS got an actual fix, while on Galaxy sentences started to flow immediately after GPS was switched on.

I have just checked server logs. There were 16 unique downloads so far but almost no reports. Why?
__________________
mrm is offline   Reply With Quote
Old 10-01-2013, 07:52   #133
oem
Registered User

Join Date: Nov 2009
Location: Vejle, Denmark
Boat: VindÝ 995 ds
Posts: 133
Re: OpenCpn install on android tablets easier now.

Quote:
Originally Posted by mrm View Post
I have just checked server logs. There were 16 unique downloads so far but almost no reports. Why?

I might be among the downloaders. I'm sorry, but my time to test is limited. And I only possess and old HTC Desire (the original) with very limited memory, so I didn't try to test it at all.

I still do think this thread is among the most interesting for some time :-) A backdoor to Opencpn on Android.
__________________
oem is offline   Reply With Quote
Old 10-01-2013, 10:50   #134
mrm
Registered User

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

Thanks for feedback, oem. The app package is about 160kB. When installed it is 640k at the moment. But I understand time constraints very well

A friend of mine tested on a recent Nexus 7 with 'OK, it works' report.

Will try to continue coding when I get some free time.

Marius
__________________
mrm is offline   Reply With Quote
Old 10-01-2013, 13:33   #135
Registered User

Join Date: Mar 2010
Location: Den Helder, the Netherlands
Boat: Drascombe Coaster (22ft) "Seanymph"
Posts: 107
Quote:
Originally Posted by mrm
Got a 'working OK' report from two friends. One with SE Xperia X10, other with Samsung Galaxy. One variance observed was that on Xperia NMEA sentences started to arrive only after GPS got an actual fix, while on Galaxy sentences started to flow immediately after GPS was switched on.

I have just checked server logs. There were 16 unique downloads so far but almost no reports. Why?
Hi Marius,

Just tried it and works fine on my Samsung Galaxy Tab 7.7 (GT-P6800). My tab has a built-in GPS, is rooted and runs Android 4.0.4.

I normally use OziExplorer for Android on this tab but would love to get OCPN running with my Dutch S-57 ENC's.

Greetings from the Netherlands,
Roel
__________________

__________________
Roel Smidt is offline   Reply With Quote
Reply

Tags
opencpn

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 07:44
Open CPN and Google Earth bgrimwade OpenCPN 19 09-12-2011 16:32
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 05:31



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.