Balloon Collaboration
December 15, 2019, 02:17:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: DaddyB, Larry and Dan are your administrators...Private message for any problems or issues with the Forum//barntekadmin
   Home   Help Search gallery Calendar Login Register  
Pages: [1]
Author Topic: Dump TTY console and free up port for RS-232 use  (Read 2104 times)
Hero Member
Posts: 1167

View Profile
« on: January 07, 2013, 06:27:50 PM »

As I have said before, the default settings for the RS-232 on the Pi is set to work as a console terminal.  If we are going to use it to communicate with our projects, we need to disable this and make it available for common use.  I used this site to accomplish this.  Since you never know how long a page will stay on the web, I am also listing steps how to do it.

First, make a backup of the /boot/cmdline.txt file by tping in the following:
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt

Then, edit the file:
sudo nano /boot/cmdline.txt

On mine, there were 2 references to ttyAMA0.  console=ttyAMA0,115200 & kgdboc=ttyAMA0,115200.   These need to be taken out.

Then, edit the /etc/inittab file:
sudo nano /etc/inittab

On mine, it was the last line of the file.  Look for the following and comment it out:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Be sure to save the file and exit, then reboot.

Once running again, install the terminal program minicom.
sudo apt-get install minicom
* This site can help with the setup of minicom.

Now, you have to set your user up in the 'dialout' group to make sure you have read/write permissions on the serial port:
sudo adduser username dialout

Now, you can run minicom directly from the command line with
sudo minicom -b 115200 -o -D /dev/ttyAMA0
or you can set it up manually by just running
sudo minicom -s

This should bring up a configuration menu.  Select Serial Port Setup, then press A to change the serial device.  edit it to say '/dev/ttyAMA0', then press ESC to exit that screen.  Now, select Save setup as dflt.  This will save it as the default setting.  Then select Exit.

Now, print <CNTL>A, then 'Z' to bring up a command summery.  Pressing 'E' will toggle local echo on/off.  There may be other settings you can adjust, like adding cr/lf to the end of the line.  Just set it up the way you want it.

From here, if you have you pi hooked up to your PC via RS-232, then you can type in minicom and it will display on Termite, and vice versa.  

This is just proving a concept, but soon I should be communicating with my projects.

« Last Edit: January 07, 2013, 06:30:04 PM by Larry » Logged
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!