Serial port ttyS1 & ttyS2 - solved!

Post Reply
rolch
Posts: 10
Joined: Thu Jun 13, 2019 5:53 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 2 times
Contact:

Serial port ttyS1 & ttyS2 - solved!

Unread post by rolch » Thu Jun 13, 2019 6:14 am

The guide for enabling ttyS1 and ttyS2 is useless in the Android case.
I have pulled the "/dev/block/dtbs" file and compared with "meson64 odroid 2.dtb" and they are completely different.
So, they can't be just replaced. Is the any tool that can be used on Android to enable the uart's?
I need this ports for my project.
Last edited by rolch on Fri Jun 14, 2019 12:48 am, edited 1 time in total.

Luke.go
Posts: 346
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 5 times
Been thanked: 9 times
Contact:

Re: Serial port ttyS1 & ttyS2 - need help

Unread post by Luke.go » Thu Jun 13, 2019 8:59 am

You should compare with meson64_odroidn2_android.dtb. :)

rolch
Posts: 10
Joined: Thu Jun 13, 2019 5:53 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Serial port ttyS1 & ttyS2 - need help

Unread post by rolch » Thu Jun 13, 2019 3:50 pm

I have compared dtbs with the one taken from N2 linux. They are different in size too. I think that because Android is 32 bit, but linux 64 bit version. For this reason it is impossible to use "fdtget" "fdtput" copied from linux. I think that such important tools should be build in Android kernel.

rolch
Posts: 10
Joined: Thu Jun 13, 2019 5:53 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Serial port ttyS1 & ttyS2 - solved!

Unread post by rolch » Fri Jun 14, 2019 12:57 am

Its, working! The solutions is simple:

1. Using adb pull /dev/block/dtbs
2. Copy this file to linux
3. On Linux use fdtget fdtset for this file
4. Using fastboot flash the dbts partition

The difference in size I have mentioned is because on Android the file fill the partitions by adding zeros.
Last edited by rolch on Fri Jun 14, 2019 6:02 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 32570
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 190 times
Been thanked: 355 times
Contact:

Re: Serial port ttyS1 & ttyS2 - solved!

Unread post by odroid » Fri Jun 14, 2019 11:33 am

Glad to hear you found solutions.
Thank you for sharing it. :)

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 5 guests