I currently try to connect an Arduino Micro/Leonardo/32u4 to an ELM327 Bluetooth dongle using a HC-05 Bluetooth shield from iTeadStudio. I also have similar problems trying to connect to a bluetooth dongle (with added serial connection) on my PC.
The basic AT-command communication works, but I haven't found out yet why AT+PAIR or AT+LINK are failing and what should be done to avoid this (I've done dozens of Serial Monitor command iterations). Until now I haven't found a command sequence that reliably connects. What I've tried so far (from different documentation and example codes):
Check general AT command set:
AT
> OK
Reset to default values:
AT+ORGL
> OK
Set master mode and check it:
AT+ROLE=1
> OK
AT+ROLE?
> +ROLE:1
> OK
Connect only to the specified bluetooth address:
AT+CMODE=0
> OK
Reset and initialize:
AT+RESET
> OK
AT+INIT
> OK
Configure inquiring mode:
AT+INQM=1,9,48
> OK
Inquire:
AT+INQ
> +INQ:12:34:567890:1F1F,7FFF
> OK
AT+STATE?
> +STATE:INQUIRING
Try to stop inquiring:
AT+INQC
> OK
AT+STATE?
> +STATE:INQUIRING
> OK
Reset and initialize again (otherwise we can't leave the inquiring state):
AT+RESET
> OK
AT+INIT
> OK
AT+STATE?
> +STATE:INITIALIZED
> OK
Try to pair with the found device (my PC asks for the 1234-password and creates a serial port):
AT+PAIR=12,34,567890,20
> OK
AT+STATE?
> +STATE:PAIRED
Try to connect
AT+BIND=12,34,567890
> OK
AT+LINK=12,34,567890
> FAIL
...
Does someone have some hints for finding the right sequence?