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"