import socket
baddr = 'D4:36:39:6D:B6:4D'
channel = 4
s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM)
s.connect((baddr, channel))
s_sock = server_sock.accept()
print ("Accepted connection from " + address)
data = s_sock.recv(1024)
print ("received [%s]" % data)
s.listen(1)