Seven million pairs of Meta Ray-Ban smart glasses were sold last year. They look like regular sunglasses, but they have cameras that can silently record video of anyone nearby. Reports of people using them to covertly film others in public, in private, during arrests, and more have been piling up. And now Meta is adding facial recognition.
There are already a couple of Android apps that try to detect these glasses, Nearby Glasses and Nearby Lens, by scanning for Bluetooth Low Energy advertisements. They work by matching on manufacturer company IDs assigned by the Bluetooth SIG. For example, `0x01AB` for Meta Platforms, `0x058E` for Meta Platforms Technologies, `0x0D53` for Luxottica (who manufactures the Ray-Ban frames), and `0x03C2` for Snap's Spectacles.
But they have two problems.
First, passive detection on a phone is limited. An iOS version of Nearby Glasses recently launched, but Apple's Core Bluetooth can't filter by manufacturer data in the background. This means that the app must stay in the foreground to scan. You can't passively monitor for glasses while your phone is in your pocket.
Second, they produce false positives. Meta uses those same company IDs across all their BLE products, including Quest VR headsets. Matching on manufacturer ID alone means any Meta Bluetooth device triggers an alert.
Spectacle solves both problems with a ~$21.50 keychain.
Video DemoWhy dedicated hardware?This project exists because a phone can't do it. That's the bar I use for every hardware project, if a phone app can already do the job, there's no reason to build a device. Spectacle passes that test:
- Passive scanning without your phone — iOS apps must stay in the foreground to detect glasses, and Android apps drain your battery. A dedicated keychain scans continuously with no phone involvement
- Discreet — glancing at a tiny keychain is less conspicuous than opening a "smart glasses detector" app at a bar or in a meeting
The existing apps do a great job of detecting smart glasses using manufacturer company IDs, and for a first pass, that's the right approach. Nearby Glasses even captured and documented a full BLE advertisement frame from a real pair of Meta Ray-Bans in its README. Looking at that frame, there's an opportunity to take detection one step further:
Manufacturer Specific Data:
Length: 0x1A
Type: Manufacturer Specific Data (0xFF)
Company ID: 0x058E (Meta Platforms Technologies, LLC)
Data: 4D 45 54 41 5F 52 42 5F 47 4C 41 53 53Those data bytes after the company ID are ASCII for META_RB_GLASS. The Ray-Bans identify themselves as glasses right in their BLE advertisement payload, a detail that can be used to distinguish them from Quest headsets sharing the same Meta company ID.
Spectacle builds on this. When it sees a Meta company ID, it checks the manufacturer data for META_RB_GLASS before alerting. No payload match, no alert. This narrows the detection to actual glasses rather than the broader Meta product line.
For the Luxottica company ID (0x0D53), no payload check is needed, as Luxottica only makes eyewear, so that ID alone is a confirmed glasses detection.
The entire device is a single board: the M5Stack StickS3. It costs $21.50 USD at the time of writing, measures 48 × 24 × 15mm, and includes:
- ESP32-S3 with BLE 5, 8MB Flash, 8MB PSRAM
- 1.14" color LCD
- Built-in speaker
- 250mAh battery
- USB-C for charging and flashing
No soldering, no external components, no enclosure design. It clips to a keychain as-is.
The ESP32-S3's BLE stack gives you full access to raw advertisement data — manufacturer IDs, payload bytes, service UUIDs, device names, everything that Apple's Core Bluetooth hides on iOS. This is the reason dedicated hardware works where an iPhone app can't.
Getting StartedFirst, gather your materials.
- Get an M5Stack StickS3
- Get a keychain loop of your choice. I used one of these.
- A small Allen key (optional). We'll use it for one method for attaching the keychain loop.
- A data-capable USB C cable.
The fastest way to get Spectacle running is through the browser. This way you need no toolchain, IDE, or command line.
- Open the Spectacle Web Flasher in Chrome or Edge (any browser with Web Serial will do)
- Connect the StickS3 via a data-capable USB-C cable (charge-only cables won't work)
- Put the device into download mode: press and hold the reset button on the side for about 2 seconds. When the internal green LED blinks, release the button. You cannot use the USB mode on the factory demo, you must put it in download mode!
- Click Connect Device, select the M5Stack from the pop-up menu in your browser, then scroll down and click Factory Reflash / Repair for first-time setup
The web flasher writes the bootloader, partition table, firmware, and SPIFFS config image containing the latest device signature database. When it finishes, press the small side button briefly to reboot.
Future updates are even simpler. The signature database is regenerated weekly by a GitHub Action that pulls the latest manufacturer IDs from the Nordic Semiconductor Bluetooth Numbers Database. Just revisit the web flasher and click Flash Update to get the latest signatures without touching the bootloader. Just put your device back in download mode, press connect, and then press "Flash Update".
To make the device a keychain, one easy way is to remove the screw above from the bottom of the device using a small Allen key. This one is adjacent to a small hole you can insert your keychain loop, like so:
If you are more dextrous than me, you might be able to make the loop exit around the small plastic pin through the adjacent hole. For me, it was easier to make the loop sit around the screw hole and then re-insert the screw. This made the keychain loop fit securely. You can now attach it to your favorite keychain for daily carry!
Setup Troubleshooting TipsEntering Download Mode
If you accidentally end up with a blinking green LED and a blank screen, don't panic. The device is just sitting in download mode waiting for a flash. Press the reset button briefly to return to normal boot, or go ahead and flash firmware through the web flasher.
Detection LogicThe firmware loads device signatures from a JSON config file stored on the ESP32-S3's flash filesystem. Each signature defines up to three checks:
- Manufacturer company ID — the 2-byte Bluetooth SIG assigned identifier
- Payload strings — ASCII markers in the manufacturer-specific data (like
META_RB_GLASS) - Device name prefixes — the BLE advertised name (like
Spectaclesfor Snap)
All defined checks for a signature must pass. Undefined checks are skipped. This means the Luxottica entry requires only a manufacturer ID match (because Luxottica only makes eyewear), the Meta entries require both a manufacturer ID match AND the META_RB_GLASS payload string (to exclude Quest headsets and other Meta devices), and the Snap entry requires a manufacturer ID match AND a Spectacles name prefix.
When a match occurs, the LCD wakes up, shows the device name and signal strength, and the speaker buzzes. Camera-equipped glasses show in red, non-camera smart glasses show in amber.
Power ManagementA keychain that dies after a couple hours isn't useful. Spectacle uses deep sleep between scan cycles. The ESP32-S3 fully powers down between scans, retaining only RTC memory for the scan counter, RSSI threshold, and recent detection state. The device currently scans for 1.5 seconds every 20 seconds. This extends battery life to a full day of passive scanning on the 250mAh cell.
The LCD stays off by default and only wakes on a detection alert or a button press. After a few seconds of inactivity it dims and sleeps. The StickS3's external 5V output rail is disabled in firmware since it produces audible converter whine when unused.
Controls- Front button or Button A (side) — wake the display and force an immediate rescan
- Button B (side) — cycle the RSSI detection threshold, controlling how close a device needs to be before alerting
The RSSI value shown on the display gives a rough sense of proximity. Around -40 to -50 dBm means the glasses are within a few feet; -70 dBm or below means across the room or through a wall.
The Config GeneratorThe device signature database isn't hand-maintained. generate_config.pyin the GitHub repo is the single source of truth. It pulls manufacturer company IDs from the Nordic Semiconductor Bluetooth Numbers Database and merges them with curated smart glasses metadata including payload strings, name prefixes, and camera status.
A weekly GitHub Action runs this automatically, rebuilds the firmware, and deploys an updated release to the web flasher. New company ID registrations from the Bluetooth SIG are picked up without manual intervention. Community contributions, such as new glasses models and sniffed BLE data, are welcome as PRs against the Python script, not the generated config file!
Testing without GlassesIf you don't have a real pair of smart glasses to test with (and Best Buy demo units don't seem to actively advertise over BLE, I checked) the repository includes a BlueZ emulator script that broadcasts the same manufacturer data a real pair of Ray-Bans is documented to use.
On any Linux machine with a BLE adapter (a Raspberry Pi, an Arduino UNO Q, or a laptop) grab my emulator script from the repo and run:
sudo apt install -y python3-dbus python3-gi
sudo python3 emulate_meta_rayban.py --adapter hci0This registers a BLE advertisement with company ID 0x058E and the META_RB_GLASS payload through BlueZ's D-Bus API. Place it near the StickS3 and Spectacle should alert within a scan cycle. You can also check that Nearby Glasses detects our fake pair of smart glasses as a further check.
I used an Arduino Uno Q. You should observe the Spectacle emitting a tone and then displaying:
The firmware is stable. The value is in the signature database, and it grows with every pair of smart glasses sniffed. If you have access to any smart glasses and can capture a BLE advertisement dump, PRs to generate_config.pyare welcome.
BLE advertisement behavior for Meta Ray-Bans while paired and actively connected to a phone is not well documented. Standard BLE devices can continue advertising while connected, but many stop to conserve battery. Detection is confirmed during pairing and disconnected states. Additional characterization of the behaviors of smart glasses as their capabilities and software evolve will make detection more reliable.
Acknowledgments
Spectacle was inspired by Nearby Glasses by Yann Jeanrenaud. His work identifying the manufacturer company ID approach and documenting real BLE advertisement frames made this project possible.














Comments