PPS signal from Adafruit GPS unusable by gpsd / ppscheck?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
bkloppenborg
 
Posts: 2
Joined: Tue Sep 05, 2023 10:38 pm

PPS signal from Adafruit GPS unusable by gpsd / ppscheck?

Post by bkloppenborg »

I recently purchased the Adafruit Ultimate GPS GNSS with USB - 99 channel w/10 Hz updates (product 4279 April 2023 revision) hoping that it could be used as a ~0.1 ms accurate time source for the computer that I use to operate my mobile telescope setup. Unfortunately, neither `gpsd` or `ppscheck` are able to use the PPS signal on the Ring Indicator (RI) pin. The error I receive is as follows:

Code: Select all

sudo ppscheck /dev/ttyUSB0 
# Seconds  nanoSecs   Signals
PPS ioctl(TIOCMIWAIT) failed: 25 Inappropriate ioctl for device
The best I can tell, the cp210x driver on Linux doesn't implement the ioctl functions [1] as the `usb_serial_driver.ioctl` function pointer is never populated in the `usb_serial_driver` struct. I find this a bit odd because the CP2102N data sheet [2] states that "All handshaking and modem interface signals" are supported. Does anyone know if this is the case?

While researching this problem, I also uncovered a thread [3] by bjmcculloch indicating that a previous version of the Adafruit Ultimate GPS that used the CP2104 adapter had a similar problem and that there may be an underlying hardware restriction. This is to be contrasted with a new driver I found on GitHub [4] which specifically implements ioctl functions to support PPS signals. Unfortunately, that is for an older kernel.

I'd be interested to know if anyone has gotten this device to work with PPS on `gpsd` and `ppscheck`.

[1] ioctl functions missing from cp210x driver https://github.com/torvalds/linux/blob/ ... l/cp210x.c
[2] cp2102N data sheet https://www.mouser.com/datasheet/2/368/ ... 634912.pdf
[3] cp210x hardware might not support underlying ioctl commands viewtopic.php?p=832544&hilit=Ultimate+GPS+USB+C+pps
[4] Revised cp210x driver https://github.com/fortian/cp210x/tree/master

User avatar
bkloppenborg
 
Posts: 2
Joined: Tue Sep 05, 2023 10:38 pm

Re: PPS signal from Adafruit GPS unusable by gpsd / ppscheck?

Post by bkloppenborg »

I spent some time investigating this issue further and ended up writing up a blog post on the subject. At the moment, it appears as if GPSD won't be able to use the PPS signal on the Ring Indicator pin because the underlying device driver doesn't expose the right interfaces. To make it work, I believe the driver needs to implement both the usb_serial_driver.tiocmiwait function and usb_serial_driver.process_read_urb. While I was able to figure out how to implement the first function, I have yet to figure out how to properly import the ladder. If anyone wants to pick up where I left off, my post describes how to modify the Silicon Labs driver, build it, and load it.

User avatar
millercommamatt
 
Posts: 720
Joined: Tue Jul 31, 2018 4:57 pm

Re: PPS signal from Adafruit GPS unusable by gpsd / ppscheck?

Post by millercommamatt »

I just want to say I'm impressed that you used footnotes in a forum post.

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”