Hello everyone,

I got my Arduino BT connected to my N9 and I am able to send instructions from my Qt application to my bluetooth, a LED is turned on and after that it will response by sending a byte to the N9.

I'm using QtQuick and the event 'onDataAvailable' is triggered. However if I read my console the stringData is empty, no matter what I do on my Arduino I am unable to retrieve any data.

Do anyone got any idea why I am not receiving any bytes? misconfiguration in bit rate? (rfcomm uses 9600 and Arduino uses 115200?) or is it a bug??

BlueToothScreen.qml:
Code:
import QtQuick 1.1
import QtMobility.connectivity 1.2
import QtMobility.systeminfo 1.1
import com.nokia.meego 1.0

Item {

    function sendData(theString) {
        blueSocket.sendStringData(theString);
    }
    property string btAddress: "00:07:MY:MAC:MASKED"
    property bool connceted: false

    BluetoothSocket {
        id: blueSocket

        connected: true
        service: blueService    // This is defined in BluetoothService element

        onErrorChanged: {
            console.log("Error: " + blueSocket.error) //Errors are printed in Application Output underneeth.
            blueToothText.text = blueSocket.error;
            blueSocket.connected = false;
        }
        onDataAvailable: {
            console.log("Alone: "+stringData);
            console.log("toString: "+stringData.toString());
            console.log("Length: "+stringData.length);
            if(stringData == "B" || stringData == 66) {
                console.log("WE GOT THE B, YO!");
            }
        }

        onConnectedChanged: {
            console.log("Connection: " + connected);
        }
    }

    BluetoothService {
        id: blueService

        deviceAddress: btAddress                                //This is MAC address of your bluetooth module connected to Arduino
        serviceUuid: "00001101-0000-1000-8000-00805F9B34FB"     //famous UUID for serial port
        serviceProtocol: "rfcomm"                               //rfcomm emulates RS-232 serial ports. It uses 9600 baudrate, none parity, 8 bits, 1 stop bit
    }

    Timer {
        interval: 2500; running: true; repeat: true
        onTriggered: {
            if (blueSocket.connected == true) {
                if(blueToothScreen.visible == true) {
                    hideBlueScreen.start();
                }
                connceted = true;
            } else {
                if(blueToothScreen.visible == false) {
                    showBlueScreen.start();
                }
                connceted = false;
            }
        }
    }

    MouseArea {
        id: reconnectBlue
        width: 952; height: 507
        y: -14; x: -44; z: 2
        onReleased: {
            blueToothText.text = "Trying to connect to device...";
            blueSocket.connected = true;
        }
    }

    Image {
        y: -14; x: -44
        width: 952; height: 507
        fillMode: Image.Tile
        smooth: true
        source: "pics/bluetooth.png";

        Text {
            id: blueToothTitle
            x: 307; y: 225
            width: 410; height: 40
            text: "Bleutooth connection lost"
            wrapMode: Text.WordWrap
            color: "#ffffff"
            font { family: nokiaBold.name; pixelSize: 32; bold: true }
        }

        Text {
            id: blueToothText
            x: 307; y: 264
            width: 410; height: 40
            text: "Trying to connect to device..."
            wrapMode: Text.WordWrap
            color: "#ffffff"
            font { family: nokiaBold.name; pixelSize: 24 }
        }
    }
    PropertyAnimation {
       id: showBlueScreen
       target: blueToothScreen
       property: "opacity"
       easing.type: Easing.OutBack; duration: 1200
       from: 0; to: 1
       onStarted: {
           blueToothScreen.visible = true;
       }
    }
    PropertyAnimation {
       id: hideBlueScreen
       target: blueToothScreen
       property: "opacity"
       easing.type: Easing.OutBack; duration: 1200
       from: 1; to: 0
       onCompleted: {
           blueToothScreen.visible = false;
       }
    }
}
Response in console from (onDataAvailable):
Code:
Alone: 
toString: 
Length: 0