×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

GPSD virtual mode deconnect permanent ?

  • Posts: 145
  • Thank you received: 7
Hi,
I have got a lot of great help here to solve I problem I had with the setup of my equipment.

Now almost everything work, just the PHD2 auoguider problem which I get help with in another thread.

Now to the last problem to fix.

When I start Ekos it connect to my devices, the mount, a HEQ5 doesn't connect because the port is already busy. I disconnect my GPS and restart and then the mount connect. Then I connect the GPS and everything running. But after a while I noticed that the GPS isn't really connected, GPSD is still running in virtual mode.

I have give these commands earlier, and now do it again:
  • sudo systemctl stop gpsd
  • sudo systemctl disable gpsd
  • sudo systemctl enable gpsd
  • sudo systemctl start gpsd
Doesn't it remember that the virtual mode shall be diassembled, should I use some other command to let it be permanent ?
I have upgraded Astroberry to ver 2.0.4.

One more problem I solved with the GPS was to set it to NEMA mode, that looks to be stored permanent. I used the command (with help from a friend):
  • sudo stty -F /dev/ttyUSB1 4800
  • sudo gpsctl -n -D 4 /dev/ttyUSB1

There is also the problem that the GPS module change its USB port, it's normalu USB1 but sometimes it change to USB0, often when I have problem and need to restart the devices. Is there someway to prevent this to happening, fix USB adresses ?

/Lars
Last edit: 2 years 4 months ago by Lars.
2 years 4 months ago #78734

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

  • Posts: 348
  • Thank you received: 69
The devices are more easily configured by using the symlinks that you can find in:
/dev/serial/by-id
Identify each of the devices in there, and go into your INDI control panel. For each serial device manually set the port to the name in /dev/serial/by-id/XXXXX
That way your serial devices will always be correct and you will solve a lot of your problems.
If you are using a real GPS:
sudo systemctl disable virtualgps
sudo systemctl stop virtualgps
 
2 years 4 months ago #78746

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

  • Posts: 145
  • Thank you received: 7
Hi Giles,

I have a real old GPS and did the two commands that you suggested:

sudo systemctl disable virtualgps
sudo systemctl stop virtualgps

With this, is the virtual GPS always disabled even when I restart the Raspberry ?

I found the files:

 

The two last ones are connected to port0, that must be wrong, or ? But a little bit strange because it all works for the moment. Are these three files text files, I can't open them.

When I list the serial ports with this command

ls -l /dev/tty*

I get this:

 

The USB0 is the GPS
The USB1 is the HEQ5 mount

Sometimes they mix up and cause a lot of trouble.

I don't know how to use the information you gave to set the ports to fixed address, how do I proceed ?

Many great thanks for the help, I feel I'm almost there !

/Lars
 
2 years 4 months ago #78758
Attachments:

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

  • Posts: 348
  • Thank you received: 69
Writing this from my phone, so if this doesn't make sense, please wait until I edit it from my desktop.
regarding whether the systemctl disable command stops services from starting at reboot, then yes, that is exactly what that does.

With regard to the files in /dev - usually none of them are actually files. They are just pipes or sockets to hardware devices on your system.
When your system boots up, and starts to interact with devices attached to it, it does so sequenctially. So device A starts and is given USB0, then device B starts and is given USB1 - this process might not happen in the same order each time, but each device has an id which it reports to the system, thats where the /dev/serial/by-id/ folder comes in. It provides an interface to consistently report what device is on USB0 or USB1 etc... - so use that to configure the devices in INDI as it will be more consistent.
2 years 4 months ago #78759

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

  • Posts: 145
  • Thank you received: 7
I understand everything until this last:

"It provides an interface to consistently report what device is on USB0 or USB1 etc... - so use that to configure the devices in INDI as it will be more consistent. "

Do you mean this page for the mount ?

 

I have changed the ports here earlier, but I have a feeling that it changes by automatic sometimes.

The GPSD:

 

For this page I can't find anything about the ports. But what I know GPSD only communicate with some other devices that connect to the "real" GPS. But where to find that ?

Port setting:

 

I think this is something new, even the focuser has cuased me problem, but not for the moment. Is there a way to set its port permanently too ?

Sorry for all these questions, and it's almost Christmas, don't stress because of me

/Lars
2 years 4 months ago #78760
Attachments:

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

  • Posts: 348
  • Thank you received: 69
Once you have set the port to the /dev/serial/by-id/xxxxxx

Path and have everything working, go to the tab where you have the option to "Save" the configuration. (Options tab?).

Then it will happen every time.
2 years 4 months ago #78761

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

  • Posts: 348
  • Thank you received: 69
For gpsd the INDI gpsd only talks to gpsd itself, and not the device, gpsd itself talks to the devices defined in /etc/default/gpsd file.
2 years 4 months ago #78762

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

  • Posts: 145
  • Thank you received: 7
Hi Giles,

So if I understand now, when I restart the Raspberry it will connect to correct addresses even if some devices are unplugged at the start.

I found the GPSD setting:

 

That's a place that I already have changed, many times. Lets us hope it stays at USB0 port in the future.

Thanks again !

It will be very exiting nest time I startup the Raspberry. If it works I will save a lot of time every night.

Have a great Christmas !

/Lars
2 years 4 months ago #78763
Attachments:

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

  • Posts: 348
  • Thank you received: 69
OK, below:

giles@mini:~$ cd /dev/serial/by-id/
giles@mini:/dev/serial/by-id$ ls -l
total 0
lrwxrwxrwx 1 root root 13 Dec 22 11:42 usb-Pegasus_Astro_PPBADV_revA_PPBA5A62CR-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Dec 22 11:42 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_165288e1b2d6e8119141f7c147cc1306-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Dec 22 11:42 usb-u-blox_AG_-_www.u-blox.com_u-blox_7_-_GPS_GNSS_Receiver-if00 -> ../../ttyACM0


You can see that my GPS is currently mapped to /dev/ttyACM0, my PPBA is /dev/ttyUSB0, and my Sesto Senso 2 is mapped to /dev/USB1, but on the next time I reboot, it might be different, so I hard map my devices to the device descriptions within my indi config files:

giles@mini:/dev/serial/by-id$ cd ~/.indi
giles@mini:~/.indi$ grep "/serial" *
Celestron GPS_config.xml:/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0
Pegasus PPBA_config.xml:      /dev/serial/by-id/usb-Pegasus_Astro_PPBADV_revA_PPBA5A62CR-if00-port0
Sesto Senso 2_config.xml:      /dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_165288e1b2d6e8119141f7c147cc1306-if00-port0

This way, if on another reboot the PegasusAstro were mapped to ttyUSB1 rather than ttyUSB0, the configuration in /dev/serial/by-id will automatically redirect the driver to the correct port.

I don't know why screenshots don't work for me, ever since this new editor arrived on the forums I've had issues.
Last edit: 2 years 4 months ago by Giles.
2 years 4 months ago #78764

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

  • Posts: 348
  • Thank you received: 69
OK, I give up, the forums can no longer cope with my content.... :(
2 years 4 months ago #78765

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

  • Posts: 348
  • Thank you received: 69
I tried to post some screenshots, but they failed, I won't remove those, as the admins might work out how they failed, and restore them in the future.

Files in /dev are not strictly files, they are for use by the drivers that INDI uses, and other programs too.

Essentially:

Identify devices showing up in /dev/serial/by-id/
Enumerate those devices yourself, by a process of elimination, e.g. disconnect a device and look for which one disappears. reconnect it and it appears - you have the right device.
Configure each INDI driver that has a serial interface with the path /dev/serial/by-id/XxxXXXxxx

By hard coding that path you will avoid any conflict in detection of each of your devices, and ensure a stable start-up each time.
The following user(s) said Thank You: Lars
2 years 4 months ago #78766

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

  • Posts: 145
  • Thank you received: 7
Hi Giles,
Now I have used the Raspberry many nights. After your and some others tips i got it to start correct most times. When I don't get the correct USB addresses, mostly because I forget to power on the mount, I reboot one or maybe two times and then everything is up and workning.

Thanks a lot for all help !

/Lars
2 years 3 months ago #79160

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

Moderators: Radek Kaczorek
Time to create page: 1.100 seconds