Advanced Bluetooth control

Hi,

I have a question about how to recognize changes in the state of BT connection with an android phone, I want to recognize the followings states:

  1. When the phone is not pair with the module
  2. When the connection between phone and module is established
  3. When the connection between phone and module is disconnected

And also how to enter the module to waiting for paring mode (like long press on the button of BT headset)
I try to find the commands on HC-06 Datasheet but I didn’t find it there

For example, I want to create a project with RGB led and a button
When I push the button, I want that the RGB led start blink in blue and purple for 1 minute and the module wait for pairing with an android phone. After 1 minute or if connected to phone the module is no longer allows pairing with new phone.
When phone enter to the BT range and connect to the module, the led blink in green
When the module is not connected to a phone (or out of range), the led blink in red

Thanks,
Elad