×

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

Bi-monthly release with minor bug fixes and improvements

Using GPS with Astroberry 2.0.0

  • Posts: 389
  • Thank you received: 15
Hello,

Yesterday, I spent some time looking at AB 2.0.1 and GPS Time. In my instance of AB 2.0.1, I found a real conflict between CHRONY and TIMEDATECTL. If I started one, the other would stop. Ok.

I looked at the configuration of TIMEDATECTL and the default CONF file is GPS ready. So, I can see why CHRONY is redundant. My plan is to remove CHRONY and seek a solution between TIMEDATECTL and GPSD. As it stands, my system is working as ttyACM. Raspbian picked ttyACM as the resultant solution to the u-blox-7 DYI GPS USB and AstroEQ.

I came to this solution as Raspbian took me there. I could not run two ACM devices at the same time. The AstroEQ and u-blox fought over ttyACM0. I originally looked at INDI-GPUSB thinking that these devices are USB. Nope. Raspbian is very persistent, ttyACM or nothing. I then used udevadm as the path to managing two ttyACM devices. Understanding udevadm first, was the good step. Using udevadm resolved the conflict.

The u-blox 7 was faster to the draw than the AstroEQ. I tried loading things sequentially. The u-blox was insistent. INDI server was the battleground. Using udevadm made INDI server happy and EKOS knowing location, time zone, and time.
The following user(s) said Thank You: Avocette
4 years 1 month ago #49061

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

  • Posts: 389
  • Thank you received: 15

Hello,

CHRONY is completely integrated in to AstroBerry Server. Removing CHRONY would destroy AstroBerry. This leaves the OS in a quandary. Right now, everything is working. Nothing needs to be done.
4 years 1 month ago #49070

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

  • Posts: 326
  • Thank you received: 50

If I recall correctly, chrony was added by Radek only on the latest update from 2.0.0 to 2.0.1.


Sorry I don’t understand - my GPS dongle works only in certain circumstances. After good luck and a helpful pattern of experiences last night, this morning KStars says Nofix. It is as if the GPS unit is not plugged in, yet gpsd and Indi-gpsd are running and gpsmon shows an excellent fix has been found. For me, there are a number of bugs to isolate and cure to make this work reliably.
Last edit: 4 years 1 month ago by Avocette. Reason: Clarity
4 years 1 month ago #49071

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

  • Posts: 983
  • Thank you received: 375
I'm not aware that timesync can get time from GPS. That's why I made Astroberry dependent on chrony in Astroberry 2.0.1.
What is proper configuration of timesync that supports GPS? If anybody got it working please share. I can easily come back to pure timesync and forget chrony.
4 years 1 month ago #49072

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

  • Posts: 389
  • Thank you received: 15
Hello,

I am looking into the GPS issues. I am seeing a n issue now. I have my GPS installed. I ran XGPS. I see two GPS devices, /dev/ttyACM0 and /tmp/vgps. A conflict exists between the two. Looks like VirtualGPS is running. It gives the default site for Warsaw, Poland. This is interfering with the device and INDI driver. I am disabling VirtualGPS.
4 years 1 month ago #49092

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

  • Posts: 389
  • Thank you received: 15
Hello,

I disabled VirtualGPS and that cleared up GPSD. INDI and GPSD are happy now.
4 years 1 month ago #49094

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

  • Posts: 389
  • Thank you received: 15

Hello Kaczorek,

Thank you for your work. The documentation I shared show its last example working with GPS.

I was looking at how to configure timedatectl when CHRONY stood in the way. I remember installing CHRONY myself. When I tried to remove it, I found AB 2.0.1 dependent on it.

I can stop CHRONY and start TIMEDATECTL to see if XGPS runs well. If so, then not much work. If not, then TIMEDATECTL is too dependent on NETWORK NTP. Getting it to be flexible would be the next step. A conditional serviced maybe in order.
4 years 1 month ago #49113

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

  • Posts: 983
  • Thank you received: 375
Hi AradoSKYindi, I looked at the link before posting. Example is not really helping bacause there is no actual configuration used for timedatectl to get data from GPS. It just shows "Reference: GPS"
All the sources I know say that timedatectl and timesync do not dupport GPS as a time source. Any specific advice and an example of working solution?
4 years 1 month ago #49117

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

  • Posts: 389
  • Thank you received: 15
Hello,

As I stated, I stopped CHRONY and started TIMEDATECTL and TIMESYNC. I then plugged my U-Blox 7 device in. It took awhile to link. Once it did, it worked.



The network is unplugged. The GPS is running. The key is using udevadm.

The service TIMESYNCD is tied to CHRONY. With CHRONY stopped, TIMESYNC fails to operate.
Last edit: 4 years 1 month ago by John Robison.
4 years 1 month ago #49125
Attachments:

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

  • Posts: 30
  • Thank you received: 3


I'm working with a gps_nmea indi driver, i set a smarthphone with netGPS (this app works as gps_nmea) and as you can see i see "gps udpate timer disabled"
What i can ceck?
4 years 1 month ago #49136
Attachments:

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

  • Posts: 326
  • Thank you received: 50
You can try setting the update timer to 60 seconds (R...h Periods pos). Or try clicking on the GPS button in the line above.
4 years 1 month ago #49144

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

  • Posts: 348
  • Thank you received: 69
So I've been having quite a few issues with GPSD.

I have a:

astroberry@indi:~ $ lsusb
...
Bus 001 Device 005: ID 1546:01a7 U-Blox AG [u-blox 7]
...

Often the server boots up and gpsmon just hangs at start, no output is received. I do see the following in the syslog:

Feb 7 11:11:50 indi ModemManager[361]: <info> [device /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.1/1
-1.2.1.1] creating modem with plugin 'u-blox' and '1' ports
Feb 7 11:11:50 indi ModemManager[361]: <warn> Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'
Feb 7 11:11:50 indi ModemManager[361]: <warn> Couldn't create modem for device '/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.
0/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1.1': Failed to find primary AT port

I've searched around and found reference to getting this device to be ignored by the ModemManager service, by creating a udev rules file, which I created, as follows:

ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a7", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a7", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a7", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a7", MODE:="0666"

After rebooting the problem persists, if I try to stop the gpsd service it hangs trying to stop, if I try to reboot, the server hangs trying to shutdown gpsd, only way to reboot is to repeatedly "killall -9 gpsd" until no gpsd process was running.

Now I know people have criticised me previously for disabling the DHCPCD service and leaving NetworkManager to do its thing (that is working great for me by the way), but I thought, I don't actually have a "modem" here, it's a GPS, and I don't know what the ModemManager service is actually set to do, but if I disable the ModemManager service completely I seem to be able to get the GPS up and running consistently after every reboot without having to try and kill off gpsd and restart it etc...

Is disabling the ModemManager service going to cause me an issue down the line (e.g. is it going to prevent me talking to my mount, which is effectively a USB Serial port? - Celestron CGX)?

Oh by the way, my /etc/default/gpsd looks like this:

START_DAEMON="true"
USBAUTO="false"
DEVICES="/dev/ttyACM0"
GPSD_OPTIONS="-n"
4 years 1 month ago #49151

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

Moderators: Radek Kaczorek
Time to create page: 2.686 seconds