From 35feed7775351543c5e0189670a8c884e24aff72 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Wed, 13 Dec 2017 18:34:00 -0500 Subject: [PATCH] Require bleno AFTER unique name is applied (this was messing up) --- lib/ble/index.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/ble/index.js b/lib/ble/index.js index d9f2804..c79a023 100644 --- a/lib/ble/index.js +++ b/lib/ble/index.js @@ -3,12 +3,7 @@ /** @module ble */ /** Bluetooth Low Energy module */ -const os = require('os') -const bleno = require('bleno') -const util = require('util') -const log = require('../log')('ble') -const wifi = require('../wifi') const DEVICE_NAME = process.env.DEVICE_ID || 'intval3' const SERVICE_ID = process.env.SERVICE_ID || 'intval3_ble' @@ -16,9 +11,16 @@ const CHAR_ID = process.env.CHAR_ID || 'intval3char' const WIFI_ID = process.env.WIFI_ID || 'wifichar' const NETWORK = os.networkInterfaces() const MAC = getMac() || spoofMac() -// + process.env.BLENO_DEVICE_NAME += '_' + MAC +const os = require('os') +const bleno = require('bleno') +const util = require('util') + +const log = require('../log')('ble') +const wifi = require('../wifi') + let currentWifi = 'disconnected' let getState