Bluetooth pairing with HC-05 and ELM327 (Mega 2560)


I’m building a DIY OBD2 reader/LCD display unit with HC-05 Bluetooth module, using ELM327 OBD2 module.

I have 2 ELM327 units, the 00:1D.A5:68:98:8B abd …8C addresses. I cunfigured HC-05 via instructions of this homepage: Arduino OBD2 ELM327 I2C-LCD HC05 Bluetooth : 4 Steps - Instructables

The set up was successfull, I can use …8B ELM327 module with my Arduino unit; BUT if I connect to the car the …8C ELM327, the Arduino unit doesn’t recognizes it, because of I set up byTerminal BT address as …8B.

Can You recommend me a small routine, which I can write to my sketch, and the unit can pair itself with the ELM327 every times of startup?

Thanks: rcph

ladajpg.c (56.2 KB)

MEGA2560-HC05_ELM327_0011.ino (10.3 KB)


  • AT+ROLE=1
  • AT+CMODE=0
  • AT+BIND=0011,22,334455 //Replace with MAC Address of ELM327
  • AT+PAIR=0011,22,334455,20 //Replace with MAC Address of ELM327, 20 is the timeout value
  • AT+LINK=0011,22,334455 //Replace with MAC Address of ELM327

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.