Answer the question
In order to leave comments, you need to log in
Why won't the bluetooth.socket connection close?
I do something like this in a cycle /between cycles the delay was 10 seconds, a minute, 5 minutes/:
phoneSock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
phoneSock.connect((tgtPhone, port))
phoneSock.send(msg)
while result.find('\n') < 0:
result += phoneSock.recv(buff_size)
phoneSock.close()
cmd = 'hcitool dc ' + tgtPhone
ro = os.popen3(cmd)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question