• 3
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

My server runs Ubuntu 14.04.1. I created udev rules in /etc/udev/rules.d/09-pps.rules to get GPS with PPS support work.

KERNEL=="ttyS0", SYMLINK+="gps0", MODE="0666"
KERNEL=="ttyS0", RUN+="/bin/setserial -q /dev/%k low_latency"
KERNEL=="ttyS0", RUN+="/usr/sbin/ldattach pps /dev/%k"

/dev/pps0 will appear at startup. All right. If I check _low_latency_ flag it looks like

$ sudo setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test

$ sudo setserial /dev/ttyS0 low_latency
$ sudo setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test low_latency

Why is low_latency always missing after startup?

I use the following:

KERNEL=="ttyS0", RUN+="/bin/setserial /dev/ttyS0 low_latency"
KERNEL=="ttyS0", SYMLINK+="gps0", RUN+="/usr/sbin/ldattach pps /dev/ttyS0"
KERNEL=="pps0", OWNER="root", GROUP="dialout", MODE="0660", SYMLINK+="gpspps0"

Did you test your udev rule with udevadm:?

 # udevadm  test  /sys/class/tty/ttyS0

Update

Your setserial configuration might be a problem. Check the configuration of setserial:

 # dpkg-reconfigure -p low setserial

I selected "autosave always." Try "autosave always" and then verify the low_latency setting before rebooting. If that does not work try selecting "kernel" when you do the dpkg-reconfigure

You can verify that things match up by investigating /var/lib/setserial.

When I reboot setserial says:

 # setserial -G /dev/ttyS0
 /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test low_latency

Which matches what is found in /var/lib/setserial

 # cat /var/lib/setserial/autoserial.conf |grep -v ^\#
 /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test low_latency

NB: Sometimes the entry in setserial will say 8250 instead of 16550A. I do not know why this happens on some machines but it has never been an issue for me when they differ.

  • 1
Reply Report
      • 2
    • Thanks for the test hint. There was no error in the test. ldattach was executed successful. I switched to your version but still no low_latency after startup. Which priority (filename) do you have?
    • Yes this works with my servers. I have added one more thing to my answer you should check. If this answer is helpful please mark it as accepted.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags