Open SfCal opened 4 months ago
Wanted to leave an update, switched over to a desktop system I had:
OS: Pop!_OS 22.04 LTS x86_64 Host: Z690 UD AX DDR4 Kernel: 6.8.0-76060800daily20240311-generic
I was able to get gpsd working, I was unable to use the command gpsd /dev/ttyS5
to set the device and had to instead edit it directly from /etc/default/gpsd
and restart the service.
Curiously, I am getting Could not find device ttySX
but each device appears to be working as expected. Will attempt BIOS update on NUC later.
[ 1.194851] pci 0000:06:00.0: [1d9b:0400] type 00 class 0x058000 PCIe Endpoint
[ 1.194878] pci 0000:06:00.0: BAR 0 [mem 0x42000000-0x43ffffff]
[ 1.194972] pci 0000:06:00.0: enabling Extended Tags
[ 1.254669] pci 0000:06:00.0: Adding to iommu group 19
[ 7.633255] ptp_ocp 0000:06:00.0: enabling device (0000 -> 0002)
[ 7.660873] 0000:06:00.0: ttyS4 at MMIO 0x42161000 (irq = 160, base_baud = 3125000) is a 16550A
[ 7.674818] 0000:06:00.0: ttyS5 at MMIO 0x42171000 (irq = 161, base_baud = 3125000) is a 16550A
[ 7.678954] 0000:06:00.0: ttyS6 at MMIO 0x42181000 (irq = 162, base_baud = 3125000) is a 16550A
[ 7.680243] 0000:06:00.0: ttyS7 at MMIO 0x42191000 (irq = 167, base_baud = 3125000) is a 16550A
[ 7.681502] ptp_ocp 0000:06:00.0: Could not find device ttyS4
[ 7.681504] ptp_ocp 0000:06:00.0: Could not find device ttyS5
[ 7.681504] ptp_ocp 0000:06:00.0: Could not find device ttyS6
[ 7.681505] ptp_ocp 0000:06:00.0: Could not find device ttyS7
[ 7.681522] ptp_ocp 0000:06:00.0: Version 1.2.0, clock PPS, device ptp0
[ 7.681533] ptp_ocp 0000:06:00.0: Time: 1712200239.97249309, in-sync
[ 7.681534] ptp_ocp 0000:06:00.0: GNSS: /dev/ttyS4 @ 115200
[ 7.681535] ptp_ocp 0000:06:00.0: GNSS2: /dev/ttyS5 @ 115200
[ 7.681535] ptp_ocp 0000:06:00.0: MAC: /dev/ttyS6 @ 57600
[ 7.681539] ptp_ocp 0000:06:00.0: NMEA: /dev/ttyS7 @ 115200
Switched to the newly released Ubuntu 24.04 for some more testing.
Worked the same as Pop_OS but decided to recompile the kernel anyway in case. The only kernel parameter that wasn't already set correctly as defined by the install guide was CONFIG_IKCONFIG=y
and CONFIG_DEBUG_INFO_BTF=n
however this didn't seem to change anything.
After updating the card firmware to v27 this is what I'm getting.
[ 2.331098] ptp_ocp: module verification failed: signature and/or required key missing - tainting kernel
[ 2.332021] ptp_ocp 0000:02:00.0: enabling device (0000 -> 0002)
[ 2.332598] ptp_ocp 0000:02:00.0: MSI/MSI-X info: 32
[ 2.341284] ptp_ocp 0000:02:00.0: Could not find device ttyS6
[ 2.341738] ptp_ocp 0000:02:00.0: Could not find device ttyS7
[ 2.341739] ptp_ocp 0000:02:00.0: Could not find device ttyS8
[ 2.341740] ptp_ocp 0000:02:00.0: Could not find device ttyS9
[ 2.341812] ptp_ocp 0000:02:00.0: Version 1.2.0, clock PPS, device ptp3
[ 2.342764] ptp_ocp 0000:02:00.0: Time: 1715354082.175616378, in-sync
[ 2.342765] ptp_ocp 0000:02:00.0: GNSS: /dev/ttyS6 @ 115200
[ 2.342787] ptp_ocp 0000:02:00.0: GNSS2: /dev/ttyS7 @ 115200
[ 2.342788] ptp_ocp 0000:02:00.0: MAC: /dev/ttyS8 @ 57600
[ 2.342791] ptp_ocp 0000:02:00.0: NMEA: /dev/ttyS9 @ 9600
You'll have to forgive me here as I'm not super familiar with device drivers.
"Could not find device ttySX is located in ptp_ocp_link_child()
which itself calls device_find_child_by_name()
.
Here's where we see an issue. Printing child devices does not seem to return any of the ttySX's. What is the expected output here?
Here is what I modified in ptp_ocp.c and the corresponding dmesg output.
[ 0.436299] pci 0000:02:00.0: [1d9b:0400] type 00 class 0x058000 PCIe Endpoint
[ 0.436323] pci 0000:02:00.0: BAR 0 [mem 0x90000000-0x91ffffff]
[ 0.536194] pci 0000:02:00.0: Adding to iommu group 2
[ 3.178399] ptp_ocp: loading out-of-tree module taints kernel.
[ 3.178403] ptp_ocp: module verification failed: signature and/or required key missing - tainting kernel
[ 3.179012] ptp_ocp 0000:02:00.0: enabling device (0000 -> 0002)
[ 3.179298] ptp_ocp 0000:02:00.0: MSI/MSI-X info: 32
[ 3.179584] 0000:02:00.0: ttyS6 at MMIO 0x90161000 (irq = 188, base_baud = 3125000) is a 16550A
[ 3.181108] 0000:02:00.0: ttyS7 at MMIO 0x90171000 (irq = 189, base_baud = 3125000) is a 16550A
[ 3.182604] 0000:02:00.0: ttyS0 at MMIO 0x90181000 (irq = 190, base_baud = 3125000) is a 16550A
[ 3.184083] 0000:02:00.0: ttyS1 at MMIO 0x90191000 (irq = 195, base_baud = 3125000) is a 16550A
[ 3.185766] Parent device name: 0000:02:00.0
[ 3.185768] Child device found: ocp0
[ 3.185769] Child device found: xiic-i2c.2048
[ 3.185770] Child device found: 0000:02:00.0:0
[ 3.185772] Child device found: xilinx_spi.1024
[ 3.185773] Child device found: ptp3
[ 3.185775] ptp_ocp 0000:02:00.0: Could not find device ttyS6
[ 3.185778] Parent device name: 0000:02:00.0
[ 3.185779] Child device found: ocp0
[ 3.185780] Child device found: xiic-i2c.2048
[ 3.185782] Child device found: 0000:02:00.0:0
[ 3.185783] Child device found: xilinx_spi.1024
[ 3.185784] Child device found: ptp3
[ 3.185786] ptp_ocp 0000:02:00.0: Could not find device ttyS7
[ 3.185788] Parent device name: 0000:02:00.0
[ 3.185789] Child device found: ocp0
[ 3.185790] Child device found: xiic-i2c.2048
[ 3.185792] Child device found: 0000:02:00.0:0
[ 3.185793] Child device found: xilinx_spi.1024
[ 3.185794] Child device found: ptp3
[ 3.185795] ptp_ocp 0000:02:00.0: Could not find device ttyS0
[ 3.185797] Parent device name: 0000:02:00.0
[ 3.185798] Child device found: ocp0
[ 3.185800] Child device found: xiic-i2c.2048
[ 3.185801] Child device found: 0000:02:00.0:0
[ 3.185802] Child device found: xilinx_spi.1024
[ 3.185803] Child device found: ptp3
[ 3.185805] ptp_ocp 0000:02:00.0: Could not find device ttyS1
[ 3.185807] Parent device name: 0000:02:00.0
[ 3.185808] Child device found: ocp0
[ 3.185810] Child device found: xiic-i2c.2048
[ 3.185811] Child device found: 0000:02:00.0:0
[ 3.185812] Child device found: xilinx_spi.1024
[ 3.185813] Child device found: ptp3
[ 3.185857] ptp_ocp 0000:02:00.0: Version 1.2.0, clock PPS, device ptp3
[ 3.185869] ptp_ocp 0000:02:00.0: Time: 1718135008.201674902, in-sync
[ 3.185875] ptp_ocp 0000:02:00.0: GNSS: /dev/ttyS6 @ 115200
[ 3.185877] ptp_ocp 0000:02:00.0: GNSS2: /dev/ttyS7 @ 115200
[ 3.185877] ptp_ocp 0000:02:00.0: MAC: /dev/ttyS0 @ 57600
[ 3.185881] ptp_ocp 0000:02:00.0: NMEA: /dev/ttyS1 @ 9600
static int
print_child_device(struct device *dev, void *data)
{
pr_info("Child device found: %s\n", dev_name(dev));
return 0;
}
static void
ptp_ocp_link_child(struct ptp_ocp *bp, const char *name, const char *link)
{
struct device *dev, *child;
dev = &bp->pdev->dev;
//-------------------------------------
if (!dev) {
pr_err("Parent device is NULL\n");
return;
}
pr_info("Parent device name: %s\n", dev_name(dev));
device_for_each_child(dev, NULL, print_child_device);
//---------------------------------------
child = device_find_child_by_name(dev, name);
if (!child) {
dev_err(dev, "Could not find device %s\n", name);
return;
}
Additionally, here are the kernel cmdline options.
sfcal@timelord:~/Time-Appliance-Project$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-6.8.9 root=/dev/mapper/ubuntu--vg-ubuntu--lv ro 8250.nr_uarts=8
The changes introduced in kernel 6.8 made it impossible to find child tty device as we did before. The changes to the upstream driver are currently under review. In meanwhile you can use Out-Of-Tree driver.
I'm experiencing issues as I'm following along the Time Card installation and usage guide.
OS: Ubuntu 22.04.4 LTS x86_64 Host: NUC9VXQNX K47173-402 Kernel: 5.15.0-101-generic
Being on Ubuntu 22.04.4 I went straight to step 11 and made sure the driver was up to date.
I'm a bit concerned about missing NMEA in dmesg here
Here's the output from cgps
I didn't feel confident that I understood how to use gpsd correctly so I also confirmed with pygpsclient below. I am getting data from ttyS5 and it seems correct.
I purchased the Time Card from Makerfab and used a NUC 9 Pro because it was within the supported systems list. I didn't see any recommendation for a specific GPS receiver so I found a generic one on amazon this one specifically. It is outside so it has LOS to the sky. Curious what I may be missing here.