I have successfully paired the Pi 3 to an Android phone via bluetooth. I have tested an RFcomm channel connection using Bluetooth Terminal from the Play Store and it shows that I have a valid connection for data transport.
Now I simply want to view the data from a Python script. Very basic, just read from the port and print. Here's the code:
import serial
ser = serial.Serial('dev/rfcomm0', 9600)
while True:
result = ser.read()
print result
I get an error however when I run this code:
SerialException: could not open port dev/rfcomm0: [Errno 2] No such file or directory: 'dev/rfcomm0'
Anyone know how to fix this?