# HC-05 bluetooth module not receiving data

**URL:** <https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617>\
**Category:** Programming\
**Created:** [November 24, 2021, 5:48pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617 "2021-11-24T17:48:30Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 6:53pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/22 "2021-11-24T18:53:41Z")

</div>

pin 12 is piezo buzzer

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 6:54pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/23 "2021-11-24T18:54:22Z")

</div>

@Brazilino my phone is paired

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 24, 2021, 6:56pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/24 "2021-11-24T18:56:10Z")

</div>

Perhaps there is an issue with the buzzer.

Set pin 13 as an output and add this to your code. Does the led blink with the 'b'?

```cpp
if (incoming_value == 'b') {
      tone(12, 2000);
      delay(50);
      noTone(12);
      digitalWrite(13, HIGH);
      delay(2000);
      digitalWrite(13,LOW);  
    }

```

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 6:56pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/25 "2021-11-24T18:56:43Z")

</div>

ok i'll try that

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 6:58pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/26 "2021-11-24T18:58:58Z")

</div>

it's not flashing ☹

---

<div class="post-metadata">

**Author:** ![Brazilino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/brazilino/32/1198404_2.png) [@Brazilino](https://forum.arduino.cc/u/Brazilino)\
**Post date:** [November 24, 2021, 7:02pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/27 "2021-11-24T19:02:04Z")

</div>

> [@cattledog](#):
>
> Perhaps there is an issue with the buzzer.

I don´t think so, but any attempt is valid.

> [@BigTogepi](#):
>
> my problem is that hc05.available() always returns 0. so it never works.

This suggests that the module isn´t receiving info from the phone. The unsuccesfull test with the terminal also suggests the same.

Did you try different baud rates? Have you used this module before? Unfortunately you can have a deffective one.

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:03pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/28 "2021-11-24T19:03:41Z")

</div>

well, when i first wired up the module i didn't have a voltage divider on it because i didn't know i needed one. however, i realized i needed it from online tutorials recently. so could it be broken then? or do you think its baud rate? I've already tried 9600 and 34800.

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 24, 2021, 7:04pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/29 "2021-11-24T19:04:11Z")

</div>

When connected with the phone, what is the flash pattern of the indicator led on the module.

Do you see a pattern of 2 rapid flashes (on, off, on, off, takes ≈ 1 second) then a pause (off) of several seconds?

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:04pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/30 "2021-11-24T19:04:36Z")

</div>

yes. 2 rapid flashes then a pause

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 24, 2021, 7:09pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/31 "2021-11-24T19:09:41Z")

</div>

The modules are pretty robust and many people run without the voltage divider on the module RX.

Everything is working correctly in my tests with the Morich Serial Terminal App.

How is the module being powered?  
Can you attach of photo of the module wiring to the Arduino? If you are in actuallity connected as you have stated and you have tried different baud rates then it is possible the module is defective.

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:10pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/32 "2021-11-24T19:10:06Z")

</div>

ok give me a sec

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:14pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/33 "2021-11-24T19:14:42Z")

</div>

![IMG_20211124_191106](https://europe1.discourse-cdn.com/arduino/original/4X/0/2/0/020ad295c9536bf79771c5af8eec98dc429d181d.jpeg)  
here is the wiring

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 24, 2021, 7:29pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/34 "2021-11-24T19:29:06Z")

</div>

I see you are using a Micro. Note this from the software serial reference.

- Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

With the Micro, you are better of to use Serial1 on the RX/TX pins instead of software serial. Serial1 is separate from the USB serial.

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:30pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/35 "2021-11-24T19:30:26Z")

</div>

ok. where might i find a code example?

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 24, 2021, 7:39pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/36 "2021-11-24T19:39:14Z")

</div>

Micro pins  
`0(RX), 1(TX)`  
Just connect the module Tx to 0 and module Rx to 1.  
Use Serial1.begin(9600) and change all reference to software serial to Serial1.

You can certainly try software serial on pins which are correct for the micro.

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:39pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/37 "2021-11-24T19:39:38Z")

</div>

ok so instead of using bluetoothSerial.begin() use Serial1.begin?

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 24, 2021, 7:40pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/38 "2021-11-24T19:40:32Z")

</div>

Yes. Post your revised code if there are issues.

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:40pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/39 "2021-11-24T19:40:52Z")

</div>

ok i'll try that

---

<div class="post-metadata">

**Author:** ![BigTogepi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bigtogepi/32/503566_2.png) [@BigTogepi](https://forum.arduino.cc/u/BigTogepi)\
**Post date:** [November 24, 2021, 7:42pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/40 "2021-11-24T19:42:43Z")

</div>

its working thanks!

---

<div class="post-metadata">

**Author:** ![Brazilino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/brazilino/32/1198404_2.png) [@Brazilino](https://forum.arduino.cc/u/Brazilino)\
**Post date:** [November 24, 2021, 7:45pm UTC](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617/41 "2021-11-24T19:45:20Z")

</div>

Good one!

Another possible unrelated issues:

- some Buzzers need ~70mA to work properly. Micro can give you 20 mA in a digital pin like the one you´re using (12). Even if bluetooth is working properly, the circuit as a whole maybe won´t.

- I believe that part of your voltage divider in misconnected. One of your resistors seems to be attached to D15 port:

![image](https://europe1.discourse-cdn.com/arduino/original/4X/4/2/c/42c19e0c74f4b45e1145190e2aad2ae8787e2e93.jpeg)

- What about all those crumpled pins? If you can, try to isolate just the HC-05 and the Micro to see if they work.

[Previous page](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617.md?page=1)

[Next page](https://forum.arduino.cc/t/hc-05-bluetooth-module-not-receiving-data/928617.md?page=3)
