So, I'm having trouble connecting my android device to my HC-05 Bluetooth Module.
I've tried many different ways to connect it and to code it from all over the internet.
Every app that I use says "error 507: unable to connect. Is the device turned on?"
Can someone please help me?
1. Check that you have connected the HC05 Module with UNO as per following diagram. The voltage divider circuit is needed as the RX-pin of HC05 is not 5V tolerant.
2. Is the Red-LED of the BT Module continuously blinking?
3. Have you installed a Bluetooth Terminal (BTT) in your android based smart phone?
4. Check that the smart phone has detected your BT Module. If SN is asked, enter 0000 or 1234; they usually work.
5. Connect your BTT with the BT module. Check that the RED-LED is now blinking once a while.
6. Upload the following sketch in the flash of your UNO.
#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3); // SRX | STX
// Connect the HC-05 TX to Arduino pin 2(as SRX).
// Connect the HC-05 RX to Arduino pin 3 (as STX) through a voltage divider.
void setup()
{
Serial.begin(9600);
BTserial.begin(9600);
}
void loop()
{
if (BTserial.available())
{
byte x = BTserial.read();
Serial.write(x);
}
if (Serial.available())
{
byte y = Serial.read();
BTserial.write(y);
}
}
7. Check the functionality of the communication link:
BTT <----> BT <----> UNO <----> Serial Monitor
X_rramirez5411:
Did you configure the module in AT commands before connecting it to Android?
This is misleading. You can use HC-05 out of the box, and you may go through life, both its and yours, without ever sending an AT command.
Indeed, if you are new to bluetooth, you should avoid AT commands like the plague. All you need to know is the default baud rate. This is almost always 9600. In the highly unlikely event that it is something else, change the serial.begin command accordingly in the Arduino programme, and leave bluetooth alone.