Does PHP support Bluetooth?

Asked

Viewed 998 times

4

If not, in general (web) is there support for bluetooth? Is there any way to communicate between PORT WITH (Bluetooth) for the web?

  • It would be easier for someone to give you an answer to your problem if they know what you intend to do. But in general terms you can read COM ports through PHP basically as a middleware, for example: http://www.phpclasses.org/browse/file/17926.html

  • Being more specific, I directly want to use/instantiate a Bluetooth controller via WEB, a web page that the user controls the bluetooth device. For example in C# I do this control referencing the bibliote 32feet

1 answer

4


The Bluetooth control will only work on the server (on the server side), ie if the user accesses from his computer he will only be able to send "commands", but the machine that will be running this is the server.

Note that if a user accesses Bluetooh, it will be busy and other users will not be able to access until the first one finishes the process.

Probably the class https://github.com/Xowap/PHP-Serial used in this question must have the same objective.

Windows:

  1. Open the run or cmd
  2. Typo %SystemRoot%\system32\control.exe or open the control panel
  3. Go to "device manager"
  4. Search for "Bluetooth radios" (something similar)
  5. Select the desired Bluetooth device with the right mouse button and go to properties
  6. Click on the Details tab, the name should appear and then the port, for example Bluetooh (COM 17)

Linux

In linux the device should look like /dev/rfcomm0

Using

The php script should look like this:

<?php
include 'PhpSerial.php';

$serial = new PhpSerial;
$serial->deviceSet('/dev/rfcomm0'); # No windows deve ser deviceSet('COM17')

Now if you want to send from visitor computer bluetooth, you will need a technology like

Browser other questions tagged

You are not signed in. Login or sign up in order to post.