good evening,
like i said in the title, i'm not getting any response from my hc-05 module when in AT mode.
pairing with my phone is working. the led on my module is indicating all states correctly (AT mode, paired, discovery).
i followed a tutorial and also used the code provided there. wiring is correct according to said tutorial.
tutorial:
http://www.instructables.com/id/Modify-The-HC-05-Bluetooth-Module-Defaults-Using-A/all/
wiring:
code:
/*
AUTHOR: Hazim Bitar (techbitar)
DATE: Aug 29, 2013
LICENSE: Public domain (use at your own risk)
CONTACT: techbitar at gmail dot com (techbitar.com)
*/
#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());
}
baudrate in serial monitor is set correctly and new line is set to \r\n
after i see "Enter AT commands:" in serial monitor i type AT, send it and nothing happens.
i tried to use bluetooth in a different project and failed to configure my module programatically, so i discovered that the source of evil is my module not responding to AT commands and now i'm trying to figure out why.
thanks in advance for any help