Lab
Which baud rate do I need?
Four questions. The first one matters most, because two different faults get called “the baud rate” and only one of them is.
What this shows
Two different faults both get called a baud rate problem, and only one of them is. Garbage characters mean both ends are talking and disagree about speed. Silence usually means nothing is arriving at all.
A wrong rate produces wrong characters, never no characters. If the terminal is blank, check that TX goes to RX rather than TX to TX, that the board and the module share a ground, and that the module has power. Chasing the rate when the symptom is silence is the most common wasted afternoon in this topic.
For data, an HC-05, HC-06, HM-10 or CC41-A all default to 9600. For AT commands an HC-05 defaults to 38400, which is the mismatch that catches most people — the sketch and the monitor agree with each other at 9600 and neither is talking to the module.
Factory defaults only describe a module nobody has reconfigured. AT+UART persists across power cycles, so a second-hand module keeps whatever it was last given.
Common questions
- What baud rate should I use for an HC-05?
- 9600 for data and 38400 for AT command mode. Those are the factory defaults. An HC-05 that has had AT+UART run on it keeps the rate it was given, because the setting persists across power cycles.
- My serial output is blank, not garbled. Is it the baud rate?
- Almost certainly not. A wrong baud rate gives you wrong characters, not an empty terminal. Silence points at wiring — TX to RX crossed rather than TX to TX, a missing shared ground between the board and the module, or no power to the module.
- Both ends are set to 9600 and I still get garbage. Why?
- The Serial Monitor and the sketch agree with each other, which is why they appear to work, but neither is set to what the module expects. On an HC-05 in AT command mode that number is 38400.