Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Creating BLE & Bluetooth Classic in a single app with live plot?



  • Hello guys,
    I want to start a project and I try to evaluate software, which can help me, so I came across Qt.

    Is it possible to develop a desktop application with Qt which is able to transmits data and plots this data in real time using either Bluetooth or Bluetooth Low Energy (the user can choose)? So for example in the GUI the user can choose between Bluetooth or Bluetooth low energy (one single application, not 2), than after selecting, the App starts to discover devices, then connecting to a device and starts to transfer (and save) the data and plot it in real time?
    I know that there are examples in which you can search and search for Bluetooth low energy devices and build a connection. But my project goes a few steps further.

    Thank you,
    Hassan



  • Hi and welcome @TUStudi

    Yes should be possible. Do you have any experience in Qt or is it your first project?

    @TUStudi said in Creating BLE & Bluetooth Classic in a single app with live plot?:

    So for example in the GUI the user can choose between Bluetooth or Bluetooth low energy (one single application, not 2), than after selecting, the App starts to discover devices, then connecting to a device and starts to transfer

    This is included in Qts several QBluetooth...-classes.
    You can choose between 'normal' and low energy profiles. (radiobuttons or something like that to switch BT modes in GUI)

    "All you need to do" is integrating your bluetooth connection stuff to your GUI logic (menus, buttons whatever you want to do) and pass the data you recieve via bluetooth to a QChart (or you even use QCustomPlot, see here, or QWT. Depends on the type of data you recieve and how you want to visualize it)

    Qt & BT examples / Tutorials
    Qt BT LE
    QChart

    @TUStudi said in Creating BLE & Bluetooth Classic in a single app with live plot?:

    But my project goes a few steps further.

    In which way? If you build an app from scratch, you can do whatever you want



  • Hi and welcome @TUStudi

    Yes should be possible. Do you have any experience in Qt or is it your first project?

    @TUStudi said in Creating BLE & Bluetooth Classic in a single app with live plot?:

    So for example in the GUI the user can choose between Bluetooth or Bluetooth low energy (one single application, not 2), than after selecting, the App starts to discover devices, then connecting to a device and starts to transfer

    This is included in Qts several QBluetooth...-classes.
    You can choose between 'normal' and low energy profiles. (radiobuttons or something like that to switch BT modes in GUI)

    "All you need to do" is integrating your bluetooth connection stuff to your GUI logic (menus, buttons whatever you want to do) and pass the data you recieve via bluetooth to a QChart (or you even use QCustomPlot, see here, or QWT. Depends on the type of data you recieve and how you want to visualize it)

    Qt & BT examples / Tutorials
    Qt BT LE
    QChart

    @TUStudi said in Creating BLE & Bluetooth Classic in a single app with live plot?:

    But my project goes a few steps further.

    In which way? If you build an app from scratch, you can do whatever you want



  • @Pl45m4 Thank you very much for your respond.
    Yes, I want to build my App from Scratch, but I’ll use a few examples as inspiration because I don’t have any experience with Qt.
    As you said, I will use a radio Button for the UI to switch between BLE and Bluetooth Classic, so I am very happy that this is possible with Qt.

    Do you know if it is possible to export data to a file (i.e. excel)? Because I want to give the user the possibility to chosse a local directory to export the data to his local maschine.



  • @TUStudi

    AFAIK writing an MS Excel file is not possible with Qt directly. You need some additional stuff.
    But writing to a file in general (raw textfile, JSON, XML... etc) is quite easy.