BeagleBone Serial Communication
I found the solution it was in too big difference between baudrates of receiver and transmitter. 

I would add that it is very recommended that when you open any file in Linux, you need to close it or you'll have a problems.