WiFi Kit 32 Bluetooth to serial bridge

Hi

I am trying to get a simple Bluetooth to serial bridge working.

The following code is what I have:

#include "BluetoothSerial.h"
#include <HardwareSerial.h>


BluetoothSerial SerialBT;
HardwareSerial MySerial(2);





void setup() {
  MySerial.begin(9600, SERIAL_8N1, 16, 17);
  SerialBT.begin("wConsole");
  delay(4000);
}

void loop() {
  if (MySerial.available() > 0) {
    SerialBT.write(MySerial.read());
    
  }
  if (SerialBT.available() > 0) {
    MySerial.write(SerialBT.read());

    
  }
  delay(25);
}

The bridge works perfectly, however, the far end must send data first, else I am not able to use it.

Is there something I need to do in code so that I can send data first before it starts working? I should mention that no matter what, I get a connection to the board via Bluetooth, it just looks like it doesn’t relay that data down MySerial.

Thanks

Anyone have any ideas?

Did you get it working? I having troubles accessing a GPS Module…