How to use the UART on the 40 Pin GPIO header for the cosole

Post Reply
frohro
Posts: 16
Joined: Mon Dec 22, 2014 9:05 am
languages_spoken: english
ODROIDs: Odroid C1
Has thanked: 0
Been thanked: 0
Contact:

How to use the UART on the 40 Pin GPIO header for the cosole

Unread post by frohro » Sat Dec 24, 2016 6:56 am

I accidentally burned out the regular console, and needed to upgrade, which is supposed to be dangerous using ssh, so I decided to see if I could use the UART on the 40 pin GPIO header. The pins are much easier to connect to for me than the non standard ones on my Odroid C1's regular console. I would have done this instead of using it if I had known how when I first needed the console, as I would not have had to make a special plug for the console.

The UART is connected to /dev/ttyS2.
1) Create a file called /etc/init/ttyS2.conf containing the following:

Code: Select all

# ttyS2 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[12345]
stop on runlevel [!12345]

respawn
exec /sbin/getty -L 115200 ttyS2 vt102
2) Ask upstart to start the getty

Code: Select all

sudo start ttyS2
3) Edit the line in /usr/share/bootini/boot.ini
setenv condev "console=tty0 console=ttyS0,115200n8"
so it looks like this:

Code: Select all

setenv condev "console=tty0 console=ttyS0,115200n8 console=ttyS2,115200n8"   
Then reboot with your 3.3V TTL to USB UART connected to (pin 6 to GND, pin 8 to the RX of the USB-UART, pin 10 to TX of the USB-UART).
You will need some kind of terminal program on your computer. I use minicom on Ubuntu. The baud is 115200 8N1, and no flow control.

User avatar
rooted
Posts: 6552
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 61 times
Been thanked: 15 times
Contact:

Re: How to use the UART on the 40 Pin GPIO header for the co

Unread post by rooted » Sat Dec 24, 2016 9:21 am

Nice little how-to, thanks for sharing.

User avatar
mad_ady
Posts: 6178
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 123 times
Been thanked: 88 times
Contact:

Re: How to use the UART on the 40 Pin GPIO header for the co

Unread post by mad_ady » Sat Dec 24, 2016 6:48 pm

What's your ubuntu version? It looks like pre systemd

Post Reply

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest