Pages: [1]   Go Down
Author Topic: Unable to connect Bluetooth Mate with Ubuntu 12.04  (Read 945 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to connect my laptop running ubuntu 12.04 to a Bluetooth Mate Silver connected to an arduino.

Wiring is :

    CTS-I->No connection (leave floating)
    VCC->5V
    GND->GND
    TX-O->D2
    RX-I->D3
    RTS-O->No connection (leave floating)

Code running on arduino :

Code:
    $include <SoftwareSerial.h> 

    int bluetoothTx = 2;  // TX-O pin of bluetooth mate, Arduino D2
    int bluetoothRx = 3;  // RX-I pin of bluetooth mate, Arduino D3

    SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);

    void setup()
    {
      Serial.begin(9600);  // Begin the serial monitor at 9600bps

      bluetooth.begin(115200);  // The Bluetooth Mate defaults to 115200bps
      bluetooth.print("$$$");  // Enter command mode
      delay(100);  // Short delay, wait for the Mate to send back CMD
      bluetooth.println("U,9600,N");  // Temporarily Change the baudrate to 9600, no parity
      // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
      bluetooth.begin(9600);  // Start bluetooth serial at 9600
    }

    void loop()
    {
      if(bluetooth.available())  // If the bluetooth sent any characters
      {
        // Send any characters the bluetooth prints to the serial monitor
        Serial.print((char)bluetooth.read()); 
      }
      if(Serial.available())  // If stuff was typed in the serial monitor
      {
        // Send any characters the Serial monitor prints to the bluetooth
        bluetooth.print((char)Serial.read());
      }
      // and loop forever and ever!
    }

When I open the bluetooth manager in ubuntu I find that the bluetooth mate is visible but unknown and there is no SPP connection option when I right click on it. All the tutorials and blogs I went through connected to bluetooth mate through the SPP option.

Pic of my bluetooth manager : http://www2.picturepush.com/photo/a/12001550/640/12001550.jpg

So now how do I connect to the bluetooth mate?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After a lot of googling and reading various blogs I came across this command :

Code:
sudo rfcomm bind 0 00:06:66:48:71:0C

where 00:06:66:48:71:0C is the mac address of the bluetooth mate silver.

Once I did that I found that the serial port option for my device in the bluetooth manager was enabled.
I continue from there to connect to the device.

So basically it was a problem with Ubuntu and nothing to do with the arduino code
Logged

Pages: [1]   Go Up
Jump to: