Qml bluetooth chat server
-
Hi,
there is an example of qml bluetooth chat client
http://doc-snapshot.qt-project.org/qt5-5.4/qtbluetooth-chat-example.htmlbut 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...
-
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.
-
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."