Grove - Serial Bluetooth: Connection problem

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, salmanfarisvp, jeremy882, crail.lyu969

Post Reply
emilio.veronesi
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Apr 17, 2012 9:24 pm

Grove - Serial Bluetooth: Connection problem

Post by emilio.veronesi » Tue Apr 17, 2012 9:35 pm

I have a module connected correctly with ArduinoUNO,(Tx, Rx, Vcc=5V ,GND), led d1 green blinks 2 times/ s, but when i search device with my pc(with debian or win7) and with my android phone, don't find the bluetooth Grove module!!!

I tried with two Grove Blue module and behave the same way.

I followed the guide on wiki page.

where wrong???? :(

Someone help me??? Thanks

User avatar
deray
Elementary-3
Elementary-3
Posts: 327
Joined: Fri Mar 30, 2012 1:45 pm

Re: Grove - Serial Bluetooth: Connection problem

Post by deray » Wed Apr 18, 2012 9:13 am

you should see which pin of Arduino be used to connect Bluetooth(RX,TX);
furthermore , see the wiki more carefully . if you still can't succeed , it is better to sent the picture that show the way you connected and the code you have used.

emilio.veronesi
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Apr 17, 2012 9:24 pm

Re: Grove - Serial Bluetooth: Connection problem

Post by emilio.veronesi » Wed Apr 18, 2012 3:38 pm

The problem isn't the code, but the search!when searching the device don't find it, I'm not using any code yet!!! :(

Thanks :cry:

emilio.veronesi
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Apr 17, 2012 9:24 pm

Re: Grove - Serial Bluetooth: Connection problem

Post by emilio.veronesi » Wed Apr 18, 2012 3:58 pm

led d1 green blinks 2 times/ s

http://imageshack.us/photo/my-images/406/img087q.jpg

when i search device with my pc don't find the bluetooth...

http://imageshack.us/photo/my-images/70 ... mataml.png

Someone help me??? Thanks

schmron
Elementary-1
Elementary-1
Posts: 145
Joined: Mon Dec 05, 2011 6:12 am

Re: Grove - Serial Bluetooth: Connection problem

Post by schmron » Thu Apr 19, 2012 1:28 am

emilio.veronesi wrote:led d1 green blinks 2 times/ s
Your module is paired (2 times/s = paired). You must reset your grove module.
It must blink green and red...

Set correct baudrate on your µC and send all config strings to the module.
Best regards from Vienna/Austria
Rony

emilio.veronesi
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Apr 17, 2012 9:24 pm

Re: Grove - Serial Bluetooth: Connection problem

Post by emilio.veronesi » Fri Apr 20, 2012 1:03 am

This is the sketch that i used with arduinoUNO, and the bluetooth module connected with pin Rx=0 Tx=1, but doesn't work!
I've not used the softserial lib...

Code: Select all

#define DEBUG_ENABLED  1

void setup() 
{ 
    setupBlueToothConnection(); 
} 
 
void loop() 
{ 
 
  if(Serial.read() == 'a')
 
  {
    Serial.println("You are connected to Serial Bluetooth Grove");
    //You can write you BT communication logic here
  }
 
} 
 
void setupBlueToothConnection()
{
    Serial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
    delay(1000);
    sendBlueToothCommand("\r\n+STWMOD=0\r\n");
    sendBlueToothCommand("\r\n+STNA=eSense1\r\n");
    sendBlueToothCommand("\r\n+STAUTO=0\r\n");
    sendBlueToothCommand("\r\n+STOAUT=1\r\n");
    sendBlueToothCommand("\r\n +STPIN=0000\r\n");
    delay(2000); // This delay is required.
    sendBlueToothCommand("\r\n+INQ=1\r\n");
    delay(2000); // This delay is required.
 
}
 
//Checks if the response "OK" is received.
void CheckOK()
{
  char a,b;
  while(1)
  {
    if(int len = Serial.available())
    {
    a = Serial.read();
 
    if('O' == a)
    {
      b = Serial.read();
      if('K' == b)
      {
        break;
      }
 
    }
   }
  }
 
  while( (a = Serial.read()) != -1)
  {
    //Wait until all response chars are received
  }
}
 
//Send the command to Serial Bluetooth Grove 
void sendBlueToothCommand(char command[])
{
    Serial.print(command);
    CheckOK();   
}
where wrong? :cry:

Thanks

sebastianfre555
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Thu Apr 19, 2012 5:34 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: BT-Shield

Re: Grove - Serial Bluetooth: Connection problem

Post by sebastianfre555 » Fri Apr 20, 2012 2:25 am

I have a similar Problem. But i think if your Green Led blinks its cause you reversed the tx and rx pins or the Bluetooth moduel. If that dosnt work try out some parts of the mastersketch included in the Seedstudio Bluetooth Shield demo Sketches (|>link<|)Skroll down a bit there it says Download arduino library. you can simply copy parts of the code and change the TX and RX pins and instead of "SeeedBTSlave" you have to type in the name of your pc.

By the way this is the link to my post, where I describe my problems and solutions: Bluetooth Shield connection problem

schmron
Elementary-1
Elementary-1
Posts: 145
Joined: Mon Dec 05, 2011 6:12 am

Re: Grove - Serial Bluetooth: Connection problem

Post by schmron » Sat Apr 21, 2012 3:05 pm

Use SoftwareSerial (hardware serial sends some charakters on reset).

Use a sketch that show you the transmitted characters on hardware serial.
Best regards from Vienna/Austria
Rony

Post Reply