serial communication with bluetooth hc-05 not working

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

...R