Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please be gentle with me. I am attempting to modify the configurations of my HC-05 bluetooth module by using the AT command set. The method by which I'm trying to do this is by implementing the following connection:

HC-05 GND --> Arduino GND; HC-05 3.3v --> Arduino 3.3V; HC-05 TX --> Arduino Pin 10; HC-05 RX --> Arduino Pin 11; HC-05 KEY --> Arduino Pin 9

enter image description here

This is the code which I uploaded to my Arduino (btw my arduino uno is an SMD clone): (code's from http://www.instructables.com/id/Modify-The-HC-05-Bluetooth-Module-Defaults-Using-A/step2/The-Arduino-Code-for-HC-05-Command-Mode/)

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(10, 11); // RX | TX


void setup() {
  pinMode(9, OUTPUT);  // this pin will pull the HC-05 pin 34 (key pin) HIGH to switch module to AT mode
  digitalWrite(9, HIGH);
  Serial.begin(9600);
  Serial.println("Enter AT commands:");
  BTSerial.begin(38400);  // HC-05 default speed in AT command more

 }

void loop() {
  // Keep reading from HC-05 and send to Arduino Serial Monitor
  if (BTSerial.available())
    Serial.write(BTSerial.read());

  // Keep reading from Arduino Serial Monitor and send to HC-05
  if (Serial.available())
    BTSerial.write(Serial.read());

}

The problem is I can't seem to activate the AT mode. I don't get any response from the Serial Monitor whatever AT command I try. I double-checked the wiring and it's all good. I can't figure out what the problem is.

share|improve this question
    
I have one question, I was told that you need to reduce the voltage of the Rx pin (pin 2) to 3.3V, otherwise it would have some problems because the Arduino's voltage on pin 11 is 5 V. Does it work in your case? – user17217 Feb 10 at 13:53
    
Yes it works fine. My HC05 is not experiencing any problems. Besides, the Rx pin is a serial pin and it is usually wired directly to the Tx pin of the arduino (which produces pulses of 5V) to make serial communications between the board and the hc05, so I don't think you should reduce it to 3.3V. The rx pin might not be able to read the serial data if the pulse level is reduced. – Rej Averion Feb 18 at 2:08
up vote 1 down vote accepted

After 3 hours I magically solved my pretty simple problem myself. If you wired the HC-05 and arduino correctly, the module should indicate that it's in AT Mode by blinking the LED in an interval of 2 seconds. You should get response in the Serial Monitor by typing the AT commands by switching from "No line ending" to "Both NL and CR". That's about it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.