SOLVED: Seeedstudio BT Shield

interesting...
i've had THE EXACT SAME problem about a month ago, also we were talking about it here:

bottom line there was about this:

As said before is probably due to some android's bt broadcomm module bug that does not allow to find Class of device code 0x00

and some semi working workarrounds.

as a result, i bought a new bluetooth module LM-400 and got it up and running in no time (after i figured out that the AT commands from the manual are outdated -> new firmware was on it).

did anyone else have any luck with the method sam_92 suggested a few posts up, so i know if i should take the shield i was already upset about for not working from the box again and give it another try?

Here i am uploading sketch file .look at download section below.login in to arduino forum to able to see uploaded files below.code is too big i am not able to write in post.I am using arduino UNO .make sure you are using older version of arduino like 0022 it won't compile in newer version 1.0 and later on.

For changing the baud rate you need to use USB to 232 breakout board. http://www.wide.hk/products.php?product=CP2102-USB-to-232-Breakout-Board you can use SScom32e software to configure the baud rate.
this sketch will definately work with seedstudio BT modem just make sure that you have configure the baud rate at 9600bps .i had done lot of work to get it work with this sheild. :slight_smile:
Hope you guys soon you will going to enjoy arduino commander it's awesome :slight_smile:
If you are facing any problem to changing the baud rate let me know i will post method to change baud rate of this sheild.

sketch_aug30a.pde (21.4 KB)

Sam1.txt (21 KB)

I am using a Shield, and this is still not working for me. Here is the code I am using:

#include <SoftwareSerial.h> //Software Serial Port
#define RxD 0
#define TxD 3

#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(9600); //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();
}

Any ideas? I am using Samsung Galaxy SII to try to connect, but I am unable to discover. Also the shield is blinking just green, two times per cycle.

This has to be a simple solution.For discover the sheild in your mobile phone red light on sheild must be blinking.First of all try this solution- Push reset switch loacted on arduino board.after pushing reset switch MCU will send the commands to set it to discover mode.

also make sure that you have chenged the baud rate of sheild at hardware level.otherwise u cannot see correct message which you had sent it from pc.if 9600bps does't work then try out with default sheild baud rate which is 38400bps.
Also check jumper connection on sheild .

I solved the problem! The board is labeled backwards; tx and rx need to be reversed in the code to get the board to run!

#define RxD 0

Why are you trying to use the hardware serial pin for software serial?

sam_92:
Here i am uploading sketch file .look at download section below.login in to arduino forum to able to see uploaded files below.code is too big i am not able to write in post.I am using arduino UNO .make sure you are using older version of arduino like 0022 it won't compile in newer version 1.0 and later on.

For changing the baud rate you need to use USB to 232 breakout board. http://www.wide.hk/products.php?product=CP2102-USB-to-232-Breakout-Board you can use SScom32e software to configure the baud rate.
this sketch will definately work with seedstudio BT modem just make sure that you have configure the baud rate at 9600bps .i had done lot of work to get it work with this sheild. :slight_smile:
Hope you guys soon you will going to enjoy arduino commander it's awesome :slight_smile:
If you are facing any problem to changing the baud rate let me know i will post method to change baud rate of this sheild.

I would very much appreciate a post to describe how to change the baud rate of the shield. I cannot figure out how to use the configuration commands.

OK, it's been a while but I have an update. I've got the Arduino Uno R3 with a Seeeduino BT shield able to scan for BT devices; which is what I wanted to start with.

/*  */
#include <SoftwareSerial.h>   //Software Serial Port

#define RxD 5
#define TxD 6
 
#define DEBUG_ENABLED  1

char recvChar;
String recvBuf;
String recvAddr;
String recvInq;

SoftwareSerial blueToothSerial(RxD,TxD);
 
void setup() 
{ 
  Serial.begin(9600);
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);
  setupBlueToothConnection();
  //wait 1 sec and flush the serial buffer
  delay(1000);
  Serial.flush();
  blueToothSerial.flush();
  Serial.println(" ");
  Serial.println("restarted....");
  Serial.println("Starting BTScan....");

} 

void loop()
{
  btScan();
}

void setupBlueToothConnection()
{
  blueToothSerial.begin(38400); //Set Bluetooth to 38400
  blueToothSerial.print("\r\n+STWMOD=1\r\n");//set bluetooth to master mode
  blueToothSerial.print("\r\n+STNA=PeddleComp\r\n");//set bluetooth name as "PeddleComp"
  blueToothSerial.print("\r\n+STAUTO=0\r\n");// no Auto-connection
  delay(2000); // This delay is required.
  blueToothSerial.flush();
  blueToothSerial.print("\r\n+INQ=1\r\n");//make the master inquire
  delay(2000); // This delay is required.
}
    
void btScan()  //scan for devices
{
  if (blueToothSerial.available())
  {
    recvChar = blueToothSerial.read();
    recvBuf += recvChar;
    if (((recvChar > 47) && (recvChar < 58)) || ((recvChar > 64) && (recvChar < 71)))  // get numbers and A-F only
    {
      recvAddr += recvChar;
      if(recvAddr.length()==12)
      {
        Serial.println(recvAddr);
        recvAddr = "";
        blueToothSerial.flush();
      }
    }
  }
}

If anyone knows a better way to trap the numbers and A-F only; please let me know. BASIC was my first language and that was on a 4K Trash-80 Model I.

If anyone knows a better way to trap the numbers and A-F only; please let me know.

    if ((recvChar >= '0' && recvChar <= '9') || (recvChar >= 'A' && recvChar <= 'F"))  // no comment needed

That's not really a better way; just a little more verbose.
Maybe I'll just write a hex trapping function.

I sent an email to the Arduino Commander people. Got the email from Google Play. They said that UNO R3 does not yet work for the Arduino Commander :confused: They have to get the board and work the bugs out :frowning:

Hopefully there's not that many bugs in there. I haven't been able to get any of the "Google Play" Bluetooth SPP apps to work.
Only what I've listed above about the Arduino being able to detect other Bluetooth devices. But I'm still working on it.

I have similar problem using the bluetooth shield, some phone are not able to see the Arduino while other can...
The code to initialize the BT connection it's just the same as you are using and I keep the baud rate to 38400...

This is an example with video that explain how it works using a Samsung 9003, while if I try to search Arduino and the related BT shiel using a Samsung Next I cannot find the device:-(

This is the link showing how it works on Samsung 9003, what is wrong? Any suggestion?

This is the BT setup source I use
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=E-Scooter\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();

Also I've the same problem, My phone is samsung galaxy ace with android 2.3.3

I am having the exact same problem. Using GS3 to connect to UNO R3 with Seeeduino Bluetooth shield. I tried the code listed at the begining of this thread and I was able to pair with the device but it will not connect in ArduinoCommander. Please keep us posted as to what you hear back from the ArduinoCommander people. Thanks.

total newb here.

i've tried several sketches for the BT shield and i can get "bluetooth inquirable", but i'm not getting the blinking red/green lights. i only get the standard green blinking light.

i've tried different pin locations and different sketches, but have yet to get the red/green blinking lights.

i'm using an uno r3 with the seeedstudio BT shield. any help would be appreciated as i'm about to go crazy.

I've the same problem. Jumpers and TX/RX pin are connected in the correct way but only the green led is blinking...

Replacing any instances of "NewSoftSerial" with "SoftwareSerial" should work with the SeeedStudio Bluetooth demo code. It worked fine for me but only after I downloaded Arduino Version 1.0 (deleted Ver 1.0.5). It was only then (after hours of messing with 1.0.5) that it finally uploaded to my Uno. After that, blinking red and green status lights and paired with my Samsung Galaxy SIII just fine. Using Bluetooth SPP on the GS3 and everythings hunky dory. Good Luck.

This is marked as solved, but it doesn't seem like anyone solved anything! Am I missing something? What is the solution?

glad to know there's more people out there that are sharing my frustrations :stuck_out_tongue: however I've been trying to connect my arduino and the seedstudio shield to a wiimote instead of a phone and i was wondering if any of you have done this or may be of assistance ....Thanks