×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

How to use smartphone GPS with INDI-GPSD

  • Posts: 447
  • Thank you received: 30
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.
6 years 6 months ago #19286

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

  • Posts: 333
  • Thank you received: 24
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
6 years 6 months ago #19298

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

  • Posts: 447
  • Thank you received: 30
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
6 years 6 months ago #19303

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

  • Posts: 447
  • Thank you received: 30
It is displayed in GPSMON with the above setting.
6 years 6 months ago #19304

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

  • Posts: 447
  • Thank you received: 30
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.
6 years 6 months ago #19305

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

  • Posts: 281
  • Thank you received: 29
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
6 years 6 months ago #19595
Attachments:

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

  • Posts: 1309
  • Thank you received: 226
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.
6 years 6 months ago #19597

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

  • Posts: 333
  • Thank you received: 24
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.
6 years 6 months ago #19598

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

  • Posts: 2876
  • Thank you received: 809
Thank you maudy, your instructions worked as described!
6 years 5 months ago #20388

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

  • Posts: 2876
  • Thank you received: 809
I think a number of users could benefit from this method. However, I think it would be cumbersome out in an observing field at a star party to edit /lib/systemd/system/gpsd.service every time with your iPhone's new IP address. Is there perhaps an easier way to edit this? Maybe we could modify the indi driver to do it as an option?
6 years 5 months ago #20389

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

  • Posts: 2876
  • Thank you received: 809
I thought I would look into the problem of starting the gpsd program pointing to the correct phone IP address without having to edit the configuration file every time. There doesn't seem to be a way to change the IP & Port that the gpsd program is looking at except when you start it up (unless I missed something). Also you cannot start it from the command line if you have the service running because the service automatically starts and hogs the port. So I played around with it for a bit and I found that if you disabled the service, then you could start the gpsd program from the command line using the same command maudy used without having to edit the file or even use sudo. Since this seems to work, potentially we could use this in a software program like KStars or INDI to do it programmatically.

This procedure is similar to maudy's, but requires fewer steps and I don't think the stop or daemon-reload steps I listed here are even needed either. So possibly this setup procedure is 3 steps long.

1. sudo apt-get install gpsd gpsd-clients
sudo systemctl stop gpsd.socket (might not be needed)
2. sudo systemctl disable gpsd.socket
sudo systemctl daemon-reload (might not be needed)
3. sudo shutdown -r now

Once these steps are done, anytime you start up your raspberry pi, and want to have the GPSD driver working from your iPhone to give KStars a GPS position. Just follow these steps before pressing "Start INDI" in the client KStars program.

1. Get your iPhone on the same wifi network and find out its IP address
2. Start up the program NMEAGps that maudy recommended.
3. Set it to active and get the number for the port.
4. Run this command on the Pi: /usr/sbin/gpsd -b -n tcp://X.X.X.XX:XXXXXX
And just like maudy's post:
x.x.x.x = the iPhone's IP address on the same wifi as RPI3
and XXXXX = the port assigned to the gps service.

If you want to stop gpsd, or need to change the port or IP address, you can use killall gpsd. But be warned, if KStars is connected as a client when you do this, it won't like it. I would disconnect the devices and "Stop INDI" in the client first just in case.

Let me know what you think. Thanks!
6 years 5 months ago #20393

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

  • Posts: 333
  • Thank you received: 24
Hi,
Sorry for late reply. I have been out for a while.

I agree the IP managment is not nice. I have not dog into the solution. I use a hot spot to connect my RPI3 three and iPhone. I make the hot spot the same IP as my home network.

I hope this helps.

Cheers!
6 years 5 months ago #20394

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

Time to create page: 1.215 seconds