[beagleboard] serial port programming in c++

http://tldp.org/HOWTO/Serial-Programming-HOWTO/

Alternatively, you could use python:

http://pyserial.sourceforge.net/

if using debian/ubuntu on the BBB, install the python-serial or
python3-serial package.

regards,
Nuno