timschneeb / BudsPro-Headtracking

Stream head-tracking data from the Samsung Galaxy Buds Pro in real-time
MIT License
88 stars 10 forks source link

Device is found but the connection gets lost. #7

Open antoinensl opened 1 year ago

antoinensl commented 1 year ago

Hi,

It seems that the connection with the buds pro can't be maintained. Any idea? Thank you in advance!

Best!

PS C:\Users\Utilisateur\Downloads\BudsPro-Headtracking-master\BudsPro-Headtracking-master> python headtracking.py 98:0D:6F:FE:C1:EB -v -t
Galaxy Buds2 Pro
Searching for RFCOMM interface...
RFCOMM interface found. Establishing connection...
Connected to device.
<< OUTGOING: fd 04 00 7c 00 34 4d dd
<< OUTGOING: fd 03 00 c3 2f e9 dd
>> INCOMING: fd 31 00 61 0d 04 53 55 01 01 11 00 00 04 b9 22 02 00 46 01 46 01 07 00 03 66 00 01 00 10 00 01 00 00 11 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 d6 e8 dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
<< OUTGOING: fd 07 00 c3 00 00 00 00 6a dd dd
Exception in thread Thread-2 (_target):
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Utilisateur\Downloads\BudsPro-Headtracking-master\BudsPro-Headtracking-master\RepeatedTimer.py", line 20, in _target
    self.function(*self.args, **self.kwargs)
  File "C:\Users\Utilisateur\Downloads\BudsPro-Headtracking-master\BudsPro-Headtracking-master\SpatialSensorManager.py", line 44, in __keepAlive
    self.service.sendPacket(self.MSG_SPATIAL_AUDIO_CONTROL, bytes(self.CID_KEEP_ALIVE))
  File "C:\Users\Utilisateur\Downloads\BudsPro-Headtracking-master\BudsPro-Headtracking-master\BluetoothService.py", line 85, in sendPacket
    self.socket.send(bytes(b))
  File "C:\Users\Utilisateur\AppData\Roaming\Python\Python311\site-packages\bluetooth\msbt.py", line 99, in send
    return bt.send (self._sockfd, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: Une connexion établie a été abandonnée par un logiciel de votre ordinateur hôte.
antoinensl commented 1 year ago

Sorry I just realized it was the same problem as the first ticket!