This post is edited after Robin2's comment
I wrote a code for simple data transmission between an android smart phone and arduino UNO. it was working fine just last week.but now it isn't!.
I transmitted data between PC and android phone and printed them on Serial monitor and android device.i took off wires and made a small robot working with IR remote control.then I wanted to control robot by bluetooth but now just i could send data from arduino to android device and Serial monitor doesn't print anything.
actually if (BTSerial.available()) doesn't work, but if (Serial.available()) works correctly.
I completely disconnected every thing from Arduino and just bluetooth module is connected to it as show below, but still not working.![]()

it's code:
#include <SoftwareSerial.h>
SoftwareSerial BT(2,3);
void setup() {
Serial.begin(9600);
BT.begin(9600);
}
void loop() {
if(Serial.available())
BT.write(Serial.read());
if(BT.available())
Serial.write(BT.read());
}
when i take off wire from pin 2 Serial monitor prints some odd characters. it shows Serial is working and problem is from module probably.by adding a " Serial.print("hello"); " to first if, I realized " if(BTSerial.available()) " is not running at all when i send information by phone:
#include <SoftwareSerial.h>
SoftwareSerial BT(2,3);
void setup() {
Serial.begin(9600);
BT.begin(9600);
}
void loop() {
if(Serial.available())
BT.write(Serial.read());
if(BT.available()){
Serial.write(BT.read());
Serial.println("HELLO");
}
}
i used several bluetooth terminals but couldn't solve it.
can it be a hardware problem or there is a problem in configuration?
Thanks.