I don't really have something useful to share and my code is quite big. Moreover it is mainly inspired by the lowEnergyScanner example.
Here is my algorithm for BLE : -> MainWindow initiates a class called "apiComBluetooth". -> Then MainWindow calls ApiComBluetooth.startDiscovery() which is just QBluetoothDeviceDiscoveryAgent.startDiscovery() -> After 5 seconds, the ApiComBluetooth receives the signal of discoveryFinished. It sorts devices that I want and stores them in a list of BleDevice (bluetooth device class like in the lowEnergyScanner example). -> Then the (only) service that I use starts to be discovered for each BleDevice created. -> To write or read to a specific device, MainWindow just accesses the right device in the BleDevice list using an index. "WriteCharacteristic" or messages received in the FIFO are managed directly in the BleDevice class of the device. I don't know if this information can help you, thank you ! Best regards, Simon Feutrier Le lun. 14 déc. 2020 à 16:05, Andreas Buhr <andreas.b...@qt.io> a écrit : > Hi Simon, > > On 14.12.20 15:25, Simon FEUTRIER wrote: > > But when I write in the characteristic of the second remote device, the > > connection with this device is immediately lost (Invalid service : loss > > of connection with the underlying device) > > Would you be able to share more information? Could you share your code? > > best, > Andreas > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest >
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest