No communication over USB serial gadget 2022-04-04 P5 32-bit bullseye image

68 views
Skip to first unread message

Tony Brack

unread,
Feb 28, 2023, 2:27:36 AM2/28/23
to ClusterHAT
Greetings All,


I have burned a number of these now and am getting nowhere trying to troubleshoot it. I am trying to get a serial console to work over USB using the P5 image. To keep things simple, I am using cbridge with a DHCP defined IP address and the USB ethernet emulation is working just fine (in all cases).

1. connect the USB port to a PC with a dongle and all 3 devices show up. Networking works but the serial ports are as dead as a doornail.

2. take the same PI and dongle and plug it into a working ClusterCTRL controller in bridged mode and networking works just fine, and the serial ports both appear but are again dead as a doornail.


bracka@p5:~ $ hostnamectl
   Static hostname: p5
         Icon name: computer
        Machine ID: 0ed1fdf57b6049e5ae59710f145398df
           Boot ID: e6f78a56c34840ef9c8a02f0c386eab5
  Operating System: Raspbian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.15.32+
      Architecture: arm


bracka@cerberus:/dev $ ls -al /dev/ttypi5*
lrwxrwxrwx 1 root root 7 Feb 28 01:33 /dev/ttypi5 -> ttyACM7
lrwxrwxrwx 1 root root 7 Feb 28 01:33 /dev/ttypi5a -> ttyACM8

sudo screen /dev/ttypi5
( nada )


From the P5 side:
crw--w----   1 root   tty     204,  64 Feb 28 06:41 ttyAMA0
crw-rw----   1 root   dialout 238,   0 Feb 28 06:41 ttyGS0
crw-rw----   1 root   dialout 238,   1 Feb 28 06:41 ttyGS1


bracka@p5:~ $ ps -ef | grep -i tty
UID        PID  PPID  C STIME TTY          TIME CMD
root       412     1  0 07:14 tty1     00:00:00 /bin/login -f
root       414     1  0 07:14 ?        00:00:00 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 ttyAMA0 vt220
bracka     502   412  0 07:14 tty1     00:00:00 -bash
bracka     628   529  0 07:21 pts/0    00:00:00 grep --color=auto -i tty



Buster Px images do not seem to have this problem. This is consistent on every platform that I have tried. I have not yet attached the P5 Pi to a Mac. "apt update/upgrade" has no effect either. Multiple Pis and uSD cards, using both RPi imager 1.7.3 and etcher.

Tony

Chris Burton

unread,
Feb 28, 2023, 4:02:34 AM2/28/23
to ClusterHAT
Hi, 
bracka@p5:~ $ ps -ef | grep -i tty
UID        PID  PPID  C STIME TTY          TIME CMD
root       412     1  0 07:14 tty1     00:00:00 /bin/login -f
root       414     1  0 07:14 ?        00:00:00 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 ttyAMA0 vt220
bracka     502   412  0 07:14 tty1     00:00:00 -bash
bracka     628   529  0 07:21 pts/0    00:00:00 grep --color=auto -i tty

There should be an agetty running on P5 for ttyGS0, what happens if you try to enable/start it?

sudo systemctl enable --now serial-getty@ttyGS0

Chris.

Tony Brack

unread,
Feb 28, 2023, 6:31:11 AM2/28/23
to ClusterHAT
Hi Chris,

Yes, that is what was missing:

bracka@p5:~ $ sudo systemctl enable --now serial-getty@ttyGS0
Created symlink /etc/systemd/system/getty.target.wants/serial...@ttyGS0.service ? /lib/systemd/system/serial-getty@.service.

bracka@p5:~ $ ps -ef | grep tty | grep root

root       412     1  0 07:14 tty1     00:00:00 /bin/login -f
root       414     1  0 07:14 ?        00:00:00 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 ttyAMA0 vt220
root      2851     1  0 10:30 ttyGS0   00:00:01 /bin/login -p --
-- -- --
bracka@cerberus:~ $ sudo screen /dev/ttypi5
Password:

Login incorrect
p5 login: bracka
Password:
Linux p5 5.15.32+ #1538 Thu Mar 31 19:37:58 BST 2022 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 28 10:30:27 GMT 2023 from 192.168.1.172 on pts/0
bracka@p5:~$


Thanks, that resolves the issue and clarifies things. It seems the older versions had this enabled out of the box. This answers my question, ... now I just need to redirect console output there appropriately so conserver can capture it. I think I've found that documentation.

Incidentally, from buster out of the box:

bracka@p3:~$ ps -ef | grep -i tty | grep root

UID        PID  PPID  C STIME TTY          TIME CMD
root       643     1  0 Feb26 tty1     00:00:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root       655     1  0 Feb26 ttyS0    00:00:00 /sbin/agetty -o -p -- \u --keep-baud 115200,38400,9600 ttyS0 linux
root      4716     1  0 Feb26 ttyGS0   00:00:00 /bin/login -p --


Curious why you set up 2 serial devices ... ? (unrelated)

Thanks again,
Tony
Reply all
Reply to author
Forward
0 new messages