Bluetooth mate & Arduino Connectivity Issues

Hi all,

Once again, the old 'I'm new' thing...

I'm connecting a Bluetooth Mate Silver Module to the Arduino Uno, sending that to my Android device, and using the 'software serial' library...

When data is being written to the Arduino, tx flashes, appears in the serial monitor
When writing in the serial monitor, rx flashes, no data appears on the Android (Android code checked and double checked, all ok)

Here is the code I'm using;

#include <SoftwareSerial.h>

SoftwareSerial mySerial(8, 9);

void setup() {
Serial.begin(57600);
Serial.println("Hello, Serial Monitor");

// The data rate for the SoftwareSerial port needs to
// match the data rate for your bluetooth board.
mySerial.begin(115200);
mySerial.println("Hello, Bluetooth");
}

void loop() {
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}

My second problem; my Uno only receives data when connected to the computer..?

Hence,

  1. how can I actively send data to my Android (the bluetooth is paired, I've reset it, paired it again, and I'm starting to think it must be something to do with either the software serial code or hardware issue??
  2. Why won't my device receive data without being connected to the computer (I'm using a 9V battery as replacement)?

Any help on this would be brilliant,
Many thanks.

When data is being written to the Arduino, tx flashes, appears in the serial monitor

Being sent to it from what? Not the bluetooth connection.

When writing in the serial monitor, rx flashes, no data appears on the Android (Android code checked and double checked, all ok)

What do you mean by "when writing in the serial monitor"? When the Arduino sends data to the serial monitor, or when you type something and press send?

  1. Why won't my device receive data without being connected to the computer (I'm using a 9V battery as replacement)?

How do you know it doesn't? With that code, the only proof you have that data came from the bluetooth is that it appears in the serial monitor. Taking away the ability to see data in the serial monitor does not prove that the Arduino isn't receiving data.