|
|
31-01-2024, 19:19
|
#1
|
Registered User
Join Date: Feb 2022
Location: The Ocean
Boat: Cape Horn 35'
Posts: 46
|
Sending smartphone gps signal to openplotter
Hello,
I couldn't find a topic with this issue, so here it goes.
For now i cannot access the gps receiver on my boat. I've just started setting up my raspberry pi/openplotter and thought to send the gps signal from my iphone and android tablet to the pi server. I would later like to prioritize this gps data streams.
I tried following youtube tutorials, downloaded gps apps to send data, but i couldn't get it done.
Beginner here. Thank you for any advice!
|
|
|
01-02-2024, 05:59
|
#2
|
Registered User
Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,372
|
Re: Sending smartphone gps signal to openplotter
There are some apps to send GNSS from Androids to local network where you can get it into OCPN. For example
But that's more for backup and tests I'd say.
For a proper and stable connection when using OCPN as a aid for navigation get yourself a GNSS USB-receiver (puck) instead.
(GPS is not the only system in the world that's why I word it "GNSS".)
|
|
|
01-02-2024, 14:06
|
#3
|
Registered User
Join Date: Mar 2012
Location: Solomons, MD
Boat: Cal 27
Posts: 165
|
Re: Sending smartphone gps signal to openplotter
I've used the paid version of this in the past. Don't know if it still works.
https://play.google.com/store/apps/d...meowsbox.btgps
|
|
|
01-02-2024, 14:42
|
#4
|
Registered User
Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,372
|
Re: Sending smartphone gps signal to openplotter
cas206.
What I can see that one can only send Bluetooth. OpenCPN, PC versions, can not use Bluetooth. I may be possible to use it via Openplotter but I've never tried and I got the impression it's not straight forward. Anyone else??
The best option would be to use an App connecting by wifi?
|
|
|
01-02-2024, 14:52
|
#5
|
Registered User
Join Date: Mar 2012
Location: Solomons, MD
Boat: Cal 27
Posts: 165
|
Re: Sending smartphone gps signal to openplotter
Quote:
Originally Posted by Hakan
cas206.
What I can see that one can only send Bluetooth. OpenCPN, PC versions, can not use Bluetooth. I may be possible to use it via Openplotter but I've never tried and I got the impression it's not straight forward. Anyone else??
The best option would be to use an App connecting by wifi?
|
There is a connection wizard built into the app that walks you through the process. I just downloaded the app and tried it with my Mint Linux install. It still works on my Samsung Galaxy Android phone. It uses "rfcomm" to make a serial connection via Bluetooth connection. So OpenCPN connection is via serial connection. There is wizard for Windows and Android, but I have not tested that.
Added Later:
Also, OP was interested in Pi, so if it works with Mint Linux (debian derivative) it should work with Raspberry OS (debian derivative).
|
|
|
01-02-2024, 15:19
|
#6
|
Registered User
Join Date: Mar 2012
Location: Solomons, MD
Boat: Cal 27
Posts: 165
|
Re: Sending smartphone gps signal to openplotter
Quote:
Originally Posted by Hakan
cas206.
What I can see that one can only send Bluetooth. OpenCPN, PC versions, can not use Bluetooth. I may be possible to use it via Openplotter but I've never tried and I got the impression it's not straight forward. Anyone else??
The best option would be to use an App connecting by wifi?
|
Ok, just tried to connect to the app using Openplotter on a Pi 4 and it doesn't work, out of the box. So pass on this app for now.
|
|
|
01-02-2024, 15:38
|
#7
|
Registered User
Join Date: Mar 2012
Location: Solomons, MD
Boat: Cal 27
Posts: 165
|
Re: Sending smartphone gps signal to openplotter
Quote:
Originally Posted by cas206
Ok, just tried to connect to the app using Openplotter on a Pi 4 and it doesn't work, out of the box. So pass on this app for now.
|
Nevermind. It does work. I forgot to disconnect from my desktop before attempting to connect to the Openplotter / Pi.
|
|
|
17-11-2024, 14:52
|
#8
|
Junior Cruiser
Join Date: Jan 2022
Location: Frigid Lake Michigan, USA
Boat: '88 C36 mk1-tr
Posts: 6
|
Re: Sending smartphone gps signal to openplotter
I'd like to refresh this topic a bit. I've tried the suggested apps but for some reason they are not playing well with my Android OS or Hardware (the playstore won't let me d/l them). I am attempting to do the same thing the OP was... bench testing a new rPi/SignalK install while the boat is on the hard. If anyone is still doing this on their bench please let me know what to share (system configurations, versions, etc). Otherwise, the next time I get to the boat, i'll steal the GPS puck if i have to... but since there are three GNSS capable devices right in front of me, probably reporting my position to G~d knows where, I just want to get one of them to do the same on my OpenPlotter network!!
|
|
|
17-11-2024, 20:44
|
#9
|
Registered User
Join Date: Mar 2011
Posts: 790
|
Re: Sending smartphone gps signal to openplotter
Quote:
I've tried the suggested apps but for some reason they are not playing well with my Android OS or Hardware (the playstore won't let me d/l them)
|
If you cannot download and install an app from Google Playstore it generally means that your hardware or version of Android is not compatible.
The previous listed app; Bluetooth GPS Output published by Meowsbox does work with OpenCPN. On a Raspberry Pi you have to jump through a few hoops to create a Bluetooth Serial Port connection. These are the steps I have used, there may be better ways.
1. Pair the Bluetooth connection between the Android and Raspberry Pi devices.
2. Identify the MAC address using the bluetoothctl devices command
Code:
$ bluetoothctl devices
Device 68:5A:CF:87:2A:61 OzPhone
Device 18:47:3D:26:53:EC DESKTOP-IKVUVTU
3. Identify the channel associated with the serial port service and the MAC Address found above using the sdptool command
Code:
$ sdptool records 68:5A:CF:87:2A:61
.....
Service Name: SPP slave
Service RecHandle: 0x10013
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 7
.....
4. Create the serial port using the rfcomm command
Code:
$ sudo rfcomm connect hc10 68:5A:CF:87:2A:61 7
Connected /dev/rfcomm0 to 68:5A:CF:87:2A:61 on channel 7
Press CTRL-C for hangup
5. Configure an OpenCPN NMEA 0183 Serial connection using /dev/rfcomm0
Find attached a few screenshots.
|
|
|
19-11-2024, 19:01
|
#10
|
Registered User
Join Date: Jul 2015
Posts: 91
|
Re: Sending smartphone gps signal to openplotter
As a back up, I use ShareGPS from Google Play Store, which sends the GPS NMEA data by USB cable from my Android to a TCP connection set up on OpenCPN. ShareGPS has a good explanation on how to do it. On the Android "with developer mode enabled it is possible to use the USB connection to the PC to send NMEA data. The PC needs ADB (android debug bridge) installed".
On the PC I installed ADB in a folder in the root directory & in that folder I wrote a batch named ADB.bat which has the line "adb forward tcp:20175 tcp:50000". 20175 is the incoming port set up under the "Options/Connect" tab on OpenCPN, and 50000 is the ShareGPS default outgoing port on the phone.
The ShareGPS help links are good.
Even though this setup is a back up, I feel that the quality of the signal from the phone is very accurate and the signal acquisition is faster than other receivers. It's an old phone which can't be updated beyond Android 7.1!
Maelruan
|
|
|
20-11-2024, 04:59
|
#11
|
Registered User
Join Date: Jun 2022
Location: Cantabria
Boat: Jeanneau - Merry Fisher 925
Posts: 581
|
Re: Sending smartphone gps signal to openplotter
I've been using "Bluetooth GPS Output published by Meowsbox" for long time with windows computers/tablets and works great.
the problem is with Raspberry, and only I tested is Debian, what happens to be a problem?
every time that the mobile is connected the Raspi exchanges the GNSS channel.
the correct procedure to keep the connection in Raspi is:
with the mobile paired, of course.
much better to act as "su"
Code:
su
Password:
rfkill list
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
hcitool scan
Scanning ...
XX:XX:XX:XX:XX:XX "Name of your mobile"
YY:YY:YY:YY:YY:YY "Another BT device"
sdptool browse XX:XX:XX:XX:XX:XX
Browsing XX:XX:XX:XX:XX:XX ...
...
...
Service Name: SPP slave
Service RecHandle: 0x10011
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: CC <-----Important
Profile Descriptor List:
"Serial Port" (0x1101)
Version: 0x0102
rfcomm bind "Name of your mobile" XX:XX:XX:XX:XX:XX CC
exit
exit
rfcomm
rfcomm0: XX:XX:XX:XX:XX:XX channel CC config [tty-attached]
rfcomm1: YY:YY:YY:YY:YY:YY channel 1 config [tty-attached]
If you keep the same session the mobile GNSS channel won't change but if you do it will so you must do again some steps above as:
you have to release the rfcomm attached to the gnss and search again the channel:
Quote:
su
Password:
sudo rfcomm release A (where A is the com port number given by the system in the example 0)
sdptool browse XX:XX:XX:XX:XX:XX
Browsing XX:XX:XX:XX:XX:XX ...
...
...
Service Name: SPP slave
Service RecHandle: 0x10011
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: DD <-----Important
Profile Descriptor List:
"Serial Port" (0x1101)
Version: 0x0102
rfcomm bind "Name of your mobile" XX:XX:XX:XX:XX:XX DD
exit
exit
rfcomm
rfcomm0: XX:XX:XX:XX:XX:XX channel DD config [tty-attached]
rfcomm1: YY:YY:YY:YY:YY:YY channel 1 config [tty-attached]
|
after that if you did it correctly in OpenCPN of define the com port you'll have to do only once, unless you have connected other things, and the com port would be occupied.
__________________
Corsair
Roses don't bloom on the sailor's grave
|
|
|
20-11-2024, 13:45
|
#12
|
Registered User
Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 20,969
|
Re: Sending smartphone gps signal to openplotter
Why is this so complex ?
I just push an app button on my smartphone or tablet and it sends gps data to any device.
Why people make things complex is kinda beyond me.
BT is a very bad choice anyways. It tends to switch off at any time and in many cases the other device does not know the data is old. assuming instaed the device is not moving.
Wifi is a much better way to do this. The low side is that most devices are not capable of using more than 1 wifi connection at once. With BT, even the primitive old one, there could be at least 3 connections done at once. So a better choice if you want e.g. gps and then also say wind and hdm.
b.
|
|
|
20-11-2024, 14:27
|
#13
|
Moderator
Join Date: Feb 2010
Location: Australia
Posts: 3,841
|
Re: Sending smartphone gps signal to openplotter
I just bought a new Xaomi phone, it uses 4 different navigation constellations, Beidou, Glonass, Galileo and NAVIC and I was mulling over exactly this connection question. The phone has its own terrestrial navigation app ( HERE WeGo) but only uses those 4 constellations (actually only 3, NAVIC seems to be absent outside SE Asia). It raises a few problems with my apps that require an embedded US Gps position for purchasing, video streaming and notably my toll road app (LINKTGO), it reverted to number plate recognition and now takes 3 days to bill me. The new phone position accuracy is way beyond anything I require at sea and I can only manually lift a lat and long from the screen to plot a position in the event that my plotter dies.
|
|
|
20-11-2024, 15:34
|
#14
|
Registered User
Join Date: Sep 2023
Location: Cruising
Posts: 493
|
Re: Sending smartphone gps signal to openplotter
Used the phone before with sending nmea over wifi just to see it work, but as a GPS receiver costs €2.70 off ali express seems a long way round
(ublox7 USB receiver, been turned on for several years constantly now, works fine)
|
|
|
25-11-2024, 14:28
|
#15
|
Junior Cruiser
Join Date: Jan 2022
Location: Frigid Lake Michigan, USA
Boat: '88 C36 mk1-tr
Posts: 6
|
Re: Sending smartphone gps signal to openplotter
AWESOME feedback! and thank you so much...
I got trapped down a rabbit-hole trying to flash an 8266 with sensESP as a wifi i2c hub for my SK server. it is essentially my first coding project since the mid-90s early 2ks... so, having to reinstall VScode and everything that goes with that, then PlatformIO, git, etc etc etc. climbing learning curves that approached nearly vertical slopes, and remembering stuff long forgotten...i actually lost focus on this part of my bench project! I did find a handy little simulator; "SKsim" by Panazzolo that satisfied this itch (for now) and with it i'm currently sailing around (and through) south Australia (i think i ran over a joey not paying attention to my course and speeds!).
I will try some of your suggestions, if for no other reason, just for the great experience they promise... will report out so you know your efforts were appreciated! however, as i found out with my 76+hour VSC/SensESP rabbit hole, i'm leaning towards @barcoMeCasa's suggestion and i'll just open up my wallet! it turns out the 8266 hasn't been supported in SensESP since v1 and so i'm placing an order for a couple ESP32s. I'll add a ublox7, or something similar, to that order i guess...
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|
|