×
INDI Library v1.8.7 Released (21 Nov 2020)

Nov. 2020 Release brings significant improvements to streaming and recording videos. Support for new drivers including Estatto focuser and Pegasus falcon rotator.

How to use smartphone GPS with INDI-GPSD

3 years 3 months ago
T-Studio
Gold Boarder
Gold Boarder
Posts: 364
Karma: 1
More
Topic Author
How to use smartphone GPS with INDI-GPSD #18981
I am using this Python script now and I would like to use smartphone GPS with INDI.

spench.net/drupal/software/iphone-gps

That's why I have a question.
How can I change the gpsd socket with the INDI-GPSD driver?

The gpsd socket that the Python script automatically generates is a special / dev / pts / 1, so I think that you can use it if you can read the GPSD socket.

Please let me know if you know the change of the GPSD socket using the INDI - GPSD driver.

Attachments:

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

3 years 3 months ago
Kaczorek
Moderator
Moderator
Posts: 966
Karma: 6
More
How to use smartphone GPS with INDI-GPSD #19040
You don't need to change anything in GPSD driver. It uses local gpsd server, which is connected to a gps receiver of your choice. Point your gpsd server to your device created by python script by editing /etc/default/gpsd - just set the proper value for DEVICES e.g. DEVICES="/dev/pts/1"
As I see in the python script, it starts its own instance of gpsd so it might be the case that you need to disable local gpsd server first, so the socket is available to python script. If this is the case GPSD driver will use gpsd instance started by python script.

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
The following user(s) said Thank You T-Studio

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

3 years 2 months ago
T-Studio
Gold Boarder
Gold Boarder
Posts: 364
Karma: 1
More
Topic Author
How to use smartphone GPS with INDI-GPSD #19133
Thank you for your reply.
Changing the / etc / default / GPSD setting did not work.
/ dev / PTS / 1 seems to function as a virtual driver.

Only gpsmon could connect.

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

3 years 2 months ago
T-Studio
Gold Boarder
Gold Boarder
Posts: 364
Karma: 1
More
Topic Author
How to use smartphone GPS with INDI-GPSD #19137
Translation went wrong.
I changed the GPSD setting file as follows, but unfortunately it did not work.

/ etc / default / gpsd

START_DAEMON = "true"
USBAUTO = "false"
DEVICES = "/ dev / pts / 1"
GPSD_OPTIONS = "- n"
GPSD_SOCKET = "/ var / run / gpsd.sock"

/ dev / pts / 1 seems to be handled as a virtual device.
Only gpsmon is sudo gpsmon / dev / pts / 1
GPS reading was possible.

I would like to know if there is a way to read virtual devices even with INDI gpsd.

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

3 years 2 months ago
Kaczorek
Moderator
Moderator
Posts: 966
Karma: 6
More
How to use smartphone GPS with INDI-GPSD #19138
What are the access rights to /dev/pts/1? Run ls -al /dev/pts/1 to check it out.

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

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

3 years 2 months ago
T-Studio
Gold Boarder
Gold Boarder
Posts: 364
Karma: 1
More
Topic Author
How to use smartphone GPS with INDI-GPSD #19141
It will be like this.
crw--w---- 1 astro tty 136, 1 9¥u6708 7 02:51 /dev/pts/1
When you run Python script, port is automatically set.

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

3 years 2 months ago
Kaczorek
Moderator
Moderator
Posts: 966
Karma: 6
More
How to use smartphone GPS with INDI-GPSD #19142
With these access rights the only user that has read access rights to the device is the user "astro". Run gpsmon from this user account and check if it works OK. If it's not run chmod 644 /dev/pts/1 and try again. If it works after changing the access rights it is access rights issue. What is the port number set by python script?

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

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

3 years 2 months ago
T-Studio
Gold Boarder
Gold Boarder
Posts: 364
Karma: 1
More
Topic Author
How to use smartphone GPS with INDI-GPSD #19183
I reacted to the wrong place. .
Thank you for your reply.
astro is the user name I am using. I am using port number 5000. It seems that you can not connect to INDIGPSD even if you try access. (I am connected to gpsmon)

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

3 years 2 months ago
T-Studio
Gold Boarder
Gold Boarder
Posts: 364
Karma: 1
More
Topic Author
How to use smartphone GPS with INDI-GPSD #19184
chmod 644 / dev / pts / 1
The setting has been changed.

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

3 years 2 months ago 3 years 2 months ago by Kaczorek.
Kaczorek
Moderator
Moderator
Posts: 966
Karma: 6
More
How to use smartphone GPS with INDI-GPSD #19187
Standard gpsd port is 2947 and standard gpsd socket is /var/run/gpsd.sock
If you're using anything else the driver won't work. It expects standard gpsd service available on the system. If you're emulating gpsd service from the python script make sure it mimics original gpsd values.

PS. I would rather aim at using /dev/pts /1 port to setup gpsd than emulating gpsd service. These are two different approaches. You need to try both of them anyway

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

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

3 years 2 months ago
T-Studio
Gold Boarder
Gold Boarder
Posts: 364
Karma: 1
More
Topic Author
How to use smartphone GPS with INDI-GPSD #19209
Thank you for your reply.
/ etc / default / gpsd
I also changed the configuration file, but unfortunately it does not seem to work.
START_DAEMON = "true"
GPSD_OPTION = "- n"
DEVICES = "/dev/tty/pts/1"
USBAUTO = "true"
GPSD_SOCKET = "/var/run /gpsd.sock"
Apparently it seems that virtual sockets such as /dev/tty/pts/1 can not be handled except GPSMON.

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

3 years 2 months ago 3 years 1 month ago by Ihoujin.
Ihoujin
Supernova Explorer
Supernova Explorer
Posts: 1009
Karma: 3
More
How to use smartphone GPS with INDI-GPSD #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.

INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Waveshare Stepper Motor Board - DIY Focuser
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
The following user(s) said Thank You knro, Kaczorek, T-Studio, maudy, tkottary, superlinux

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

Time to create page: 0.906 seconds