attempting to detect smart glasses nearby and warn you.

The app, called Nearby Glasses, has one sole purpose: Look for smart glasses nearby and warn you.
This app notifies you when smart glasses are nearby. It uses company identificators in the Bluetooth data sent out by these. Therefore, there likely are false positives (e.g. from VR headsets). Hence, please proceed with caution when approaching a person nearby wearing glasses. They might just be regular glasses, despite this app’s warning.
The app’s author Yves Jeanrenaud takes no liability whatsoever for this app nor it’s functionality. Use at your own risk. By technical design, detecting Bluetooth LE devices might sometimes just not work as expected. I am no graduated developer. This is all written in my free time and with knowledge I taught myself.
False positives are likely. This means, the app Nearby Glasses may notify you of smart glasses nearby when there might be in fact a VR headset of the same manufacturer or another product of that company’s breed. It may also miss smart glasses nearby. Again: I am no pro developer.
However, this app is free and open source (foss), you may review the code, change it and re-use it (under the license).
The app Nearby Glasses does not store any details about you or collects any information about you or your phone. There are no telemetry, no ads, and no other nuisance. If you install the app via Play Store, Google may know something about you and collect some stats. But the app itself does not.
If you choose to store (export) the logfile, that is completely up to you and your liability where this data go to. The logs are recorded only locally and not automatically shared with anyone. They do contain little sensitive data; in fact, only the manufacturer ID codes of BLE devices encountered.
Use with extreme caution! As stated before: There is no guarantee that detected smart glasses are really nearby. It might be another device looking technically (on the BLE adv level) similar to smart glasses.
Please do not act rashly. Think before you act upon any messages (not only from this app).
- Because I consider smart glasses an intolerable intrusion, consent neglecting, horrible piece of tech that is already used for making various and tons of equally truely disgusting 'content'. 1, 2
- Some smart glasses feature small LED signifying a recording is going on. But this is easily disabled, whilst manufacturers claim to prevent that and take no responsibility at all (tech tends to do that for decades now). 3
- Smart glasses have been used for instant facial recognition before 4 and reportedly will be out of the box 5. This puts a lot of people in danger.
- I hope this is app is useful for someone.
- It's a simple rather heuristic approach. Because BLE uses randomised MAC and the OSSID are not stable, nor the UUID of the service announcements, you can't just scan for the bluetooth beacons. And, to make thinks even more dire, some like Meta, for instance, use proprietary Bluetooth services and UUIDs are not persistent,
we can only rely on the communicated device names for now. - The currently most viable approach comes from the Bluetooth SIG assigned numbers repo. Following this, the manufacturer company's name shows up as number codes in the packet advertising header (ADV) of BLE beacons.
- this is what BLE advertising frames look like:
Frame 1: Advertising (ADV_IND)
Time: 0.591232 s
Address: C4:7C:8D:1E:2B:3F (Random Static)
RSSI: -58 dBm
Flags:
02 01 06
Flags: LE General Discoverable Mode, BR/EDR Not Supported
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 53
Service UUIDs:
Complete List of 16-bit Service UUIDs
0xFEAA
- According to the Bluetooth SIG assigned numbers repo, we may use these company IDs:
0x01ABforMeta Platforms, Inc. (formerly Facebook)0x058EforMeta Platforms Technologies, LLC0x0D53forLuxottica Group S.p.A(Who manufacturers the Meta Ray-Bans)0x03C2forSnapchat, Inc., that makes SNAP Spectacles They are immutable and mandatory. Of course, Meta and other manufacturers also have other products that come with Bluetooth and therefore their ID, e.g. VR Headsets. Therefore, using these company ID codes for the app's scanning process is prone to false positives. But if you can't see someone wearing an Occulus Rift around you and there are no buildings where they could hide, chances are good that it's smart glasses instead.
- During pairing, the smart glasses usually emit their product name, so we can scan for that, too. But it's rare we will see that in the field. People with the intention to use smart glasses in bars, pubs, on the street, and elsewhere usually prepare for that beforehand.
- When the app recognised a Bluetooth Low Energy (BLE) device with a sufficient signal strength (see RSI below), it will push an alert message. This shall help you to act accordingly.
- The app Nearby Glasses shows a notification when smart glasses are nearby (that means, a BLE device of one of those company IDs mentioned above)
- Nearby means, the RSSI (signal strength) is less than or equal to a given value: -75 dBm by default. This default value corresponds to a medium distance and an ok-ish signal. Let me explain:
RSSI depends mainly on- Device transmit power
- Antenna design
- Walls and obstacles
- Human bodies absorbing signal
- Reflection and interference
- Device orientation
But typical BLE (Bluetooth Low Energy) scenarios, RSSI rough distance (open space) is: - -60 dBm ~ 1 – 3 m
- -70 dBm ~ 3 – 10 m
- -80 dBm ~ 10 – 20 m
- -90 dBm ~ 20 – 40 m
- -100 dBm ~ 30 – 100+ m or near signal loss
Indoors, distances are often much shorter.
RSSI drops roughly according toRSSI ≈ -10 * n * log10(distance) + constant
- Therefore, the default RSSI threshold of -75 dBm corresponds to about 10 to 15 meters in open space and 3 to 10 meters indoors or in crowded spaces. You got a good chance to spot that smart glasses wearing person like that.
- Nearby Glasses shows an optional debug log that is exportable (as txt file) and features a copy&paste function. Those are for advanced users (nerds) and for further debugging.
- Under Settings, you may specify the log length, the debugging (display all scan items or only ADV frames).
- You may also enter yourself some company IDs as string of hex values, e.g.
"0x01AB,0x058E,0x0D53. This overrides the built-in detection, so your notification shows up for the new value(s). - For better persistence, it uses Android's Foreground Service. You may disable this under Settings if you don't need it.
- The Notification Cooldown under Settings specifies how much time must pass between two warnings. Default is 10000 ms, which is 10 s.
- See Releases for APK to download. Google Play Store entry may follow soon
- Install the app (from Releases or from Google Play, for now) and open it
- Hit the Start Scanning button
- Grant permissions to activate Bluetooth (if not already enabled) and to access devices nearby. Some versions of Android also need you to grant permissions to access your location (before Version 13, mostly). Nearby Glasses does nothing with your location info. If you don't believe me, please look at the code
- if you don't see the scan starting, you might need to enable Foreground Service on your particular phone in the Settings menu (see below)
- You're all set! When smart glasses are detected nearby, a notification will appear. It does so until you hit Stop Scanning or terminate the app for good
- In the menu (top right, the cogwheel), you may make some Settings:
- Enable Foreground Service: By this, you prevent Android from pausing the app thus preventing it from alerting you. I recommend leaving this enabled
- RSSI threshold: This negative number specifies how far away a device might be to be a reason for an alert by Nearby Glasses. Technically, it referes to how strong the signal is received. Closer to zero means better signal, hence fewer distance between your phone and the smart glasses. See RSSI above for explanations and guidance. I recommend leaving it on -75
- Enable Notifications: You would not want to disable that
- Notification Cooldown: Here, you specify, how many notifications about found smart glasses nearby you want to get. I chose 10 seconds (10000 ms) as default value. Like this, you won't miss the notification while at the same time won't be bothered by it too much or drain your battery too fast
- Enable Log Display: Disabling this might spare you some battery
- Debug: Is needed to see more than just the matching BLE frames in the log display frame. It's useful to see if things are working
- Max log lines: How long the log may get. 200 seems to be a good balance between battery life and usability of the log (for nerds like me)
- BLE ADV only: This excludes other Bluetooth LE frames from the log for better readability
- Override Company IDs: If you want, you can let Nearby Glasses alert you of other devices than specified above. Useful for debugging, at least for me. Leave it empty if you don't need it or don't know what to do with it
- Every setting is saved and effective immediately. To go back, use your back button or gesture
- The export function enables you to share a text-file of the app's log. For nerds like me
- You may also copy&paste the log by tapping on the log display frame
- It's now working in the wild! I managed to get some people testing it with verified smart glasses around them. Special thanks to Lena!
- See Releases for APK to download.
- I pushed Nearby Glasses to Google Play, too. However, I will always publish releases here on GitHub and elsewhere, for those that avoid the Google Play.
- I am no BT or Android expert at all. For what I've learned, one could also dig deeper into the communication of the smart glasses by sniffing the BLE traffic. By doing so, we would likely not need to rely on the device behaving according to the BT specifications but could also use heuristics on the encrypted traffic transmissions without much false positives. But I haven't looked into BT traffic packets for more than ten years. I'm glad I remembered ADV frames... So if anybody could help on this, that'd be greatly appreciated!
- Move all hard-coded texts into
strings.xmlfor easier localisation. Right now, the app is available in English only. - Add more manufacturers IDs of smart glasses. Right now, it's Meta, Oakley and Snap. A list of smart glasses with cameras available would help, too.
- An iOS app would be easy to adapt, too. I have the toolchain now, but I will need a Mac to submit it to the Apple App Store in the end.
- There currently seems to be a layout issue with Google Pixel devices. You can't reach the menu as it's mixed with the status bar somehow. Will look into that asap. Meanwhile, try to put your screen to landscape mode and rotate clockwise (to the right).
App Icon: The icon is based on Eyeglass icons created by Freepik - Flaticon
License: This app Nearby Glasses is licensed under PolyForm Noncommercial License 1.0.0.
