Over 3 months i purchased three identical 6 pin HC-05 Bluetooth boards, so i thought ![]()
Looking at these boards they are identical & that's where the similarity ends :*
Techbitar wrote a nice article on using the HC-05 and how to enter AT mode, this article covers all 3 devices, except not all AT Commands work for all 3 devices.
There are 3 implementations of firmware, HC05, BTM5 & EGBT5 =(
If your struggling just getting an OK in serial console, go to the bottom of the arduino console and choose "Both NL & CR" New line & Carriage Return.
See attatchments ![]()
/*
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 (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());
}
low2high
Unplug the 5v to the Bluetooth device, putting it back while your arduino is connected will bring it back to AT mode, if the module is blinking off & on every 2 seconds your in AT mode ![]()
Key mode can either be low2high or high2low
high2low
While connected remove the key wire.
*Note; My 3 bt devices have 5v & 3.3v pins , therefore i am using the 5v pin.
BTM5_AT_COMMAND_User_Guide.pdf (494 KB)
EGBT-045MS-046S Bluetooth Module Manual rev 1r0.pdf (369 KB)
