Bluetooth AT commands

I want my HC05 module to scan the Bluetooth addresses of the smartphones around, and while doing so take an action(say, blink an LED) only after some specified Bluetooth address(es) which it has paired up with connects to the Bluetooth module. how do i do that? AT commands is what I have been thinking, but I apparently do not know much that part since I have not used it. can someone guide me through this problem?

http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/