c program to read data from beagle board

Hi ,

I have written C program to read and echo data from beagleboard to
PC using serial com port .
I am using same C code for linux PC and beagle board.

When I send data from beagle board to PC, PC receiving data and
sending back to beagle board.But beagleboard unable to receive data
from PC. I tried with different baud rates, PC is receiving data
with all baud rates, but beagle board not receiving data.

Can any one please suggest me, If anything is wrong with me.

Thank you,
Srikanth parupati

Hi ,

I have written C program to read and echo data from beagleboard to
PC using serial com port .
I am using same C code for linux PC and beagle board.

When I send data from beagle board to PC, PC receiving data and
sending back to beagle board.But beagleboard unable to receive data
from PC. I tried with different baud rates, PC is receiving data
with all baud rates, but beagle board not receiving data.

Can any one please suggest me, If anything is wrong with me.

you may want to look at

and omap-u-boot-utils/lib/serial_win32.c at master · nmenon/omap-u-boot-utils · GitHub
based on your host OS version.

usually uart3 is set at 115200n8 baudrate and unless you tell the port
to be at a different baud config it probably wont work..

if you have details on your test code etc.. do post on linux-omap
mailing list (Majordomo Lists at VGER.KERNEL.ORG)…

Hello,

I had the same problem you are having but I found a way to do it.

There is a library called “LibSerial” which is very very simple to use. The only drawback is the installation process. I already have a recipe ready for this. I will save you some time by sending you the .ipk packets to install.

Here is an example (compiled with <g++ helloplus.cpp -Iinclude -lserial -o helloplus>) You can try this example with Ubuntu first to test LibSerial.

if you are interested in trying LibSerial and if this is what you were asking for, just reply and I will send you the .ipk packages you need to install in your BeagleBoard.

/*

  • LibSerial example with C++

parupati wrote:

Hi ,

I have written C program to read and echo data from beagleboard to
PC using serial com port .
I am using same C code for linux PC and beagle board.

  When I send data from beagle board to PC, PC receiving data and
sending back to beagle board.But beagleboard unable to receive data
from PC. I tried with different baud rates, PC is receiving data
with all baud rates, but beagle board not receiving data.

Can any one please suggest me, If anything is wrong with me.

I cannot comment if anything is wrong with you :-), but I suggest you
check your serial cable setup. what you describe is a symptom of a
wrong serial cable (IDC10 to DB9 most likely)

Hi Vladimir,

I think there is no prob with the cable because, at booting time of
beagle board I can able to boot up messages and login to beagle sytem
through serial communication.

Please suggest me

Thank you,
Srikanth

Hello, you might want to use a usb-serial converter instead of the built-in serial port, specially if you are using it for console access allready.
Anyhow we are using a pl2303 usb-serial adapter and works fine most of the time :frowning:

It might be a problem with the kernel version (2.6.29), I still don’t know but once in a while (unpredictable) the serial port stops sending data. Has anyone had this problem with pl2303 adapters?

Hi Marc,

Could you please send me the link for drivers (pl2303 usb-serial adapter) .

Thank you,
Srikanth

Hello, the driver I use is from the kernel source itself (linux-omap-2.6.29-r48), you can find it under drivers/usb/serial/pl2303.c

Hello, I am trying to use LibSerial in my BeagleBone, and have the following error:

Building file: …/src/SerialComm.cpp
Invoking: GCC C++ Compiler
arm-linux-gnueabi-g++ -I/usr/include/c++/4.6.3 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/SerialComm.d" -MT"src/SerialComm.d" -o “src/SerialComm.o” “…/src/SerialComm.cpp”
/bin/sh: 1: arm-linux-gnueabi-g++: not found
make: *** [src/SerialComm.o] Error 127

Does this have to do with where I installed LibSerial? If so, what is the best way to install it, somewhere in the Arm-Linux-GNUeabi folder? I installed LibSerial using Ubuntu’s Software Center.