BITalinoWorld / revolution-python-api

Python API for BITalino (r)evolution
GNU General Public License v3.0
21 stars 19 forks source link

Python bluetooth socket error #11

Closed Hyejinini closed 2 years ago

Hyejinini commented 2 years ago

Hello. I hope you're doing well and safe. I am contacting you because I have a question about this code.

I think it's an error in the Bluetooth socket part, but I'm not sure why this the error occurs. As you can see from the attached photo, it was confirmed that the bitalino device could not be connected due to an error in parts " self.socket = bluetooth.BluetoothSocket(bluetooth.RFCOMM) " and "Class BluetoothSocket ".

I am sending you a question to ask which part to check because there is no error if you run the 'Class BluetoothSocket' part code separately.

What part do I have to check? I'd like to hear your valuable opinion. I'm afraid my lack of English will interfere with your understanding. Happy New Year, though late, and I hope your day is happy.

I'll be waiting for your reply. Thank you.

2 self socket proto

fcachado commented 2 years ago

Hello @Hyejinini,

In order to fix your issue you should uninstall the Pybluez package that you have installed in your machine, and then install it using the following command: pip install git+https://github.com/pybluez/pybluez.git

Also, you should run this package with Python between 3.7 and 3.10, which are the versions that we assure compatibility.

I hope this answer can help you fix the issue.

Hyejinini commented 2 years ago

Hello.

I really appreciate your kind reply. Thanks to you, I solved the problem well.

I hope your day will be happy. Thank you :)