Problem transmission Mega 2560 R3 and Bluetooth Parani SD200

Hi all
I try to connect sd200 - mega 2560 as:

SD200 - Mega2560 :

Tx(2) - Rx1(19)
Rx(3)- Tx1(18)
GND(5)- GND
VCC(9)- 5V(arduino)

after connect Rx led on SD200 always on , this mean TX0(18) on arduino is HIGH value ( this status is correct or not ?)

I try use simple code :


void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
if (Serial1.available()) {
Serial.write(Serial1.read());
}
if (Serial.available()>0)
{
Serial1.write(Serial.read());

}
}

my problem : when I send character form mobile phone to Arduino via Bluetooth I received miss character on Serial monitor on PC.

PS: I already try transmission between mobile phone and SD200 via serial port of PC (hyper teminal) everthing OK.

Any body can help me whats problem in my case
Thanks all!

You say you are connected to

tuninh:
Tx(2) - Rx0(19)
Rx(3)- Tx0(18)

but Rx0 is pin 0 and Tx0 is pin 1. If you connect it up to the proper pins, it might work.

Sorry I miss typing Tx1, Rx1

The code is junk anyway, and doesn't compile.

Try this

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

and work your way to two channels from there

@Nick_Pyner
thanks for you help!
Between PC(serial monitor) and arduino is no problem , only problem mistake character when transmission from Bluetooth to any hardware serial port on arduino .
BTW: how about my Rx led on Bluetooth it away on event arduino not send any to Bluetooth, when i plug this Bluetooth to Serial port on PC normal Rx,Tx led is off , only flash when transfer data.

Nick_Pyner:
The code is junk anyway, and doesn't compile.

Try this

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

and work your way to two channels from there

tuninh:
Between PC(serial monitor) and arduino is no problem

I can only assume you are using a different programme for this. The code you posted will not compile and therefore cannot be used. That is, with IDE v1.0.1 but that is probably irrelevant. I cannot comment on the hardware as I don't know anything about it.. The devices I use only flashes when there is no connection.

void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
if (Serial1.available()) {
Serial.write(Serial1.read());
}
if (Serial.available()>0)
{
Serial1.write(Serial.read());

}
}

I try very simple code try to check
Serial port send & received from my laptop is OK
but Serial1 send & received from mobi phone via Bluetooth like this: "y=W+•…??Õå]y=y=^X¬¬W]ý"

I use IDE V1.5.6 beta version. ( old version same problem)

[/quote]

I can only assume you are using a different programme for this. The code you posted will not compile and therefore cannot be used. That is, with IDE v1.0.1 but that is probably irrelevant. I cannot comment on the hardware as I don't know anything about it.. The devices I use only flashes when there is no connection.
[/quote]

What sort of mobile phone are you using?

Please don't tell me it's an iPhone.

The code complies kosher but I recommend you stick to one port Rx0,Tx0 both ways as I outlined.

I use "BT teminal" on windows phone this software work perfect when I connect SD200 to PC ( hyperterminal).
I also try on Rx0 and Tx0 same problem,

I try to check Tx pin, keep on 4.5V (high) after Serial1.begin(); this normal or not?

Nick_Pyner:
What sort of mobile phone are you using?

Please don't tell me it's an iPhone.

The code complies kosher but I recommend you stick to one port Rx0,Tx0 both ways as I outlined.

Did you connect the same bluetooth to a PC and then you able to talk two way via bluetooth to your windows phone?
If so, I guess this confirms that the SD200 is OK with a windows phone and there is nothing fundamentally wrong with the phone or the SD200.

Try running the single channel code I mentioned.

windows phone > SD200 > PC (hyperterminal) can talk two way, send & received OK.
Arduino > PC (serial monitor) two way talk OK.

single chanel code also try but same problem.

Nick_Pyner:
Did you connect the same bluetooth to a PC and then you able to talk two way via bluetooth to your windows phone?
If so, I guess this confirms that the SD200 is OK with a windows phone and there is nothing fundamentally wrong with the phone or the SD200.

Try running the single channel code I mentioned.

tuninh:
I try to check Tx pin, keep on 4.5V (high) after Serial1.begin(); this normal or not?

I'm afraid I'm lost with this one. I would have expected 5v on the pin but I would not think 4.5v is a problem.