Bluetooth communication using Arduino , HC-05 module and PC

Hello everyone,
I'm trying to establish a bluetooth connection between an Arduino (with HC-05 module) and a computer.
I use 2 codes. One for arduino and the other one in python on computer.
I've never used an Arduino before, it's my first time.
I'm a beginner with socket module so I don't understand all function perfectly
All composant are connected correctly. Port and address are also correct.
HC-05 is in master mode.
Python and Arduino code are in the attachments (screenshots).

When the python program starts, there is an error with the s.connect() function (Although port and address are correct)
This is the message : "OSError: [WinError 10064] A socket operation failed because the destination host was down"

I don't understand what this error means, can someone help me to understand it and tell me a solution ? :slight_smile:
Thanks for your answers !

Python.JPG

Python.JPG

darentis:
All composant are connected correctly. Port and address are also correct.
HC-05 is in master mode.
Python and Arduino code are in the attachments (screenshots).

Really correct? Who would ever know?

HC-05 probably does not need to be in master mode. The fact that you call it a slave rather suggests that is your intention anyway. In the unlikely event that you need it to be a master, you should try it in slave mode first.

You should read the How to Use notes at the head of this forum on posting code.

You might find the following background notes useful.