Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qml bluetooth chat server
Qt 6.11 is out! See what's new in the release blog

Qml bluetooth chat server

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mehrdad
    wrote on last edited by
    #1

    Hi,

    there is an example of qml bluetooth chat client
    http://doc-snapshot.qt-project.org/qt5-5.4/qtbluetooth-chat-example.html

    but i do not know how can i create its server side and actually i dont know how bluetooth service works

    how can i connect BluetoothSocket to BluetoothService

    i guess i should create a socket for any client and connect this sockets to a service and this service gives message of clients and send it to all clients...is it true? and if the answer is positive how can i do that?

    thanks...

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ckakman
      wrote on last edited by
      #2

      Hi,

      In the Qt installation on your computer, you have the full source code of all the example projects. I suggest you check the projects in the bluetooth folder.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mehrdad
        wrote on last edited by
        #3

        thanks, but i know that... this examples based on c++ and qml together...
        i need an example of qml version and just its server side...
        i try to find out something from qt examples but unfortunately this examples is so intricate... .

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ckakman
          wrote on last edited by
          #4

          For a Bluetooth server, you can't avoid C++.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mehrdad
            wrote on last edited by
            #5

            Are you sure?so what is BluetoothService and what mean this?

            http://doc.qt.io/qt-5/qtbluetooth-qmlmodule.html

            The Qt Bluetooth QML Types enable an application to scan for devices and connect and interact with them in an easier way than the C++ Classes. However, it is a bit more limited than the C++ API. You can always use the C++ API to create QML plugins with the flexibility you need.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              ckakman
              wrote on last edited by
              #6

              From BluetoothService documentation: "It allows a QML project to get information about a remote service, or describe a service for a BluetoothSocket to connect to."

              To implement a service, you need a server. From the QBluetoothServer doc.: "The QBluetoothServer class uses the RFCOMM or L2cap protocol to communicate with a Bluetooth device. QBluetoothServer is used to implement Bluetooth services over RFCOMM or L2cap."

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved