We need to port this to PureOS/Debian/Mobian/flatpak, it is an app which scans BT-LE to see if there are operating smartglasses nearby. Block the glassholes from filming you, these creeps need to be 86’ed from places like restaurants pubs and the like. I will try this out in waydroid when I have time.
3 Likes
can someone with access to some glasses operating nearby try this? CLI proof of concept?
# Install BlueZ development files (needed for some libraries)
sudo apt-get update
sudo apt-get install -y bluetooth bluez libbluetooth-dev
# Allow your user to use BLE without sudo (optional but convenient)
sudo setcap cap_net_raw+eip $(readlink -f $(which python3))
python3 -m venv ble-scan-env
source ble-scan-env/bin/activate
pip install --upgrade pip
pip install bleak
Create a file called ble_company_scanner.py:
#!/usr/bin/env python3
import asyncio
import sys
from bleak import BleakScanner
# ----------------------------------------------------------------------
# Mapping of company IDs (as integer) -> human readable name
COMPANY_IDS = {
0x01AB: "Meta Platforms, Inc. (formerly Facebook)",
0x058E: "Meta Platforms Technologies, LLC",
0x0D53: "Luxottica Group S.p.A (Meta Ray‑Bans)",
0x03C2: "Snapchat, Inc. (SNAP Spectacles)",
}
def parse_manufacturer_data(manuf_data: dict[int, bytes]) -> list[int]:
"""
Extract the company IDs from the manufacturer data dictionary.
`manuf_data` maps a 16‑bit company identifier (as int) to the raw bytes.
The key itself is already the company ID according to the BLE spec,
so we just return the keys that match our list.
"""
return [cid for cid in manuf_data.keys() if cid in COMPANY_IDS]
async def detection_callback(device, advertisement_data):
# `advertisement_data.manufacturer_data` is a dict {company_id: bytes}
matching_ids = parse_manufacturer_data(advertisement_data.manufacturer_data)
if matching_ids:
for cid in matching_ids:
name = COMPANY_IDS[cid]
print(
f"\n🚨 Detected {name} (Company ID 0x{cid:04X}) "
f"on device {device.address} ({device.name or 'Unnamed'})"
)
# Optional: you could trigger a sound, send a desktop notification, etc.
# Example (Linux `notify-send`):
# subprocess.run(["notify-send", "BLE Alert", f"Found {name}"])
def main():
print("🔎 Starting BLE scan – press Ctrl‑C to stop")
scanner = BleakScanner(detection_callback)
try:
asyncio.run(scanner.start())
# Keep the event loop alive until the user aborts
while True:
asyncio.sleep(1)
except KeyboardInterrupt:
print("\n🛑 Scan stopped by user")
finally:
asyncio.run(scanner.stop())
if __name__ == "__main__":
# Ensure the script runs with an event loop policy compatible with Linux
if sys.platform.startswith("linux"):
import asyncio
asyncio.set_event_loop_policy(asyncio.DefaultEventLoopPolicy())
main()
I feel like other problematic btle IDs could be added, but I am sure it is pretty easy for some hardware to spoof. Is there a nice way to force a deauth attack like wifi on BT LE?
1 Like
Now if they could make it work with those 1960s’ comic book X-ray glasses!
Fine a GUI display on the x-ray glasses, but also a Predator(1987) shoulder blaster thing since ping flood or deauth jamming on BT LE is illegal some places.
1 Like