We are using Raspberry Pi 3B+. We want to run scanning in one thread to detect present devices and want to run notification in another thread to read response from devices.
Problem:
We are running scan in main thread and notification in separate thread. We are running notification using default context. Scanning is running properly until notification is started and stopped. The problem I think is that the default context is not closing properly when we stop notification. After notification is run once we start receiving following error message when scan is run again
Failed to start discovery: GDBus.Error:org.bluez.Error.InProgress: Operation already in progress
6, ERROR: Failed to scan.
Background:
We are using Raspberry Pi 3B+. We want to run scanning in one thread to detect present devices and want to run notification in another thread to read response from devices.
Problem:
We are running scan in main thread and notification in separate thread. We are running notification using default context. Scanning is running properly until notification is started and stopped. The problem I think is that the default context is not closing properly when we stop notification. After notification is run once we start receiving following error message when scan is run again
Failed to start discovery: GDBus.Error:org.bluez.Error.InProgress: Operation already in progress 6, ERROR: Failed to scan.
Code Snippet: