Describe the bug
By subscribing to every device during a scan, btleplug runs into DBUS subscription limits pretty quickly, then stops working.
Expected behavior
An ability to scan without permanently subscribing to every device ever seen.
Actual behavior
After a few hours or days, depending on the limit set in DBUS systemwide configs, you'll get something like this in your syslogs:
Apr 17 00:02:01 radar dbus-daemon[285]: [system] Connection ":1.42208" is not allowed to add more match rules (increase limits in configuration file if required; max_match_rules_per_connection=20480)
Additional context
I've written a Prometheus exporter for my BLE temperature sensors using btleplug. It works great until DBUS kills the library. I then have to wait for some time, restarting immediately doesn't work because the list of peripherals sticks around in DBUS' memory, tricking btleplug into subscribing to them all again right away after restart.
For my BLE scan I obviously only need info from the BLE sensors, it would be great if I could opt out from unsupported devices, or do something else to avoid hitting DBUS limits.
(Apologies for my likely poor BLE/DBUS terminology here.
Describe the bug
By subscribing to every device during a scan,
btleplugruns into DBUS subscription limits pretty quickly, then stops working.Expected behavior
An ability to scan without permanently subscribing to every device ever seen.
Actual behavior
After a few hours or days, depending on the limit set in DBUS systemwide configs, you'll get something like this in your syslogs:
Apr 17 00:02:01 radar dbus-daemon[285]: [system] Connection ":1.42208" is not allowed to add more match rules (increase limits in configuration file if required; max_match_rules_per_connection=20480)Additional context
I've written a Prometheus exporter for my BLE temperature sensors using btleplug. It works great until DBUS kills the library. I then have to wait for some time, restarting immediately doesn't work because the list of peripherals sticks around in DBUS' memory, tricking btleplug into subscribing to them all again right away after restart.
For my BLE scan I obviously only need info from the BLE sensors, it would be great if I could opt out from unsupported devices, or do something else to avoid hitting DBUS limits.
(Apologies for my likely poor BLE/DBUS terminology here.