Python code for data transfer between Bluetooth Module and Android Mobile (through App)

#Code is written for communication between HC-05/HC-06 Bluetooth
#module and Android device using SPP app developed at IGDTUW and
#available at website
# Code version V1.0, written by Project staff
#Suitable for working with UART on Raspberry pi 2 and older versions
# If instructions mentioned separately followed.

import serial
import time
port=serial.Serial(“/dev/ttyAMA0”,9600, timeout=3.0)
print”\nBluetooth Communication Between RPI & ANDROID mobile Device\n”
print “Send somthing from Android device”
while True:

        if rcv:
                 print”Received String from Android: ” + rcv
                 keyin = raw_input(“Enter a string to send:”)
                 print “Send somthing from Android device”