UNPKG

@genee/bluez

Version:

Bluez5 D-Bus library for easy to use bluetooth access in node

18 lines (14 loc) 398 B
const Agent = require("./Agent"); class StaticKeyAgent extends Agent { constructor(bluez, DbusObject, pin) { super(bluez, DbusObject); this.pin = pin; } RequestPinCode(device, callback) { callback(null, this.pin.toString()); } RequestPasskey(device, callback) { callback(null, parseInt(this.pin, 10)); } } module.exports = StaticKeyAgent;