BB xM: disable console on serial port

Hi I have a BB xM on which I am running this version of ubuntu:

http://rcn-ee.net/deb/rootfs/maverick/ubuntu-10.10-r5-minimal-armel.tar.xz

I want to use the serial port on the board for something other than
serial console. I can get ttyO2 configured properly and communicating
with my external device (using a custom cable) if I stop ttyO2, so
that the ttyO2 process doesn't keep changing the permissions and the
configuration. But if I rename the /etc/init/ttyO2.conf file to
ttyO2.conf.save in an attempt to keep it from being set up for the
serial console, the BB won't boot. Also tried removing "console =
ttyO2.... " from the boot.cmd and boot.scr files, but boot failed in
this case as well. Clearly I am missing something.

I would appreciate any pointers to a solution. Using a USB connection
is one possibility, but would require extra hardware, or replacing
the device that I am trying to communicate with, which I would prefer
to avoid.

Hi I have a BB xM on which I am running this version of ubuntu:

http://rcn-ee.net/deb/rootfs/maverick/ubuntu-10.10-r5-minimal-armel.tar.xz

I want to use the serial port on the board for something other than
serial console. I can get ttyO2 configured properly and communicating
with my external device (using a custom cable) if I stop ttyO2, so
that the ttyO2 process doesn't keep changing the permissions and the
configuration. But if I rename the /etc/init/ttyO2.conf file to
ttyO2.conf.save in an attempt to keep it from being set up for the
serial console, the BB won't boot. Also tried removing "console =
ttyO2.... " from the boot.cmd and boot.scr files, but boot failed in
this case as well. Clearly I am missing something.

How do you know it "didn't" boot.. Removing "console=ttyO2.." from
your boot arg's (boot.scr/boot.cmd) will disable printing boot info
over the serial bus on bootup, and removing the /etc/init.d/ttyO2.conf
will stop getty from starting a login prompt over it..

I would appreciate any pointers to a solution. Using a USB connection
is one possibility, but would require extra hardware, or replacing
the device that I am trying to communicate with, which I would prefer
to avoid.

Regards,

Good point; I have been running the board with the network up and
accessing the board over the network using ssh -- not using the
console on the video display or the keyboard and mouse, either (tty2 I
assume). When I start the board with the changes mentioned below, the
network doesn't come up-- status lights on the ethernet interface
don't go on or show any activity, and the status lights on the uSD
interface don't show any activity. If it is booting, it is booting
into a state that doesn't bring up network interfaces. I also don't
see any signs of a failed boot or limited boot in system logs, but I
might not be looking in the right place.

Good point; I have been running the board with the network up and
accessing the board over the network using ssh -- not using the
console on the video display or the keyboard and mouse, either (tty2 I
assume). When I start the board with the changes mentioned below, the
network doesn't come up-- status lights on the ethernet interface
don't go on or show any activity, and the status lights on the uSD
interface don't show any activity. If it is booting, it is booting
into a state that doesn't bring up network interfaces. I also don't
see any signs of a failed boot or limited boot in system logs, but I
might not be looking in the right place.

Hi John,

Do you have a monitor you can connect just for a quick test? I'd
leave the dvi stuff in the boot.scr and reattach the serial cable....
The test would be to ensure the kernel is loaded with u-boot and not
running into any issues.. The last output with serial, should be
"uncompressing kernel...." Shortly there after the display should
come alive.. After you know that works, drop the serial cable and
double check with only the dvi..

BTW.. since the mac address is random on boot, make sure you add one
thru the /etc/network/interfaces

# The primary network interface
allow-hotplug usb1
iface usb1 inet dhcp
hwaddress ether xx:xx:xx:xx:xx:xx

Regards,

Hi Robert -- Thanks for your response and help.

First, I actually have not been able to use the serial console at all
because I don't have a computer with a serial port, and the USB-serial
cable that I bought for this purpose is too flaky to be useful. So I
only used the display console (tty2) to test the board and get
angstrom and ubuntu up and running. I didn't have any real problems
with this.

The board boots fine into ubuntu now. I made the changes to the
boot.scr and boot.cmd files, and /etc/init/ttyO2.conf that I
described, and when the board wouldn't boot ( or the network wouldn't
start), I restored the files to their original states by mounting the
SD card onto another ubuntu machine and making the necessary changes,
and the Beagleboard again boots normally, and I can access it via
ssh. And I can stop ttyO2 and reconfigure it for the my application,
but this configuration apparently will prevent the board from
booting. I want to find a stable configuration that will allow me to
configure ttyO2 for an application other than serial console, and that
will survive power cycling or reboots for any other reason.

Are there edits to the boot script that will make this possible?

Thanks again for your help,

Regards,

John Ketchum

Hi John,

I have almost exactly the same problem with my Beagle Board xM and its
serial port for use of an external device (a GPS receiver sending data
through serial port). I didn't know what to do and searching the net
got me here. I followed your suggestion and made changes to /boot/
uboot/boot.cmd (removing "console=ttyO2,115200n8"). I didn't change
boot.scr since I figured it's binary file and maybe it is not supposed
to be modified that way. I also renamed /etc/init/ttyO2.conf to
ttyO2_conf.backup. Then I found out about the shell script /boot/
uboot/tools/update_boot_files.sh from the readme.txt file in the tools
folder. I ran it and it seemed to re-generate a bunch of boot-related
files and it worked perfectly for me -- ttyO2 is now configured the
same as other ttyOx (root:dialout) and I don't have a console at ttyO2
anymore. I happen to have a DB9 cable (straight through) and the
messages from the hyper terminal (on a PC) were exactly like Robert
had mentioned before -- stopped at "Uncompressing Linux... done,
booting the kernel.". By the way, I am running Ubuntu 10.10 with this
kernel

http://rcn-ee.net/deb/rootfs/maverick/ubuntu-10.10-r6-minimal-armel.tar.xz

I hope this helps.

Regards,
Philips

Hi, Philips and John,

I have the same problem as John. I want to use the RS232 port (ttyO2) to login, start my program which use ttyO2 for other purpuse (not console). During the program running, I do not want the console on ttyO2 disturbe the communicaiton. However, when I stop the program, I want the console is restored to the ttyO2.

Philips, I see you removed “console=ttyO2, 115200n8” in boot.src and renamed /etc/init/ttyO2.conf, so you can use ttyO2 for your own purpuse rather than console. My question is, after you exit your program, can you still use ttyO2 for console purpuse? for example, type an ‘ls’ command to list the files.

Daniel

ttyO2_conf.backup

Hi, Philips and John,

I have the same problem as John. I want to use the RS232 port (ttyO2) to
login, start my program which use ttyO2 for other purpuse (not console).
During the program running, I do not want the console on ttyO2 disturbe the
communicaiton. However, when I stop the program, I want the console is
restored to the ttyO2.

You could just have program kill the console "getty process" when
started, and restart it when done. Although FYI: when getty is
restarted it'll probably still require you to login again over
serial...

Hello

Anybody have successfully compiled an opencv application on the beagleboard/bone?

Im trying to compile with gcc but im having a lot of errors.

What are the gcc parameters and what i need to install on angstrom to succesfully compile opencv?

Thanks
Framk

Hi, Framk. Could you show your errors?

The more specific you describe, the more people can help you.

Hello thanos for you answer

The errors I get are these:

/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../../arm-angstrom-linux-gnueabi/bin/ld:
/tmp/ccJW554U.o: undefined reference to symbol
'std::ios_base::Init::Init()@@GLIBCXX_3.4'
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../../arm-angstrom-linux-gnueabi/bin/ld:
note: 'std::ios_base::Init::Init()@@GLIBCXX_3.4' is defined in DSO
/usr/lib/libstdc++.so.6 so try adding it to the linker command line
/usr/lib/libstdc++.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

And Im compiling with this:

#!/bin/sh
export LD_LIBRARY_PATH=/usr/lib
echo `pkg-config --cflags opencv`
echo `pkg-config --libs opencv`
gcc `pkg-config --cflags opencv` -g -o $2 $1 `pkg-config --libs opencv`

I thin im missing some package installation

Please any help would be greatly appreciated.

Regards
Frank

http://blog.galemin.com/

http://elinux.org/Getting_a_Workshop_SD_Image

Try the first link or you can download the image from second link, which comes with opencv build.

https://coherentmusings.wordpress.com/2012/06/24/getting-started-with-opencv-on-beagleboard-xm/

top only shows a limited number, use ps...

ps -A | grep getty

Regards,

Hi, Robert,

thanks for your kind help. I tried the ps command (both “ps -A | grep getty” and “ps -A | grep tty” and found the getty programs. I got the following output

Well considering getty starts login to show the login prompt on
ttyO2.. I'd start with 858...

Regards,