HC-05 Bluetooth

Hey guys I am running into some issues with my HC-05 BT module.

I would like to connect an Amazon Fire Phone (android) to the HC-05 module. My first attempt was to boot the BT module into AT mode and pair, bind, and link it to the phone. It would get through all that it has to do but the module would never actually connect to the phone and it would go into an infinite loop of attempting to connected but never succeeded. The next thing I tried was restoring the factory defaults of the HC-05 module and then booting it into data mode. I then found it on the phone’s BT list and clicked pair, put in the pass code “1234”. Again, they wont connect to each other and the phone says that it failed to connect with it. If I look at the serial monitor while this is occuring I get random gibberish as well. I also tried to connect the BT module to my computer but it said there was an error connecting to it as well…

Any ideas?

Side question: Data mode should allow and accept any connection by factory default?

#include <SoftwareSerial.h>

#define BT_VCC_Pin 2
SoftwareSerial bt(12,13); // RX, TX

/*
Directions:

BT:        Nano:
-------------------
VCC        Pin 2
GND        GND
RX         Pin 13
TX         Pin 12

*Serial monitor baud rate: 38400 
*Serial monitor line ending: Both NL & CR
*Upload the sketch
*While holding down the button on the BT chip start the serial monitor
*Let go of the button after 2 seconds
*/

void setup() {
  Serial.begin(38400);
  bt.begin(38400);

  pinMode(BT_VCC_Pin, OUTPUT);
  delay(500);
  digitalWrite(BT_VCC_Pin,HIGH);
  
}

void loop() {
  if (bt.available()) Serial.write(bt.read()); 
  if (Serial.available()) bt.write(Serial.read());
}

Thank you

38400 maybe to fast some are set 9600 that maybe whats happening

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf

Page 9:
Bluetooth will work as it comes out of the box. Don’t be tempted to fiddle with the
configuration, no AT+ commands, but note that you do need to know the baud rate of
Bluetooth, and set Arduino accordingly. It is normally 9600.
Leo..

be80be:
38400 maybe to fast some are set 9600 that maybe whats happening

Wawa:
http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf

Page 9:
Bluetooth will work as it comes out of the box. Don’t be tempted to fiddle with the
configuration, no AT+ commands, but note that you do need to know the baud rate of
Bluetooth, and set Arduino accordingly. It is normally 9600.
Leo…

Thanks for the response guys. I set the baud rate to 9600 and attempted to connect to the BT module again from both my computer and fire phone with the same result. I am able to get to the point where a password is required and then I enter the password and it says “we didn’t get any response from the device”

What seems to happen (looking at the light) is it starts the connection, the light jumps off, as if the device was reset, and then it continues to blink normally again as if its waiting for a connection. I have a feeling it’s a faulty module as of right now. Thoughts?

And, while you are at it, the gibberish on the serial monitor may be down to a baud rate mismatch as well.
"Booting into data mode" is just meaningless technobabble. The programme you post is for configuration, not communication. HC-05 is in communication mode by default.
Note that pairing and connecting are not the same. The former is done in the phone settings, and the latter in the phone app.
Pair, bind and link is a procedure to connect two Arduinos via bluetooth whereby you configure one Arduino as a master. This is not for data comms with the phone and, in any data comms with the the phone, the phone is always the master.

I have a feeling it's a faulty module as of right now.

Much more likely to be pilot error.

Nick_Pyner:
HC-05 is in communication mode by default.

Note that pairing and connecting are not the same.

Yes communication mode is more of what I meant.

On the computer I cannot pair or connect with the module but on my phone i can get it to pair but cannot open any communication with it. Do you know of any good BT terminal apps on google play?

Thanks

Bluetooth terminal is good if you didn't have one you don't no if it works at all you have to use.
A bluetooth terminal to send the password it has to be on the phone you scan The phone finds.
Then the bluetooth terminal as for password so the phone can setup to use it.

IF you can pair with the phone, all problems with doing the same with PC are at the PC end. Most PCs don't come with bluetooth, so it is a fair bet that the problem is with the bluetooth installation and nothing to do with Arduino.

Stay with the phone.

Pairing does not guarantee communication between Arduino and phone.

Everything you need to know is in reply #2.

Nick_Pyner:
Stay with the phone.

Pairing does not guarantee communication between Arduino and phone.

Everything you need to know is in reply #2.

I have another HC-05 BT module that I am able to pair to the phone, and then use a terminal application to talk with it so I know the way I am setting it up is correct. I pair the two through AT commands, on the phone it asks for the password, I enter it, and then check the connection status of the BT module with “AT+STATE” and it says “+STATE:PAIRED”. Now I can go into the terminal app and press “connect” and then it connects and talks to the device.

When I try to use the questionable BT module that won’t connect with anything I still get gibberish in the command when I try to inquire for devices using “AT+INQ”. I have tried setting the baud rate to 9600 but that did not help either. When ever I try to pair the module it gives me gibberish in the serial monitor when the good module gives me nothing in the serial monitor. Not sure what could be the issue besides some conflict with baud rates that I am not seeing…

Helicopter12:
I would like to connect an Amazon Fire Phone (android) to the HC-05 module.

Helicopter12:
I pair the two through AT commands

I submit that this is nonsense or, at best, incoherent. Or maybe you are describing two different projects. It might help if you restate exactly what you are trying to do.

If you are really trying to use Bluetooth with Android as clearly stated in the original post, you might note that people do this consistently and successfully, for years, without ever sending an AT command, and then re-read the last line of my previous - twice.

If you are trying to connect two Arduinos, each with an HC-05, you DO need to configure one with AT commands. Connecting 2 Arduinos by Bluetooth using a HC-05 and a HC-06: Pair, Bind, and Link | Martyn Currey

Nick_Pyner:
If you are really trying to use Bluetooth with Android as clearly stated in the original post, you might note that people do this consistently and successfully, for years, without ever sending an AT command, and then re-read the last line of my previous - twice.

My goal is to connect the HC-05 module to an Amazon Fire Phone so that I can use a terminal app and another testing application to interface with it. I have two HC-05 modules (one works exactly as expected, and the other does not connect to anything) that I am trying to work with. I am able to pair the good HC-05 module with the phone and use the terminal app on the phone to communicate with it. The other HC-05 module is the one that is giving me gibberish and won't connect to anything. I am able to get it paired (the phone says they are paired), but then when I try to connect (link) to the application the status of the HC-05 goes back to "pairable". Basically I also tried setting up the connection through the AT commands but everything works well until I get to the "AT+INQ" command and then it starts giving me gibberish instead of the device in the area that are available. What is throwing me off is that I can send it AT commands and it responds perfectly to them until try to use "AT+LINK" "AT+INQ", ect.

Does this clarify the issue abit more?

OK, at least you have one that does what you want. It is possible, just, that the other is a dud but any evidence of that is clouded by your insistence on using AT commands, and refusal to take heed of reply #2. I have heard of a dud HC-05, once. The bluetooth module was actually fine, but there was a solder bridge between the pins on the backboard. I guess your insistence at using AT commands implies this is not your problem. The best I can suggest is you send it its last AT command
AT + ORGL
and start over. If that doesn't work, I guess you are right, it's a dud, and it is time to write off the $3-50