Skip to content

Simple Bluetooth app that allows users to search for available Bluetooth devices, establish connections, and transfer data.

License

Notifications You must be signed in to change notification settings

MPZ-00/bluetooth-app

Repository files navigation

Bluetooth App

This is a simple Bluetooth app that allows users to search for available Bluetooth devices, establish connections, and send files between their devices. The app is built using Vue.js, Node.js, and Express, and it utilizes the Web Bluetooth API to interact with Bluetooth devices.

Getting Started

Prerequisites

  • Node.js: Make sure you have Node.js installed on your computer.
  • Docker (optional)

Installation

  1. Clone the repository:
git clone https://github.com/MPZ-00/bluetooth-app.git
  1. Navigate to the project directory:
cd bluetooth-app
  1. Install the dependencies:
npm install
  1. Start the app:
npm run serve
  1. Navigate to the server directory:
cd server
  1. Start the server:
node server.js

via Docker

do steps 1 and 2

  1. Run docker-compose
docker-compose up -d --build

The app should now be running at http://localhost:8080 and the server at http://localhost:3000.

Usage

To use the app, open your web browser and navigate to http://localhost:8080 on your computer and mobile device.

The app provides the following features:

  • "Connect to Device" - Click this button to search for available Bluetooth devices.
  • Displays a list of all devices that have been previously connected. You can also view the connection status and reconnect to a device.
  • "Set Name" - Click this button to set a name for a device if the name is not available.
  • "Connect" - Click this button to establish a connection to a device.

Please note the following considerations when using the app:

  • The app utilizes the Web Bluetooth API to interact with Bluetooth devices.
  • The Web Bluetooth API does not allow direct connection to a Bluetooth device by specifying its address or ID. Instead, it initiates a user selection process through the navigator.bluetooth.requestDevice method to prioritize user privacy and prevent abuse.
  • The device objects returned by the API cannot be serialized and stored in a database or server for later reconnection. To reconnect to a device, the requestDevice method needs to be called again, and the device must be selected from the list of paired devices.
  • The functionality of Web Bluetooth depends on the permissions and implementation of the specific browser being used. Some browsers may store device information for future connection attempts, while others may not. Additionally, not all features are available in all browsers or platforms.

More information: https://developer.chrome.com/articles/bluetooth

Contributing

If you would like to contribute to this project, feel free to submit a pull request.

License

This project is licensed under the BSL License. See the LICENSE file for details.

Contact

Discord Server - Bits & Bytes

Project Link: https://github.com/MPZ-00/bluetooth-app

About

Simple Bluetooth app that allows users to search for available Bluetooth devices, establish connections, and transfer data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published