Pages: [1]   Go Down
Author Topic: Connect bluetooth Module FB155BC to Arduino uno  (Read 2100 times)
0 Members and 1 Guest are viewing this topic.
Le Havre
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,

First, you have to know I'm French, so my English is not very perfect^^.
Then, here is the datasheet of the bluetooth module : http://www.firmtech.co.kr/02download/bluetooth/manual/FB155_User_Guide(Eng).pdf

I bought an Arduino uno (awesome development platform!!!) and also a bluetooth module FB155BC. But I have a problem, I followed this tutorial to connect the bluetooth module to my arduino : http://www.kin-design.com/r&d/2009/08/from-researching-bluetooth-connectivity.html

Following the datasheet and the tutorial, I connected my module in that manner :

Pin 1 (GND) to the Ground on Arduino,
Pin 2 (VCC) to the 3.3V of Arduino,
Pin 3 (Status) is not connected,
Pin 4 (Factory Reset) is not connected,
Pin 5 (CTS) is connected to pin 6 (of the module),
Pin 6 (RTS) to pin 5 of the module,
Pin 7 (TXD) connected to the RX (digital 0) on the Arduino,
Pin 8 (RXD) connected to the TX (digital 1) on the Arduino.

I think it's the good connecting. Or not, because it doesn't work^^.

Before connecting the module, I upload this code on arduino :

Code:
char val; // Data received from the serial port
int ledPin = 13; // Set the pin to digital I/O 4

void setup() {
pinMode(ledPin, OUTPUT); // Set pin as OUTPUT
Serial.begin(115200); // Start serial communication at 9600 bps
}

void loop() {
if (Serial.available()) { // If data is available to read,
val = Serial.read(); // read it and store it in val
}
if (val == 'H') { // If H was received
digitalWrite(ledPin, HIGH); // turn the LED on
}
else {
digitalWrite(ledPin, LOW); // Otherwise turn it OFF
}
delay(100); // Wait 100 milliseconds for next reading
}

SO, when I power the Arduino and I do a bluetooth research on my computer, it doesn't found anything. The problem doesn't come from my computer because it finds without any problem my mobile phone.

So, I would like you to help myself to connect correctly the bluetooth module on my Arduino.

Thank you in advance for your help.

PS : If you have an question don't hesitate, I can answer them!
Logged

Le Havre
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

up

Please, I want it to works.... smiley-confuse smiley-confuse smiley-confuse
Logged

Le Havre
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

up
Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 168
Posts: 12425
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


your code looks OK, (the comments is sometimes incorrect or does not add info to the statements, better tell the why in the comments)

If the BT device is 3.3. volt it can be that the Arduino does not see it as a HIGH.

If the BT device is connected, can it be discovered?

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Le Havre
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your answer. The BT can't be discovered. But I've found some elements. I uploaded this code on my arduino :

Code:
#include <NewSoftSerial.h>

NewSoftSerial bluetooth(2, 3);
byte b;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);   // opens serial port, sets data rate to 9600 bps
  Serial.flush();
  bluetooth.begin(9600);
  //enter command mode
  bluetooth.println("$$$");
  Serial.println("setup complete.");
}

void loop() {
  // if theres data from the bluetooth module
  if (bluetooth.available()) {
    //echo it to the serial monitor
    Serial.print("bt module said:");
    Serial.println((char)bluetooth.read(),BYTE);
  }
  //if theres data from the serial monitor
  if (Serial.available()>0) {
    b=Serial.read();
    //echo it back to the serial monitor
    Serial.print("serial said:");

    Serial.println(b,BYTE);
    //send it to the bluetooth module
    bluetooth.print(b,BYTE);
  }
}

In the window of serial monitor I see this :

Quote
setup complete.
bt module said:

bt module said:

bt module said:E
bt module said:R
bt module said:R
bt module said:O
bt module said:R
bt module said:

bt module said:

Then, I connect my computer to my board using usb with the software putty on Ubuntu. And if I write "AT&F" to reset the hardware like says in the documentation, I can see this :

Quote
bt module said:B
bt module said:T
bt module said:W
bt module said:I
bt module said:N
bt module said:
bt module said:S
bt module said:l
bt module said:a
bt module said:v
bt module said:e
bt module said:
bt module said:m
bt module said:o
bt module said:d
bt module said:e
bt module said:
bt module said:s
bt module said:t
bt module said:a
bt module said:r
bt module said:t
bt module said:

bt module said:

bt module said:

bt module said:

bt module said:O
bt module said:K
bt module said:

bt module said:

But after I don't know what I can't do. And even after this my computer or my mobile don't discover the BT shield. I'm depressed.... Do you have an idea to resolve the problem?
« Last Edit: April 30, 2012, 12:49:27 pm by SauvalDanny » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 45982
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
  bluetooth.println("$$$");
I don't believe that you should be using println() to send $$$. The carriage return and line feed that println() adds are sure to cause problems.
Logged

Le Havre
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok. What do you propose to make the code right?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 45982
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Ok. What do you propose to make the code right?
As a test, use bluetooth.print(), not bluetooth.println().
Logged

Pages: [1]   Go Up
Jump to: