GPS behaviour and issues in dietpi os

Hi all,

I am using USB GPS receivers in single board computers like Odroid-xu4 and Raspberry Pi 3 with different operating system.
The following are the behaviours observed:

1. Odroid-XU4 with globsat bu-353 S4 GPS Receiver:

In this board,I installed Dietpi OS v6.7 and kernel version is 3.10.106+. GPS receiver had a good fix and displayed all data in a right way. On the following day, it displayed a wrong data showing co-ordinates of sea. After a while it shows correct data. Generally, it often shows correct as well as wrong data. Baud rate of the GPS is 4800 baud

2. Odroid-XU4 with U-Blox AG USB GPS Receiver:

In this board too I installed Dietpi OS v6.7 and kernel version is 3.10.106+. Baud rate of GPS is 4800 baud. Here GPS showed correct data. After few days it displayed an error as follows:

gpsd[2124]: gpsd:ERROR: PPS ioctl(TIOCMIWAIT) failed: 25 Inappropriate ioctl 
for device

The full detail is as follows:

service gpsd status
gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/lib/systemd/system/gpsd.service; static)
Active: active (running) since Thu 2018-07-19 10:49:38 IST; 5min ago
Main PID: 2124 (gpsd)
CGroup: /system.slice/gpsd.service
       └─2124 /usr/sbin/gpsd -N -n -G -b /dev/ttyACM0

Jul 19 10:49:38 Busplay2 systemd[1]: Started GPS (Global Positioning System) 
Jul 19 10:49:39 Busplay2 gpsd[2124]: gpsd:ERROR: PPS ioctl(TIOCMIWAIT) 
failed: 25 Inappropriate ioctl for device

What is PPS ioctl? What’s the issue here?

3. Raspberry Pi3 with globsat bu-353 S4 GPS Receiver:

In this pi board, I installed Raspbian OS and kernel version is 4.14.50-V7+. I am using it for the three days with the GPS receiver. It displays data correctly. I neither getting any error (such as pps ioctl) nor any wrong data.Baud rate is 4800 baud.

4. Odroid-XU4 with globsat bu-353 S4 GPS receiver:

Here I installed Ubuntu mate OS and kernel version is 4.14.0-83. Similar to the above case (raspberry pi 3), I am not getting any error or any wrong data. Everything is going fine.Baud rate is 4800 baud.

So my question is why is GPS showing such a behaviour in Dietpi OS?

Do you have

# ls -l /dev/pps0 -l
    crw------- 1 root root 253, 0 Mar  7 11:14 /dev/pps0

also digging for “inappropriate ioctl for device”

Not sure if it’s trying to log to a file that isn’t there thus it fails?

Do you get output from

# ppstest /dev/pps0

If I understood the linked issue correctly, then this error occurs, if the output “file” exists, but is not terminal. The script in this case wants to print output to /dev/ttyACM0, maybe this does not exist or there is no terminal attached to it? Not sure.

On DietPi, if it’s about consoles (TTYs) by default we disable systemd-logind and serial consoles. But hmm, /dev/ttyACM0 is actually USB com port, which makes sense here with USB device.

By www searching “gpsd:ERROR: PPS ioctl(TIOCMIWAIT)” I find many many discussions with at least some debug hints, I see you already asked for your issue elsewhere as well. I cannot really find something that we change on DietPi from Raspbian, related to USB devices, besides max_usb_current=1 within config.txt. But this should not cause issues, it solves issues with USB devices, if they need more power than allowed by default on RPi.

I hope, someone with more knowledge about USB devices, specially GPS, and/or gpsd can help debugging. If there is some issue found with default DietPi setup, then we will apply a fix.

do a lsmod on the other distros that work…see what modules are loaded (drivers) then see if they are loaded on the diet
then see if you can do a modprobe to load that module