AT-09 Bluetooth Module only sends last received data

Hi,

I'm working on a project where I'm trying to send data from an arduino to a raspberry Pi using an AT-09 bluetooth module. I'm currently testing the arduino side of things. I successfully connected to the device using the LightBlue app from my phone, and I am able to send data to the bluetooth module from my phone with no problem. However, when I try to send data to the phone (which is what I actually need to do), nothing happens. When I try to read from the phone, the last value sent by the phone is repeated back to me. There is no other response.

Also, I'm having trouble with the AT commands. The simple AT to check if everything's okay works fine, but if I use any other command (e.g. AT+VERSION, AT+UUID, etc.) it invariably responds with ERROR. To be clear, I'm not trying to use commands when my phone is connected, only when the LED is blinking.

Any help would be appreciated.

Please post your code in tags - otherwise we can't be much help

Apologies, the code is pretty simple for a test so I didn’t think I needed to.

#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3);

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

void loop()
{

  if (BTserial.available())
  {
    byte x = BTserial.read();
    Serial.write(x);
  }

  if (Serial.available())
  {
    byte y = Serial.read();
    BTserial.write(y);
  }
}