• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dcm31

dcm31

bluetoothscanner

Public
Like
bluetoothscanner
Home
Code
3
frontend
1
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://dcm31--edb10f4e417f11f0ac1876b3cceeab13.web.val.run
README.md

🔵 Bluetooth Scanner

A web-based Bluetooth device scanner that uses the Web Bluetooth API to discover and display information about nearby Bluetooth devices.

Features

  • 🔍 Device Discovery: Scan for nearby Bluetooth devices
  • 📱 Device Information: Display device names, IDs, and connection status
  • 🕒 Real-time Updates: Shows when devices were discovered
  • 🧹 Clear Function: Easy way to clear the device list
  • 📊 Device Counter: Keep track of how many devices have been found
  • 🎨 Responsive Design: Works on desktop and mobile devices

Browser Compatibility

This app uses the Web Bluetooth API, which is supported in:

  • ✅ Chrome (desktop and Android)
  • ✅ Edge (desktop and Android)
  • ✅ Opera (desktop and Android)
  • ❌ Firefox (not supported)
  • ❌ Safari (not supported)

Important Notes

Privacy Limitations

Due to privacy and security restrictions in the Web Bluetooth API:

  • MAC addresses are not directly accessible through the Web Bluetooth API
  • Device information is limited to what the device chooses to advertise
  • Users must explicitly grant permission to access each device
  • The API requires user interaction (button click) to initiate scanning

How It Works

  1. User Interaction Required: Click "Start Scan" to begin device discovery
  2. Permission Dialog: Browser will show a device selection dialog
  3. Device Selection: Choose a device from the list to add it to your scanner
  4. Device Information: Basic information about the selected device is displayed
  5. Connection Attempts: The app tries to connect to get additional device details

Technical Details

  • Built with vanilla JavaScript and the Web Bluetooth API
  • Uses TailwindCSS for styling
  • Responsive design with mobile-first approach
  • Error handling for unsupported browsers and connection issues

Usage

  1. Open the app in a supported browser
  2. Click "Start Scan" to begin scanning
  3. Select devices from the browser's permission dialog
  4. View discovered devices in the list
  5. Use "Clear" to remove all devices from the list

Limitations

  • Cannot perform passive scanning (requires user interaction for each device)
  • Limited device information available due to privacy restrictions
  • MAC addresses are not accessible through the Web Bluetooth API
  • Some devices may not be discoverable or may require specific pairing procedures

For more advanced Bluetooth scanning capabilities, consider using native mobile apps or desktop applications with appropriate system permissions.

HTTP
  • index.ts
    dcm31--ed…13.web.val.run
Code
frontendREADME.md
H
index.ts
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.