1

I am rather new to programming Bluetooth. I am simply trying to communicate with my PI via my phone, currently i have managed to send single characters with Blueterm. Using a tutorial scrypt.

import bluetooth

server_sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )

port = 1
server_sock.bind(("",port))
server_sock.listen(1)
data = 0

client_sock,address = server_sock.accept()
print "Accepted connection from ",address

#data = client_sock.recv(1024)
while data != 'x':
        data = client_sock.recv(1024)
        print "received [%s]" % data

client_sock.close()
server_sock.close()

But what i actually want to do is sending remote control commands as if its a RC car.

Blueterm was the only app that could connect to the PI. I found out this is because Blueterm allows insecure connections.

But im having some difficulty figuring out how to make a secure connections. Could someone assist me? or Maybe knows a workaround?

ldania
  • 11
  • 2

0 Answers0