0

I have a problem regarding Seeedstudio Bluetooth shield http://www.seeedstudio.com/depot/Bluetooth-Shield-p-866.html

I can't detect its presence by any other devices.

The code I uploaded to Arduino is a standard example for slave device from the library:

#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've uploaded it to Arduino UNO, connected the shield.

LED marked as D1 is blinking green, and D2 is switched off. The device is not detected by none of the devices I've tried

Please Help Me

1
  • Have you checked if you set the jumpers correctly?
    – Handoko
    Commented Jun 26, 2015 at 20:51

1 Answer 1

1

As per this site: http://www.rjanick.com/2012/11/26/seeed-studio-bluetooth-shield/

Try switching the #define rxd and #define txd pin numbers in the code, inversely corresponding to the ones that the jumpers are connected to on the board.

For instance: my pins are jumped from the BT_TX line to digital 6 (and BT_RX to pin 7), so in the code I write #define TxD 7, and RxD 6. This made the board's LEDs blink differently (red blinks on D2 until connection).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.