Error with the Arduino Serial Monitor

#include <SoftwareSerial.h>

SoftwareSerial bluetoothSerial(10, 11);  // RX, TX. Connect the HC-05 TX pin to 10 and RX pin to 11.

void setup() {
  Serial.begin(9600);
  bluetoothSerial.begin(9600);
}

void loop() {
  // Read data sent by the mobile device and send it to the Serial Monitor
  if (bluetoothSerial.available()) {
    char data = bluetoothSerial.read();
    Serial.print(data);
  }

  // Read data from the Serial Monitor and send it to the mobile device
  if (Serial.available()) {
    char data = Serial.read();
    bluetoothSerial.print(data);
  }
}

Does anyone know why the Arduino Serial Monitor isn't working for me? Also, I'm new to this topic, and previously the Serial Monitor was working fine. When I send any information, such as the AT command, I don't receive any response, and it's not reflected in the Serial Monitor.

Maybe you should try using .write() in place of .print()

Also check that the baud rate matches 9600 and try different line ending options in the serial monitor.

If I have the baud rate set at 9600, and I don't attempt to print any value on the serial monitor, whenever I write to the serial monitor, I see what I wrote. For example, when I use AT commands commonly used in the console, it doesn't let me execute any of them.

What @PaulRB means, change this print to a write

I had the same issue when first using my bluetooth module.

  1. Replace all "print(data);" with "write(data);"
  2. Check if you have a clone (e.g. CC2541) and change "No Line Ending" to "Both NL & CR".
  3. RX on the Bluetooth Module needs to be connected to TX on the Arduino and otherways. Try switching these.
  4. Check your baud rate of your Bluetooth Module

This code works for me:

SoftwareSerial bluetooth(2, 3);

void setup() {
  Serial.begin(9600);
  bluetooth.begin(2400);
}

void loop() {
  while (Serial.available()) {
    bluetooth.write(char(Serial.read()));
  }

  while (bluetooth.available()) {
    Serial.write(char(bluetooth.read()));
  }
}

@arduinofreak21 "I don't know if you're understanding the issue. What I mean is that when I write anything like "hello" on the serial monitor, it doesn't do anything for me, everything goes blank."

I'm working with an HC-05 Bluetooth module. Previously, I could use the console to send AT commands to the module and I would get the response "OK" on the serial monitor. Now, when I try to send AT commands, I don't get any response I've also tried sending different commands but I don't get any response either, can you help me to solve this problem and understand why I can't interact with the HC-05 module using AT commands anymore?

I don’t have a HC-05 Bluetooth module but the first thing you need to do is show us a good schematic of your proposed circuit.

Show us a good image of your ‘actual’ wiring.


In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.

Use the < CODE / > icon from the ‘posting menu’ to attach the copied sketch.


Is this circuit the same circuit that use to work ?


Have you tried a different module ?


Do the baud rates agree ?

Everything seems to be set up correctly as it matches what was done earlier in the project. However, when trying to send data through the console, the console doesn't respond as it should. For example, when I type "hello" and press send, the console goes blank and shows nothing. I've checked the connection and it seems to be fine, so I'm not sure what could be causing this problem.

Most likely errors in your code or settings.

Please do not cross post. Flagged for moderation.

1 Like

I have merged your cross-posts @vendo_bonai.

Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting can result in a suspension from the forum.

In the future, please only create one topic for each distinct subject matter. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.