Before setting the device in the master mode, make sure you have another device which is in slave mode. I have HC-06 which is always in the slave mode.
Starting with the simplest one i.e using the POLL method. The data is Received in blocking mode i.e the CPU will block every other operation until the data transfer is complete. This method is good to use if you are only using UART and nothing else otherwise all other operations will be affected.
UART have a feature called IDLE line detection and we are going to use this to sole the problem mentioned above. Idle line is detected on RX line when there is no received byte for more than 1 byte time length.
UART is widely used for serial communication between two devices. It is easy to use protocol, because the clock sync is not involved. All you have to do is take care of BAUD RATE. BAUD RATE must be same for both devices, amongst which communication is done. I am going to use 9600 as it is standard.