Aug-31-2021, 02:04 PM
Hi everyone, when I'm trying to run the code below, Im getting ModuleNotFoundError: No module named 'bluetooth' error and even if I pip install pybluez it doesn't solves the problem.
import bluetooth
def connect ():
bd_addr = "x:x:x:x:x:x"
port = 1
sock=bluetooth.BluetoothSocket(bluetooth.RFCOMM)
sock.connect((bd_addr, port))
sock.send("hello!!")
sock.close()
connect()
I'm using a win10 and I couldn't understand what to do about it. I tried to use setup.py but it didn't work either.
import bluetooth
def connect ():
bd_addr = "x:x:x:x:x:x"
port = 1
sock=bluetooth.BluetoothSocket(bluetooth.RFCOMM)
sock.connect((bd_addr, port))
sock.send("hello!!")
sock.close()
connect()
I'm using a win10 and I couldn't understand what to do about it. I tried to use setup.py but it didn't work either.