For Bluetooth communication, I set up a SoftwareSerial port at 38400 Baud. With help of micros(), I measure about 30ms for only 1 byte, which I find extremly slow.
I don't see anything in my code, which could slow it down...
Client:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(13, 10); // RX, TX
long sendtime = 0;
long receivetime = 0;
void setup() {
 Serial.begin(38400);
 pinMode(9, OUTPUT);
 digitalWrite(9, HIGH);
 mySerial.begin(38400);
}
void loop() {
 sendtime = micros();
 mySerial.print("A");
 while ((char)mySerial.read() != 'A') {}
 receivetime = micros();
 Serial.println(String((receivetime - sendtime) / 1000.0) + "ms");
 delay(500);
}
Server:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(A5, A4);//rx tx
void setup() {
 mySerial.begin(38400);
}
void loop() {
 while ((char)mySerial.read() != 'A') {}
 mySerial.print("A1E");
}
Oh, it works properly. Everything is sent and received just fine, no losses, no scrambled data.
My only problem is, that it takes so long and I don't understand why.
A bluetooth connection with these HC-05 and HC-06 modules should be completely transparent, just as if you used wire.
But serial communication over wire does not take 30ms
couka:
A bluetooth connection with these HC-05 and HC-06 modules should be completely transparent, just as if you used wire.
But serial communication over wire does not take 30ms
I think this is nonsense. Software serial is not the same as hardware serial. You are specifically complaining about bluetooth connection with software serial and implying the bleeding obvious - that communication over wire with hardware serial is fine. This seems to be an apples and oranges situation. Have you actually tested the wire connection with software serial?
couka:
Oh, it works properly. Everything is sent and received just fine, no losses, no scrambled data.
My only problem is, that it takes so long and I don't understand why.
I find it hard to reconcile the phrases I have highlighted.