Recently I started experiencing frequent random lags with a Bluetooth mouse I have connected to my iMac: the tracking speed would suddenly drop for a few seconds before returning back to normal.
One time, while it was happening, I quickly clicked the Bluetooth icon in the menubar to see what was happening, only to see some unfamiliar device with some random name presumably connected to my machine. It has no indication of what it is, only an option to Disconnect. My iMac is not set to be "discoverable" and I was never prompted to allow the connection with that device. It also seems to keep changing the name, so it's not always the same, but the symptoms always are.
I installed a bunch of Bluetooth monitoring tools, from the Xcode dev tools page, and I am able to catch the activity of that random device (it keeps connecting every few minutes, but without any apparent pattern), but not identify the nature of that activity or find a way to stop it from happening.
How do I find the culprit (a human hacker or a rogue device somewhere in the building) and make it stop doing what it's doing?