Problems connecting reliably using HC-05 (as bluetooth master) 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
&gt; OK


Reset to default values:

AT+ORGL
&gt; OK


Set master mode and check it:

AT+ROLE=1
&gt; OK
AT+ROLE?
&gt; +ROLE:1
&gt; OK


Connect only to the specified bluetooth address:

AT+CMODE=0
&gt; OK


Reset and initialize:

AT+RESET
&gt; OK
AT+INIT
&gt; OK


Configure inquiring mode:

AT+INQM=1,9,48
&gt; OK


Inquire:

AT+INQ
&gt; +INQ:12:34:567890:1F1F,7FFF
&gt; OK
AT+STATE?
&gt; +STATE:INQUIRING


Try to stop inquiring:

AT+INQC
&gt; OK
AT+STATE?
&gt; +STATE:INQUIRING
&gt; OK


Reset and initialize again (otherwise we can't leave the inquiring state):

AT+RESET
&gt; OK
AT+INIT
&gt; OK
AT+STATE?
&gt; +STATE:INITIALIZED
&gt; 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
&gt; OK
AT+STATE?
&gt; +STATE:PAIRED


Try to connect

AT+BIND=12,34,567890
&gt; OK
AT+LINK=12,34,567890
&gt; FAIL
...


Does someone have some hints for finding the right sequence?
I am using a "BIND" between the PAIR and LINK:

AT+PAIR=98D3,31,FC2D54,5
AT+BIND=98D3,31,FC2D54
AT+LINK=98D3,31,FC2D54


That seems to work for me.

See the docs here:

ftp://imall.iteadstudio.com/Modules/IM120723009/DS_IM120723009.pdf