receive on ttyO4 does not work on c++


I have managed to get I2c and some gpios working on the BBB using c++ as the development tool. WIth UART I can send data using the ttyO4 port, but I am unable to receive any data on it.

I have used the code given in this site…serial port example code

Please could anyone tell what is wrong ?? I can send data but not receive.

Could anyone point out some example code that can do this…???

I know the hardware is working fine as I have checked the pulses on the RXD line.