Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-05-2014, 05:20   #1
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Android GPS via BT to Laptop Opencpn

Samsung S4 Android 4.3 dedicated GPS via BT to Laptop Opencpn
Windows 7 Dell Laptop with Opencpn 3.3.1618

I have tried and I am missing some conceptual framework and specifics for making the proper connections.

1. Android Samsung S4 Android Playstore Apps tried -
A.GPS over BT
B.NMEA GPS Sender

2. Bluetooth Pairing between Phone and Laptop.
Under Devices and Printers > Click on device > Bluetooth Operations and settings the Phone and Computer are paired for
"Audio and Video" - Play Music
"Data Sync" - Sync PIM Data with Phone book access
"Files Exchance" - Send File

I don't want to do any of those things. I want to send a NMEA data stream! I cannot determine if 1.A or 1.B Apps are actually sending a data stream over BT and I do not know how to do the following:
1. Make a BT Connection type for a NMEA data stream that will receive the NMEA data being sent by the Android App.
2. Connect that BT port to Opencpn so that the NMEA GPS data is seen.

I do know that the BT port seems to be Com 4.

Can anyone help me, perhaps there is some small Win7 program that solves this problem?
__________________

__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 05:27   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

PS When using NMEA Gps Sender and trying to connect to my laptop which is seen, I get "Error Connecting java.oi.IOException: read failed, socket might closed or timeout, read ret: -1"

I am wondering if Java is not working because Firefox has disabled java....
I have Java 7 Update 55 (64-bit) installed under Programs. I wonder if this works for 32 bit programs too?
__________________

__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 05:54   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

Installed java 32 bit next to java 64 bit. Now Firefox has a Java Se U55 plugin (not germaine) but NMEA GPS Sender, when I hit settings > connect and pick my computer, it still complains about Error Connecting. java.io.IOException: read failed.

Later: Searches on the error show that Java is working, don't know why the failure, something to do with BT?
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 05:59   #4
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: Android GPS via BT to Laptop Opencpn

Rick,
as you have seen already Bluetooth has several different protocols for different tasks. I guess it might be over 30 now. For serial transmission the SSP protocol is used.
To get GPS data from an Android device you might try something like this:
BlueNMEA
BlueNMEA
Gerhard
__________________
CarCode is offline   Reply With Quote
Old 08-05-2014, 06:46   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

Thanks Gerhard, I've seen that before I think. I found a couple of others too, all of which I will try.
==
BlueNMEA -sends location data over Bluetooth (RFCOMM) or TCP in the NMEA format. Source: BlueNMEA
Display shows the following:
Provider is selected
Network is not selected
Bluetooth client status: not available
Bluetooth server status: listening
TCP status: listening on port 4352
This is helpful, now what do I do with it?
==
NMEA Relay - Use your Android device as a portable GPS thanks to NRelay.As soon as NRelay is started, GPS data received by your device are sent through local network (Wi-Fi, Ethernet) to an other machine.
This machine can use these data using NMEA protocol. Source Code:
http://github.com/alexandreroman/nrelay This app wants the following:
Server Address - Nmea sentences are sent to this host.
Server Port - TCP Port on the server host.
So do I set up a TCP Connection in Opencpn somehow? What values?
==
GPS over BT - GPS over BlueTooth allows you to connect your mobile phone as an external GPS receiver that can transmit information about satellites and the current location, using Bluetooth, to computer. Uses Nmea 0183 --Can't seem to get it to connect, it has good choices for settings, but I have not learned how to get it connected yet. Have tried re-pairing, etc. May try reboot of both computer and cell, not connecting.

==Nmea Moniters
GPS Nmea Monitor Displays raw NMEA data coming from the GPS driver on your device. Can be used to check the GPS on your phone.
Option to record NMEA data to the SD card. Please do not give bad ratings if the app does not display any NMEA, The NMEA API does not work on some phones. -- This works on Samsung S4, can see nmea data stream from GPS.
==
GPS NMEA Tool -Small tool to view NMEA data returned by the built-in gps receiver. Works fine for monitering.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 07:08   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

Using NMEA GPS Sender - GPS NMEA Bluetooth transmitter (on App store)
This App allows you to use your mobile phone GPS receiver to send information via Bluetooth to other hardware that might need it. Sends out Nmea 0183 Sentences

Without rebooting everything, and with I just tried Opening OpenCPN and configuring Options > Connections as follows:

Quote:
Add Connection -
Serial Com4 (because I had noticed that the BT properties under Win7 > Devices and Connections > Samsung Phone had shown Com4)
COM4 Standard Serial over Bluetooth link selected in dropdown
Priority=1 Parameters=4800 baud
Output=No Filters=In;None,Out:none
No check on control checksum,
Ignore sentences = button off
Sentences = button on
Then I tried checking "Show Nmea debug windows"
and no nmea stream is showing in that window yet.

I have to get the Android S4 Phone properly connected via BT it is showing trouble in devices. Need to reboot. Still searching for services too.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 07:31   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

Now it seems that I am having Bluetooth Driver problems on the Win 7 Laptop.
Error: "Bluetooth peripheral device driver not found" when you try to connect a bluetooth device
Bluetooth to Windows 7 problem - Android Forums at AndroidCentral.com
Don't have time to figure this out right now.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 07:46   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

Ok, I just waited and it seems to be working. Under Devices & Printers > Bluetooth Device Operations and Settings > Configure Device > Com Ports Tab shows
"Com4 Incoming"
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 08:18   #9
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

The Bluetooth connection is working.

There is a red boat in Opencpn, and I've changed to 9600 baud. I bring Show Nmea Debug and the window does not stream Nmea. If I am using a serial port it seems to me that this should be showing the GPS sentences, so perhaps it is not working yet. --How do I determine this?
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 08:41   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

BlueNmea Readme states

Quote:
Using BlueNMEA over TCP
If your Android handset is connected to a WiFi network, any host on the network can connect to its IP address on TCP port 4352.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 11:45   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

Tried to setup an Opencpn connect port for BlueNmea
Net 192.168.104:4352 Priority 1 TCP Output No, Filters In:none, Out:None
Tried checksum and without.

The Nmea debug windows does not seem to show a data stream.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 12:01   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

Then tried to setup GPSoverBT using the BT Com4 serial connection.
with Serial Com4 Priority 1 Para 4800 Output No, Filters In=none, Out=none
Dataport dropdown= COM4 Standard Serial over Bluetooth link, Accept only sentences, tried check and uncheck Control Checksum.

Show Nmea debug window shows no nmea stream.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 12:30   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

In NRelay app using wifi
Server Address set to 192.168.1.104 (address of laptop)
Server Port set 14300
when I toggle the start button at the top it says Server not found.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 13:26   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

What is a TCP Server?
TCP also introduces the terms "server" and "client", the server being the peer that listen()s for an incoming connection. TCP vs UDP - What is a TCP connection? - Stack Overflow.

What is the difference between UDP and TCP?
The network is based in IP, which is a protocol that assigns an address to each network node, and which allows you to send small amounts of data (usually up to 64kB, but typically only 1500B) from one node to another. That by itself isn't worth much yet, because we can't make any checks that the data actually arrived, and that it arrived in the right order. If we want an abstract mechanism to transmit arbitrary amounts of data and ensure that they arrived, we need another protocol on top of the network that handles this "transmission". And that's the purpose of TCP.
However, in parallel to TCP, there's another "transmission" protocol that doesn't do any checking at all and has no reliability, UDP. UDP is just a thin wrapper around raw IP packets, which adds a little bit of meta data (like a port number).
The main difference between TCP and UDP sockets is that UDP is conectionless and doesn't really expect a confirmation that the other end received the data.

IP/TCP ?
While IP takes care of handling the actual delivery of the data, TCP takes care of keeping track of the individual units of data (called packets) that a message is divided into for efficient routing through the Internet.
__________________
rgleason is online now   Reply With Quote
Old 08-05-2014, 13:28   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,311
Re: Android GPS via BT to Laptop Opencpn

So when the NRelay app, using wifi, asks for the Server Address
Is that the IP address of the cell phone?
__________________

__________________
rgleason is online now   Reply With Quote
Reply

Tags
enc, gps, laptop, 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
OpenCPN - internal GPS - AIS via Wlan klaus53123 OpenCPN 12 15-11-2017 12:24
Connection Android device via Bluetooth Press1992 OpenCPN 3 30-03-2014 13:08
Android Phone as Bluetooth GPS with OpenCPN RhythmDoctor OpenCPN 1 04-01-2014 01:46
Using Blue NMEA for Android via bluetooth familycruisers OpenCPN 42 30-12-2011 09:08
Getting NMEA 0183 Data to a Laptop via Raymarine S1 Autopilot night0wl Marine Electronics 9 19-10-2011 08:18



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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.