🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

bare-bluetooth

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-bluetooth - npm Package Compare versions

Comparing version
0.1.0
to
0.2.0
+25
-0
lib/android.js

@@ -389,2 +389,6 @@ const bluetooth = require('bare-bluetooth-android')

.on('notifySent', this._onnotifysent.bind(this))
.on('connecting', this._onconnecting.bind(this))
.on('connected', this._onconnected.bind(this))
.on('disconnecting', this._ondisconnecting.bind(this))
.on('disconnected', this._ondisconnected.bind(this))
}

@@ -479,2 +483,18 @@

}
_onconnecting(deviceAddress) {
this.emit('connecting', deviceAddress)
}
_onconnected(deviceAddress) {
this.emit('connected', deviceAddress)
}
_ondisconnecting(deviceAddress) {
this.emit('disconnecting', deviceAddress)
}
_ondisconnected(deviceAddress) {
this.emit('disconnected', deviceAddress)
}
}

@@ -500,2 +520,7 @@

Server.CONNECTION_STATE_DISCONNECTED = bluetooth.Server.CONNECTION_STATE_DISCONNECTED
Server.CONNECTION_STATE_CONNECTING = bluetooth.Server.CONNECTION_STATE_CONNECTING
Server.CONNECTION_STATE_CONNECTED = bluetooth.Server.CONNECTION_STATE_CONNECTED
Server.CONNECTION_STATE_DISCONNECTING = bluetooth.Server.CONNECTION_STATE_DISCONNECTING
Server.ATT_SUCCESS = bluetooth.Server.ATT_SUCCESS

@@ -502,0 +527,0 @@ Server.ATT_INVALID_HANDLE = bluetooth.Server.ATT_INVALID_HANDLE

+2
-2
{
"name": "bare-bluetooth",
"version": "0.1.0",
"version": "0.2.0",
"description": "Bluetooth bindings for Bare",

@@ -35,3 +35,3 @@ "exports": {

"dependencies": {
"bare-bluetooth-android": "^0.4.0",
"bare-bluetooth-android": "^0.5.0",
"bare-bluetooth-apple": "^0.3.0"

@@ -38,0 +38,0 @@ },

@@ -366,2 +366,6 @@ > [!IMPORTANT]

| --------------- | ----------------------------------------- | -------- |
| `connecting` | `deviceAddress: string` | Android |
| `connected` | `deviceAddress: string` | Android |
| `disconnecting` | `deviceAddress: string` | Android |
| `disconnected` | `deviceAddress: string` | Android |
| `notifySent` | `deviceAddress: string`, `status: number` | Android |

@@ -383,2 +387,11 @@ | `readyToUpdate` | _(none)_ | Apple |

#### Connection state (Android)
| Constant | Value |
| --------------------------------------- | ----- |
| `Server.CONNECTION_STATE_DISCONNECTED` | `0` |
| `Server.CONNECTION_STATE_CONNECTING` | `1` |
| `Server.CONNECTION_STATE_CONNECTED` | `2` |
| `Server.CONNECTION_STATE_DISCONNECTING` | `3` |
#### Properties

@@ -385,0 +398,0 @@