Bluetooth shield to PC:connects OK, but only one way comm

Subject says it all: I use the demo code to setup the bluetooth shield as a slave. I have a linux PC with a BT dongle.
Connection is OK using gtkterm as serial terminal and the arduino serial term to the arduino.
If I send chars from the arduino serial term to the bluetooth shield, it is received in the gtkterm window (the one connected to /dev/rfcomm0), but not the other way around: if I type something in gtkterm it does not appear in the serial term window.
It’s like its only one-way comm!
The speeds are ok: 9600 for /dev/ttyUSB0 and 38400 for /dev/rfcomm0.
Any idea?
TIA

Hi there,
Can you provide your code ?

Deray

Hi,
firstly there is in fact 2-way communications, but from arduino to remote PC it is perfect (BTW I can use whatever baudrate on the remote PC and it works!), but the other way around, I only get mostly chars with 255 ascii codes, and also, it is not 1-1, that is I can try to send 10 chars and get only 4 or 5 chars. Moreover if I hold a key on the remote PC I get mostly 255-ascii coded chars but sometimes also 254, or others, but almost the higher 4bits are all set that is in hexa it is: Fx where x is different from time to time.
Here is the code (it is very similar to the example code):

#include <SoftwareSerial.h>   //Software Serial Port
#define RxD 7
#define TxD 6
 
#define DEBUG_ENABLED  1
 
SoftwareSerial blueToothSerial(RxD,TxD);
 
void setup() 
{ 
  Serial.begin(9600);
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);
  setupBlueToothConnection();
 
} 
 
void loop() 
{ 
  char recvChar;
  while(1){
    if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
      Serial.println("available!!");
      recvChar = blueToothSerial.read();
      Serial.print(recvChar);
      blueToothSerial.print(recvChar);
    }
    if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
      recvChar  = Serial.read();
      blueToothSerial.print(recvChar);
    }
  }
} 
 
void setupBlueToothConnection()
{
  blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
  blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode
  blueToothSerial.print("\r\n+STNA=SeeedBTSlave\r\n"); //set the bluetooth name as "SeeedBTSlave"
  blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me
  blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here
  delay(2000); // This delay is required.
  blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable 
  Serial.println("The slave bluetooth is inquirable!");
  delay(2000); // This delay is required.
  blueToothSerial.flush();
}

Set all baudrates to 9600.

OK thanks will try that ASAP and report here.

OK it is fixed now but for another reason: I changed the RX pin to another one and now it works. It really is weird as I am pretty sure I tried with another board (an UNO actually) and it did not work. Anyway its probably my Duemilanove which is abit borked somehow.
Thanks.