Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: koray.duran on March 30, 2013, 12:01:11 AM

Title: Android UART Problem
Post by: koray.duran on March 30, 2013, 12:01:11 AM
Hello,

I got a A13 with Wi-Fi and LCD+TS. I've just plugged usb-f-cable and able to receive debug information.
But I need to use uart0 and uart1 in my applications so i just need to turn off debug mode.
I tried to access serial port via /dev/ttyS0 it says i dont have permisson to write and read this.

Can you please explain me how to close debug mode for uart and how to use them ?

Thanks a lot.
Title: Re: Android UART Problem
Post by: olimex on March 31, 2013, 02:28:00 PM
to disable the console on UART1 do this: enter as root, then

#vi /etc/inittab

Comment the line: "T0:23:respawn:/sbin/getty -L -a root ttyS0 115200 vt102"
Save the file and reboot.
!!!Before rebooting you should have working SSH

log via SSH and you can use UART1
Title: Re: Android UART Problem
Post by: koray.duran on April 02, 2013, 02:27:16 PM
there is no inittab in etc directory.
I think it's in debian version, android doesnt have it.
i found it on proc directory but after i comment, system recovers this file.
Title: Re: Android UART Problem
Post by: olimex on April 03, 2013, 08:58:26 AM
sorry, I'm not familiar with Android
Title: Re: Android UART Problem
Post by: vinifr on April 03, 2013, 04:22:54 PM
You need edit script.bin/script.fex into nanda: http://elinux.org/Hack_A10_devices (http://elinux.org/Hack_A10_devices)

You can use ssh instead adb.  ;)
Title: Re: Android UART Problem
Post by: koray.duran on April 05, 2013, 12:28:35 PM
i did it and succesfully updated the script.bin file but somehow it doesnt work.
do you have any experince about it? try to change or disable the debug port that i can use it.

modified part :

[uart_para]
uart_debug_port          = 0
uart_debug_tx            = port:PB19<2><1><default><default>
uart_debug_rx            = port:PB20<2><1><default><default>
Title: Re: Android UART Problem
Post by: murerten on April 05, 2013, 01:39:11 PM
It is not easy I think. Because you have to change /init.rc file in android image. There are lines that start debug on UART0. I don't know how you can change those lines without making your custom android image.
Title: Re: Android UART Problem
Post by: koray.duran on April 05, 2013, 02:11:32 PM
Many people has same or similiar problems about uart on the forum. I've tried so many ways. This need to be solved by Admins, i think.
murarten you are right, i've also seen these lines in init.rc and to change it you must download boot image edit and upload again. also we may need to change ueventd.rc to give write permission.

here is what i find but i'm not so familiar with linux systems.
http://droidcore.blogspot.com/2012/12/how-to-edit-initrc-in-android.html
Title: Re: Android UART Problem
Post by: vinifr on April 05, 2013, 05:23:27 PM
I had forgotten, :P you need to change the parameters of the bootloader also. Edit /sdcard/nanda/linux/params, if you want to disable the console.
root=/dev/nandb rw init=/init fbmem=32M@0x5a000000 loglevel=8;
Title: Re: Android UART Problem
Post by: koray.duran on April 05, 2013, 11:38:22 PM
Quote from: vinifr on April 05, 2013, 05:23:27 PM
I had forgotten, :P you need to change the parameters of the bootloader also. Edit /sdcard/nanda/linux/params, if you want to disable the console.
root=/dev/nandb rw init=/init fbmem=32M@0x5a000000 loglevel=8;

i couldnt find params there.
Title: Re: Android UART Problem
Post by: vinifr on April 06, 2013, 04:03:49 PM
Sorry, i mean, change
console=ttyS0,115200 root=/dev/nandb rw init=/init fbmem=32M@0x5a000000 loglevel=8; to
root=/dev/nandb rw init=/init fbmem=32M@0x5a000000 loglevel=8; into /mountpoint/nanda/linux/params

That is, you need to delete console=ttyS0,115200

mountpoint: directory where you mounted nanda
Title: Re: Android UART Problem
Post by: koray.duran on April 06, 2013, 08:57:49 PM
There is no such file "params"!!! Maybe i have some problem  :D
First i have mounted nandaand then check the location "/sdcard/nanda/linux/"
but htere is no params file. only three files :
linux.bmp
linux.ini
u-boot.bin
Title: Re: Android UART Problem
Post by: vinifr on April 08, 2013, 03:41:09 PM
You are right. There is only 3 files. But somewhere the parameters being passed.

You could pass the parameters directly to the u-boot, via command line. Just press any button before the u-boot boot the kernel.
Title: Re: Android UART Problem
Post by: koray.duran on April 16, 2013, 05:36:49 PM
Also tried, it doesn't work.  :o
Title: Re: Android UART Problem
Post by: gkania on April 24, 2013, 04:40:16 PM
Hi.

Look here
http://www.imajeenyus.com/computer/20130301_android_tablet/android/partitions_detailed.html

especially at description of

/dev/block/nandb - env
Title: Re: Android UART Problem
Post by: jameswong on May 10, 2013, 08:58:00 AM
Now, there is an APK which can help you tune your uart device, which you can find in google play "android hyperterminal" there is an English version. It is quite helpful.