Seeed Bluetooth Shield Cannot Get into Pairing Mode (alternating red/green blink

Hello,

I have an arduino UNO and a Seeed bluetooth shield. I am using the same sample code that everybody has been using downloaded from the website, and correctly set up the jumpers (so that in the code where I have RxD 6, I connect BT_TX 6 and Digital, and for TxD 7, I connect BT_RX 7 and Digital). I also tried moving these numbers and the jumpers around, but that didn’t seem to have any different effect. Code included below.

My problem is that I cannot get from the double green flashing (idle mode) to the alternating red/green blinking (pairable mode), which would indicate that I can pair it with other bluetooth devices. I have confirmed from several computers and my phone that the Seeed shield is not discoverable. Can anyone offer any help or suggestions? Thank you!

#include <SoftwareSerial.h>   //Software Serial Port
#define RxD 6
#define TxD 7
 
#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
      recvChar = blueToothSerial.read();
      Serial.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();
}

I have confirmed from several computers and my phone that the Seeed shield is not discoverable.

I don't have that shield, but do have BT modules identical to the one on the shield. As soon as I power them up, they are discoverable from my Android tablet and Samsung Galaxy [Android] phone. I then pair them using the Android device. This is all done exclusive of any program running on the Arduino.

Thanks for your reply! It's interesting that works for you, the documentation seems to suggest that the code sets it up (and we can tell from the alternating red/green blinking), but perhaps I am not understanding it correctly.

Do you have any suggestions on how to fix it? The arduino+shield aren't discoverable for me. Thanks!

I’m not all that familiar with this stuff, just indicating what worked for me.

First off, I’ve never had any luck with SoftSerial myself.

Secondly, did you get that sketch to work, and the BT module to reply back successfully? it’s possible your sketch has actually put the BT module into some funny mode, as they appear to automatically save whatever config info you send to them.

Thirdly, I would try discovering and pairing the BT modules by simply powering up, and NOT running the Arduino sketch, or running a blank sketch that doesn’t specficially talk to the BT module. See if it pairs.

Fourthly, there may be a command that resets the BT module back to default mode, I’d try that too.

You notice the line that says

BlueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me

That indicates to me it needs to be already paired up previously.