Welcome, Guest
Username: Password: Remember me
20 Aug 2017
INDI development team is happy to announce the release of INDI Library v1.5.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers.
Read More...

TOPIC: How to use smartphone GPS with INDI-GPSD

How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19272

I've been using my phone as a GPS source for my raspberry pi. It's not particularly difficult, but to use it to synchronize the clock requires additional work and scripting.
But just as a GPSD source, first install an app on your phone such as 'Share GPS' (Android). And configure it to send NMEA data as a TCP/IP host server. In Share GPS, in the connections pane, tap what you've configured to set it to listening. Connect to WiFi and determine your phone's IP on the network.

On your system side modify the GPSD configuration file /etc/default/gpsd
# Default settings for the gpsd init script and the hotplug wrapper.

# Start the gpsd daemon automatically at boot time
START_DAEMON="true"

# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="false"

# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
# Device IP and Port below
DEVICES="tcp://**.**.*.***:20175"

# Other options you want to pass to gpsd
GPSD_OPTIONS="-b -n"

To test open the terminal and enter
cgps -s
or
xgps
Install those with GPSD if necessary.
The following user(s) said Thank You: knro, Kaczorek, T-Studio, maudy, tkottary

Please Log in or Create an account to join the conversation.

Last Edit: by Ihoujin.

How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19278

  • maudy
  • maudy's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 323
  • Karma: 2
  • Thank you received: 23
Your steps worked great on the iPhone and my RPI3:



1. sudo apt-get install gpsd gpsd-clients
2. sudo nano /lib/systemd/system/gpsd.service

replace the ExecStart with: ExecStart=/usr/sbin/gpsd -N -b -n tcp://X.X.X.XX:XXXXXX
where x.x.x.x = the iPhone's IP address on the same wifi as RPI3
and XXXXX = the port assigned to the gps service.

3. sudo systemctl daemon-reload
4. sudo reboot
5. once on RPI3 again: systemctl status gpsd.service

Confirm running cgps -s

5. add the GPSD driver to the Auxiliary in INDI

6. On the iPhone this app worked for me: itunes.apple.com/us/app/nmea-gps/id590868529?mt=8

If you find a better app on the iPhone let me know.

Cheers!
The following user(s) said Thank You: T-Studio

Please Log in or Create an account to join the conversation.

How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19285

Thank you for your reply.
The script I used was posted on the following site.

spench.net/drupal/software/iphone-gps


I will also try the application you taught.

Please Log in or Create an account to join the conversation.

How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19286

Thank you for your reply.
The script I used was posted on the following site.

spench.net/drupal/software/iphone-gps

I will also try the application you taught.

Please Log in or Create an account to join the conversation.

Re:How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19298

  • maudy
  • maudy's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 323
  • Karma: 2
  • Thank you received: 23
I tried the script. Although I could get the the page served, it would not find my iPhone. This is why I used the iOS app instead of the script.

Just curious, does the script work for you?


Sent from my iPhone using Tapatalk Pro

Please Log in or Create an account to join the conversation.

Re:How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19303

Thank you for your reply.
Apparently it seems that virtual sockets such as /dev/tty/pts/1 can not be handled except GPSMON.
gpsmon /tty/pts/1

Please Log in or Create an account to join the conversation.

Re:How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19304

It is displayed in GPSMON with the above setting.

Please Log in or Create an account to join the conversation.

How to use smartphone GPS with INDI-GPSD 2 months 2 weeks ago #19305

I tried the presented app.

I was checking the wireless LAN function of RaspberryPi 3, but in my environment I used RaspberryPi 3 with wireless AP, so each application, RaspberryPi 3 was recognized as a server and could not communicate.
In order to eliminate the reason why the application did not work, it seems necessary to set the wireless LAN of RaspberryPi 3 to client mode.

Please Log in or Create an account to join the conversation.

How to use smartphone GPS with INDI-GPSD 2 months 1 week ago #19595

Dear Ilhoujin,

Thanks for sharing the instructions, it is working as described!

Now what I am wondering, the moment I can see the gps coordinates in Ekos, is there anything else to be done in KStars? I checked what is maintained in KStars for my location, and it deviates (see screenshot). Maybe it does not matter?

Best, Helge
Attachments:

Please Log in or Create an account to join the conversation.

How to use smartphone GPS with INDI-GPSD 2 months 1 week ago #19597

KStars does not call upon a GPSD to set the geographic location. According to Jasem this is because it would be difficult to implement cross platform.
Something I asked about a while ago Here .

What you can do with GPSD is use it with the mount module, which I believe will improve pointing. And on an entirely separate use outside of KStars, it is possible to set the system clock with it, which is what I use it for because Raspberry Pi will not keep time when not powered.

Please Log in or Create an account to join the conversation.

How to use smartphone GPS with INDI-GPSD 2 months 1 week ago #19598

  • maudy
  • maudy's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 323
  • Karma: 2
  • Thank you received: 23
You can set Kstars to update the device with time and location. Still testing whether the GPS can be used to update the mount and then the mount is used to update KStars.

Please Log in or Create an account to join the conversation.

How to use smartphone GPS with INDI-GPSD 1 month 1 day ago #20388

Thank you maudy, your instructions worked as described!

Please Log in or Create an account to join the conversation.

Time to create page: 0.217 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica