How can I connect to a specific mobile Bluetooth using HC-05?

I am done with the AT mode commands. The HC-05 scans various devices using AT+INQ command.

Now, I want to scan available Bluetooth devices around using HC-05 and want to connect to a specific Bluetooth address using the code and return a signal when connected. I am totally clueless how to write the code. Can you please help me with it as it is a part of my project.