Embedded Freaks..

August 12, 2008

Using GNU screen to debug your serial port

Filed under: embedded-tips — Tags: — kunilkuda @ 4:06 am

I’m using Linux, and tools like Window’s Hyperterminal to debug your serial port is rare, difficult to use, unpractical, and I have to live with it =) So, after moving here and there, I finally choose my favorite serial debugger in Linux: GNU Screen.

Here’s some tips to use it for your debugging:

  • Opening serial port (with the correct baud rate)
bash> screen /dev/ttyUSB0 57600

/dev/ttyUSB0 is the serial port, while 57600 sets its baud rate into 57600bps.

  • Enable the CTS/RTS handshake
bash> screen /dev/ttyUSB0 57600,ctsrts
  • Close the screen after you finish the debugging session
Ctrl + A + k
  • View your serial port status (CTS/RTS/DTS/PE/RI..etc)
Ctrl + A + i

2 Comments »

  1. […] If you’re on HP-UX, you’re stuck with Screen. If you need telnet support built-in, or serial support you’re stuck with […]

    Pingback by Introduction to tmux: A GNU Screen Alternative | Linux openSUSE — March 15, 2011 @ 10:54 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: