I have an HC-05, and I want to configure it as a master module. I know that I have to get it into AT mode, but I'm confused. Is the EN pin the key pin? How do you pull it into HIGH mode?
Furthermore, even when I get the LED on the module to blink slowly, which apparently means it's in AT mode, nothing comes up when I enter AT into the serial module! I'm more than a little bit frustrated, as you can probably tell
Can anyone help me?
Here is the code I'm using -
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); //Â TX,RX
char c = ' ';
boolean NL = true;
void setup()
{
 Serial.begin(9600);
 Serial.println("Sketch HC-05");
 Serial.println("Arduino with HC-05 is ready");
 Serial.println("Make sure Both NL & CR are set");
 Serial.println("");
 //Set to HC-05 default baud rate, found using AT+UART. It is usually 38400.
 BTSerial.begin(38400);
 Serial.println("BTserial started at 38400");
 Serial.println("");
Â
}
void loop()
{
 // Read from the Bluetooth module and send to the Arduino Serial Monitor
 if (BTSerial.available())
 {
  c = BTSerial.read();
  Serial.write(c);
 }
 // Read from the Serial Monitor and send to the Bluetooth module
 if (Serial.available())
 {
  c = Serial.read();
  BTSerial.write(c);
  // Echo the user input to the main window. The ">" character indicates the user entered text.
  if (NL) {
   Serial.print(">");
   NL = false;
  }
  Serial.write(c);
  if (c == 10) {
   NL = true;
  }
 }
}
Thanks a lot! I got the module to enter AT mode, but whenever I input any commands into the serial monitor, nothing shows up. When I enter AT, I don't get an ok or any sort of feedback. Is this normal, or am I doing something wrong?
Actually, never mind! Turns out by pressing the button on the EN pin I could get it to enter AT mode. Thanks a lot for your advice!
One last question: do I need to reconfigure the module every time? This sounds like a stupid question, I know, but I am a total newbie to this type of work. Thanks a lot!
HelloCA:
One last question: do I need to reconfigure the module every time? T
No. The config sticks until you change it. Did you really need to configure it in the first place? Most users don't.
The slow flash says you are in AT mode. If you have a button and you saw a slow flash before, it means you pressed the button before. If you get that and nothing on the monitor, it suggesst the comms wiring is wrong.
I'm so sorry for this, but I have a related question concerning the Bluetooth module. I want it to pair with another device (not another HC-05 module). I inputted the AT+INQ command while it was in AT mode, but nothing showed up on my screen and it didn't show up on my phone's list of Bluetooth devices in the area. Is this normal? Should something show up?
OK, I'm not sure what you are saying here. You say you want to configure it as a master, I ask why, but you still don't say. I don't suppose there is much point in asking again, but I might point out that one of the most common reasons for configuring as a master is so that it can pair with another HC-05, which you specifically deny.
As things are, I can't comment on the blank screen, other than as I said - your serial wring could be suss, thereby leaving Arduino with nothing to say to serial monitor and it didn't hear anything from it either.
If you are still in AT mode, slow flash, the phone will not see Bluetooth. That is normal. Fast flash means ready to connect, hence ready for phone to find me.
I'm so sorry about that! I'm trying to get my Arduino to connect to a Dexcom G5 sensor, which uses Bluetooth to transmit data. I needed my module to search for devices that are currently using Bluetooth, as I have no way to figure out the Bluetooth address of the specific sensor I'm trying to pair with. I needed the module to configure as a master module so that I can pair it with the sensor.
I am using the same wiring system that worked for me last time, but I don't receive anything back from the sensor. Even when I input the command AT, I do not receive the OK I got the last time I tried this same method.
I took the module out of AT mode before trying to look for it on my phone to test the connection, but I still was not able to find it. Is this normal?
HelloCA:
I'm so sorry about that! I'm trying to get my Arduino to connect to a Dexcom G5 sensor, which uses Bluetooth to transmit data. I needed my module to search for devices that are currently using Bluetooth, as I have no way to figure out the Bluetooth address of the specific sensor I'm trying to pair with. I needed the module to configure as a master module so that I can pair it with the sensor.
It sounds like you have a phone, so the easiest way to get the address is probably to sniff it with that.
I am using the same wiring system that worked for me last time, but I don't receive anything back from the sensor. Even when I input the command AT, I do not receive the OK I got the last time I tried this same method.
Probably because you are really doing something different. The other option is that you have destroyed the module but I don't think that is very easy, so I would go for the first.
I took the module out of AT mode before trying to look for it on my phone to test the connection, but I still was not able to find it. Is this normal?
No, if you have fast flash, the phone should find it. However, "normal" might be a relative term here. I'm guessing, but it is possible that the phone can't see Bluetooth because you have set it to talk exclusively to the sensor - or have tried. Since you seem adept at using AT mode, it might pay to reset Bluetooth to factory default, if only to prove that there is nothing vitally wrong with it.
I have a new mouse which I understand is bluetooth but it is truly plug'n'play, and the phone can't sniff it. This could be because it is bound to the dongle that came with it.
I was able to enter AT mode (don't know why that was flaky at first), but I reset the module anyways. Even after opening the connection mode, I still couldn't get the module to show up as a Bluetooth device. Since I was able to reset it successfully, I doubt there was anything wrong with the module, but I can't even bind it solely to the phone (I found its Bluetooth address)! Any thoughts?
It would indeed appear that Bluetooth is OK. I think it should be possible to bind to the phone as I assume that is what the bluetooth in the car does, but the phone does the binding, and this is probably a red herring anyway. I meant use the phone to get the address of Dexcom, which is, I understand, the real problem.
There may be a protocol problem with Dexcom and I think you can check this by7 ensuring that a standard terminal on the phone can read it. If so, I guess HC-05 can