Problem with HC-05 accessing the AT commands

I am new to bluetooth business. I'm using the Arduino Uno board with HC-05 module. I want to send AT commands through the serial monitor. I load the following code and send AT commands through the serial monitor. I dont see the AT command sent or response received on the serial monitor output window. I tried the same one on Arduino Mega as well. Still no response. Any help is appreciated..

#include <SoftwareSerial.h>

SoftwareSerial m(0,1); // rx, tx

void setup()

void loop()
if (m.available()) {
value =;
Serial.println("not available");



I tried connecting with my android device and send an input. but every time i send any input the serial monitor shows the serial is not availble. help me with this.
Thank you.

Google for Martyn Currey's gude on HC-05. Excellent tutorial.

You are using software serial on the hardware serial pins 0,1. This will never work. Use pins 7,8 instead and connect Bluetooth to them - Rx,Tx