Kernel 5.0 Serial now seems to be on TTYS0

BeningFunBeningFun New Member Posts: 5

The latest kernel appears to set the serial port on TTYS0, S4 returns permission denied unless I use sudo.

$ sudo setserial -g /dev/ttyS[01234]
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
/dev/ttyS4, UART: 16550A, Port: 0x0000, IRQ: 39

I've got a loop back on pin 8,10 and no longer have a working serial port.

Suggestions?

Tagged:

Comments

  • BeningFunBeningFun New Member Posts: 5

    Neither /dev/ttyS0 or /dev/ttyS4 allows serial data

    Have added myself to tty group since:

    ls -l /dev/ttyS[04]
    crw-rw-rw- 1 root dialout 4, 64 Jun 25 11:36 /dev/ttyS0
    crw--w---- 1 root tty 4, 68 Jun 25 11:36 /dev/ttyS4

    Note that even if I chmod 666 /dev/ttyS4 it works for one test (that shows no serial data), then reverts to these permissions and denies access to /dev/ttyS4

    Further info: dmesg | egrep -i 'serial|ttys'
    [ 2.276992] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
    [ 2.297537] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
    [ 2.454883] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 2.454895] usb usb1: SerialNumber: 0000:00:14.0
    [ 2.456452] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 2.456462] usb usb2: SerialNumber: 0000:00:14.0
    [ 2.815964] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 2.815973] usb 2-1: SerialNumber: 816513020192
    [ 3.098224] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 3.379412] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 3.777892] usb 1-7.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 3.777900] usb 1-7.2: SerialNumber: 1.0
    [ 3.959649] usb 1-7.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    [ 7.167551] 8086228A:00: ttyS4 at MMIO 0xa171b000 (irq = 39, base_baud = 2764800) is a 16550A

    How do I configure a working UART on this with the latest Kernel 5.0?

  • BeningFunBeningFun New Member Posts: 5

    I believe this shows the console is still enabled.

    dmesg | grep tty
    [ 0.223388] printk: console [tty0] enabled
    [ 2.287260] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
    [ 2.615205] tty ttyS21: hash matches
    [ 7.289724] 8086228A:00: ttyS4 at MMIO 0xa171b000 (irq = 39, base_baud = 2764800) is a 16550A

    How do I disable the console if that's correct?

  • DCleriDCleri Administrator, AAEON Posts: 993 admin

    sudo systemctl disable [email protected]

    (or ttyS4) and then reboot

    I am not sure what you are experiencing is due to the presence of a serial terminal.
    We are currently investigating the issue with the new kernel

  • BeningFunBeningFun New Member Posts: 5

    You were correct, console on/off made little difference. Let me know if there's any further diagnostics I can run to help isolate this.

    I'm stuck here until I get serial working.

  • DCleriDCleri Administrator, AAEON Posts: 993 admin

    You can try to make a simple loopback test and use minicom to read/write characters


    “Serial Port Debugging 101 : Loopback Test” by Amita https://link.medium.com/J27kjJpCO7

  • BeningFunBeningFun New Member Posts: 5

    That's where I began this post, with loopback in place. Minicom on ttyS0 and ttyS4, no characters. Python script to test serial, no characters. Motor controller python script can't communicate on serial (either ttyS0, ttyS4, serial0, or serial1)

Sign In or Register to comment.