I am using Arduino Uno and HC05 Zs-040 Bluetooth module to establish a connection with ELM327 mini OBDII Bluetooth adapter.
I have tried more than 15 different sequences of AT commands and most of them works successfully and HC05 reply with "OK" with no errors.
When I switch off the power from the HC05 and reconnect it again to connect automatically to the MAC address stored in it during configuration, the HC05 connects to the ELM327 OBDII adapter for a time interval ranges from 2 to 5 seconds then the connection is lost. I was able to notice that from the LED blinking on the HC05. This process of connection and disconnection is repeated automatically and the LED on the HC05 blinks in different patterns. Also, I was able to connect to the ELM327 OBDII adapter using a python script and it connects to it (I did that at the same time when the HC05 was trying to connect to OBDII adapter which confirms that the connection between HC05 and the adapter was not established).
In addition, I was able to connect to ELM 327 adapter using Torque application and Bluetooth terminal application and both work fine.
Can anyone help me figuring out why does the connection is lost as soon as it is established?