Socket
Socket
Sign inDemoInstall

bluetooth-hci-socket

Package Overview
Dependencies
11
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

examples/le-advertisement-test.js

8

index.js

@@ -15,2 +15,10 @@ var events = require('events');

BluetoothHciSocket.prototype.getAddress = function() {
return this.getAddressBytes().toString('hex').match(/.{1,2}/g).reverse().join(':');
};
BluetoothHciSocket.prototype.getAddressType = function() {
return 'public';
};
module.exports = BluetoothHciSocket;

2

package.json
{
"name": "bluetooth-hci-socket",
"version": "0.0.1",
"version": "0.0.2",
"description": "Bluetooth HCI socket binding for Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,2 +43,18 @@ # node-bluetooth-hci-socket

#### Address
Get the device (Bluetooth/BT) address. __Note:__ must be called after ```bind```.
```
var btAddress = bluetoothHciSocket.getAddress();
```
#### Address Type
Get the device (Bluetooth/BT) address type. __Note:__ must be called after ```bind```.
```
var btAddressType = bluetoothHciSocket.getAddressType(); // returns: 'public' or 'random'
```
#### Is Device Up

@@ -49,3 +65,3 @@

```
bluetoothHciSocket.isDevUp(); // returns: true or false
var isDevUp = bluetoothHciSocket.isDevUp(); // returns: true or false
```

@@ -52,0 +68,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc