qtbluetoothrfcomm

SOLVED QT Bluetooth communication via RFCOMM to Raspberry PI 3


i am trying to communicate with my mobile app to my raspberry pi 3 and I am using QT to build an app.

I used for the first steps the example project "Bluetooth Chat Example", which is using a RFCOMM-server to communicate with my Raspberry.

The Raspberry has a bluetooth function and I started the RFCOMM server.

Unfortunately my phone is not recognizing my Raspberry Pi.

Other apps like: Serial Bluetooth terminal are working fine and the communiction is working.

QT-Version: Qt 5.15.0

Does anyone know how to fix this ? I mean why is my app not seeing my raspberry or the other way around.

If you need further information, just let me know https://www.dropbox.com/sh/di7e20tnghn8zpk/AACrS6eTc6McejqjGFbX7WX4a?dl=0


Solution

  • Problem solved:

    Changed UUID into following:

    UUID changed to: old code

    static const QLatin1String serviceUuid("e8e10f95-1a70-4b27-9ccf-02010264e9c8");
    #ifdef Q_OS_ANDROID
    static const QLatin1String reverseUuid("c8e96402-0102-cf9c-274b-701a950fe1e8");
    #endif
    

    new code:

    static const QLatin1String serviceUuid("FB349B5F8000-0080-0001-0000-01110000");
    #ifdef Q_OS_ANDROID
    static const QLatin1String reverseUuid("00001101-0000-1000-8000-00805F9B34FB");
    #endif`