[SOLVED] Ubuntu 20.04 has no ttySAC0 port

Post Reply
HMohammadi
Posts: 2
Joined: Thu Oct 07, 2021 4:45 pm
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

[SOLVED] Ubuntu 20.04 has no ttySAC0 port

Post by HMohammadi »

Hello,
i've downloaded the ubuntu 20.04 image from hardkernel and flashed it to an emmc card with Etcher. I'm using Odroid XU4 and need to stablish a serial communication with an other board. The problem is, that i need the ttySAC0 port on Ubuntu, because i'm using the shifter shield of odroid. When i go to /dev, i can't see ttySAC0 there, how can i solve this issue?

User avatar
odroid
Site Admin
Posts: 38180
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2055 times
Been thanked: 1227 times
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by odroid »

There is no such issue on the latest Ubunbtu 20.04.3 LTS image which uploaded last week.
UART ports are available out of the box.

Code: Select all

root@odroid:~# ls -alp /dev/ttySA*                                                                     
crw-rw---- 1 root dialout 204, 64 Sep  7 18:37 /dev/ttySAC0                                            
crw------- 1 root tty     204, 66 Oct  8 00:48 /dev/ttySAC2
Which kernel version do you run?

Code: Select all

root@odroid:~# uname -a                                                                                
Linux odroid 5.4.150-233 #1 SMP PREEMPT Tue Oct 5 18:47:06 EDT 2021 armv7l armv7l armv7l GNU/Linux
BTW, ttySAC2 is mapped to the Linux serial console port (a white separated connector on the XU4 board).
You have to access ttySAC0 node to access the UART pins on the GPIO header.

https://wiki.odroid.com/odroid-xu4/appl ... /gpio/uart

feddler
Posts: 4
Joined: Wed Oct 13, 2021 11:15 pm
languages_spoken: english
ODROIDs: Odroid-XU4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by feddler »

Still have the same problem. What image do you mean when wrote "image which uploaded last week"???

Odroid XU4, flash the image from http://de.eu.odroid.in/ubuntu_20.04lts/ ... 926.img.xz

On first boot:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot
After reboot:

Code: Select all

odroid@odroid:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

Code: Select all

odroid@odroid:~$ uname -a
Linux odroid 5.4.150-233 #1 SMP PREEMPT Tue Oct 5 18:47:06 EDT 2021 armv7l armv7l armv7l GNU/Linux
Still no /dev/ttySAC0 available, just /dev/ttySAC2

Code: Select all

odroid@odroid:~$ ls -la /dev/ttyS*
crw-rw---- 1 root dialout   4, 64 Oct 13 16:04 /dev/ttyS0
crw-rw---- 1 root dialout   4, 65 Oct 13 16:04 /dev/ttyS1
crw-rw---- 1 root dialout   4, 66 Oct 13 16:04 /dev/ttyS2
crw-rw---- 1 root dialout   4, 67 Oct 13 16:04 /dev/ttyS3
crw--w---- 1 root tty     204, 66 Oct 13 16:04 /dev/ttySAC2
odroid@odroid:~$ 
With ubuntu-20.04-5.4-minimal-odroid-xu4-20210928.img.xz all the same... No ttySAC0, only ttySAC2.

User avatar
odroid
Site Admin
Posts: 38180
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2055 times
Been thanked: 1227 times
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by odroid »

Very weird.
ubuntu-20.04.1-5.4-mate-odroid-xu4-20210926.img.xz and ubuntu-20.04-5.4-minimal-odroid-xu4-20210928.img.xz both are fine.

Did you modify config.ini file?
The default value for GPIO settings should be something like this in /media/boot/config.ini file to activate SPI, I2C and UART features.

Code: Select all

; Device Tree Overlay                                                                  
overlay_resize=16384                                                                   
overlay_profile=                                                                       
overlays="spi0 i2c0 i2c1 uart0"
If you have a USB-UART console cable, you should see the following u-boot message which loads a uart0.dtbo device tree overlay file for UART0 (ttySAC0).

Code: Select all

reading exynos5422-odroidxu4.dtb                                                       
87141 bytes read in 8 ms (10.4 MiB/s)                                                  
reading overlays/spi0.dtbo                                                             
691 bytes read in 5 ms (134.8 KiB/s)                                                   
reading overlays/i2c0.dtbo                                                             
224 bytes read in 4 ms (54.7 KiB/s)                                                    
reading overlays/i2c1.dtbo                                                             
226 bytes read in 4 ms (54.7 KiB/s)                                                    
reading overlays/uart0.dtbo                                                            
227 bytes read in 5 ms (43.9 KiB/s)

feddler
Posts: 4
Joined: Wed Oct 13, 2021 11:15 pm
languages_spoken: english
ODROIDs: Odroid-XU4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by feddler »

No, I dont't modify anything, just flash downloaded image and boot. No additional hardware was connected, just ethernet and power cable only.
XU4 HW rev: REV 0.1 20170905

dmesg output may be helpfull:
https://drive.google.com/file/d/1xOnczT ... sp=sharing
Last edited by feddler on Thu Oct 14, 2021 3:43 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 38180
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2055 times
Been thanked: 1227 times
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by odroid »

We couldn't reproduce the issue.
Do you have a 1.8Volt compatible USB-UART cable something like this to monitor the raw boot process?
https://www.hardkernel.com/shop/usb-uart-module-kit/

feddler
Posts: 4
Joined: Wed Oct 13, 2021 11:15 pm
languages_spoken: english
ODROIDs: Odroid-XU4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by feddler »

Yes, I have USB-UART.
Log from minicom with raw boot process output:
https://drive.google.com/file/d/1tZk1co ... sp=sharing

User avatar
odroid
Site Admin
Posts: 38180
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2055 times
Been thanked: 1227 times
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by odroid »

Thank you for the raw output and I found a reason.
Your eMMC has an old boot loader in the hidden boot sectors.
The following commands will solve your problem surely.

Code: Select all

sudo apt install --reinstall uboot
sudo reboot

feddler
Posts: 4
Joined: Wed Oct 13, 2021 11:15 pm
languages_spoken: english
ODROIDs: Odroid-XU4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Ubuntu 20.04 has no ttySAC0 port

Post by feddler »

Great thanks, after uboot update all worked fine!

Code: Select all

odroid@odroid:~$ ls -la /dev/ttyS*
crw-rw---- 1 root dialout   4, 64 Oct 14 08:03 /dev/ttyS0
crw-rw---- 1 root dialout   4, 65 Oct 14 08:03 /dev/ttyS1
crw-rw---- 1 root dialout   4, 66 Oct 14 08:03 /dev/ttyS2
crw-rw---- 1 root dialout   4, 67 Oct 14 08:03 /dev/ttyS3
crw-rw---- 1 root dialout 204, 64 Oct 14 08:03 /dev/ttySAC0
crw--w---- 1 root tty     204, 66 Oct 14 08:03 /dev/ttySAC2
These users thanked the author feddler for the post:
odroid (Thu Oct 14, 2021 5:25 pm)

HMohammadi
Posts: 2
Joined: Thu Oct 07, 2021 4:45 pm
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Ubuntu 20.04 has no ttySAC0 port

Post by HMohammadi »

thank you so much for the help, it solved my problem

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest