Unable to detect Seeedstudio Bluetooth Shield

Hi, 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:

/* Upload this sketch into Seeeduino and press reset*/
 
#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 and… Nothing. LED marked as D1 is blinking, and D2 is switched off. The device is not detected by none of the three devices I’ve tried (two computers and a smartphone).
I tried to connect it to other UNO board (in case the first one was damaged), but the result is the same.
I thought that the shield is somehow damaged, so I had it replaced by a new one - but the results are still the same.

Summing up:

  • 3 extrnal devices
  • 2 Arduinos
  • 2 shields

Tested in all possible combinations, and still no success.

The device is powered up, because when I set it to send it’s status to A1 analog port I always read 0 instead of a random value.

The only logical conclusion is that there is something wrong with the code above, but every google search I’ve made pointed me exactly to that file. It’s on official wiki and in every example I’ve found. I’ve tried to contact Seeedstudio about it, but they didn’t have anything of value to add (“try rebooting until it works”).

Has anyone had similar problem, or has any advice how can I solve this problem?

DarthHunterix:
I’ve uploaded it to Arduino UNO, connected the shield and… Nothing. LED marked as D1 is blinking, and D2 is switched off. The device is not detected by any of the three devices I’ve tried (two computers and a smartphone).

There are two issues:

  1. connection with the other device. This all done at the other device. I assume D1 is the pairing signal LED. As long as the LED is blinking, Arduino is providing power and that is all that is required of it. This means that all the fiddling is with the other device, not Arduino.

  2. actual communication with the other device. You can’t do this until you have established the connection. There may be nothing wrong.

The only logical conclusion is that there is something wrong with the code above

I think the code is confusing junk, but there is probably nothing actually wrong with it - the way things are, you will never know until you have the pairing established.

The actual bluetooth module looks like a plain vanilla HC-0x. Therefore IF it truly is, and IF you have proper instructions for the shield that clearly show how to run this on HARDWARE serial, the following might be of use

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

One problem you might have is that the device is now set to 38400 and it is then defaulted at that speed, so you need to test it on both that and 9600 to communicate. This only applies to Arduino<>Bluetooth and has no bearing on establishing the connection.

Thanks for your reply.

The links you provided didn't work, but they helped me find a solution.

They've recommended using hardware serial port instead of SoftwareSerial, so I've changed the example code above accordingly. The device became visible, but only for a couple of seconds - then it vanished again.

But then I realized, that I'm still using USB as power supply, and that's not a good idea when you use serial communication with other device, so I powered up the board from battery and it finally worked, I can exchange data with my Arduino :)

Thanks a lot.