Bluetooth HC-05 issue

I’m trying to get two HC-05 bluetooth modules to pair.

Using the code below, I’m able to get the module into AT mode, and issue some AT commands, however when I try to change roles or mac address, I get a garbled response. See picture below:

I’ve been using this as a reference:

Based on that instructable, I’m using the correct baud rate and settings for the serial monitor.

Could the module I’m using be corrupted?


AUTHOR: Hazim Bitar (techbitar)
DATE: Aug 29, 2013
LICENSE: Public domain (use at your own risk)
CONTACT: techbitar at gmail dot 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.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())

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

Probably not, more likely to be procedure. I have never heard of an Instructable that works. Conversely, I have never heard it reported that this doesn't

so it must be worth a try.

I have not used it myself but will do so soon.

The instructable that I'm following was used as a reference to by the blog that you link. Still no luck on my end.