ankur_r
Posts: 66
Joined: Sat Nov 12, 2016 9:49 am

Getting Serial console Linux from RPI2

Sat Mar 24, 2018 11:38 pm

Hi All,

I have RPI2 Board with ubuntu linux hp laptop, I want to have its serial console for debugging purpose to move further with yocto, openwrt, uboot+kernel prompt coupling.

Can anybody help me to find out a way to get serial console on my laptop ?

In short I want an interface to debug and to see what going on in the board. The major issue with other methods like VNC and all, we need full setup. But serial console gives good facilities without even as operating system.

Pl help with maximum possible supportive documentation like weblinks, pdf, tutorial available if any..

Thanks & Regards.
Ankur

klricks
Posts: 7154
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Getting Serial console Linux from RPI2

Sun Mar 25, 2018 12:12 am

ankur_r wrote:
Sat Mar 24, 2018 11:38 pm
..But serial console gives good facilities without even as operating system.
...
I think you will at least need a kernal booted maybe more? Or do you really mean JTAG?
For serial you will need a RS232 adapter board with a MAX3232 chip (Not MAX232).
Look for help in the 'bare metal' forum.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

ankur_r
Posts: 66
Joined: Sat Nov 12, 2016 9:49 am

Re: Getting Serial console Linux from RPI2

Sun Mar 25, 2018 2:28 am

Hi All,

The challenge is if kernel booted will be there then how the boot, bsp will be debugged ??

I want to debug a bootable chip for example , I have created a uboot+ kernel bootable image memory card and then I need to debug what is happening inside, how that memory card is reacting , from setiap console messages , till what stage the booting process is reached , the init has been loaded zindagi or rootfs has been created, of network has or not like that, additionally how much time it took to prompt etc etc...I need serial console after primary/secondary (minimum possible) boot loader loading ?? After which I can proceed...

Can anybody help me related to this ?? If someone having the idea, humble request you to come with detailed documentation ??

Please help...

Thanks and regards.
Ankur

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Getting Serial console Linux from RPI2

Mon Mar 26, 2018 8:52 am

ankur_r wrote:
Sat Mar 24, 2018 11:38 pm
Hi All,

I have RPI2 Board with ubuntu linux hp laptop, I want to have its serial console for debugging purpose to move further with yocto, openwrt, uboot+kernel prompt coupling.

Can anybody help me to find out a way to get serial console on my laptop ?
I use cheap CP2102 USB TTL adapters which you can get for less than 2 bucks on ebay (from China), or $6-$8 closer to home. They use 3.3V TTL so they are directly compatible with the Pi GPIO.

Image

From Linux I install screen and use that to open a serial terminal. Lately I've been playing with the Windows Subsystem for Linux (WSL on Windows 10) and from that I enter the following to open a serial terminal (for some reason I have to use sudo with WSL).

Code: Select all

sudo screen /dev/ttyS3 115200
Image

From Linux the device would be something like /dev/ttyUSB0.

Code: Select all

screen /dev/ttyUSB0 115200
Another popular option is minicom, and there are tons of others. This is one of those questions with too many answers.

ankur_r wrote:
Sat Mar 24, 2018 11:38 pm
In short I want an interface to debug and to see what going on in the board. The major issue with other methods like VNC and all, we need full setup. But serial console gives good facilities without even as operating system.
Pretty sure you need some software running, but I don't know much about the other end of the serial console, I just know how to connect to it.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Advanced users”