From 47c75f5ba9184f49411c838fe0e527a1e6937638 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Wed, 13 Dec 2017 18:22:32 -0500 Subject: [PATCH] Name and advertise properly --- lib/ble/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ble/index.js b/lib/ble/index.js index e5406a0..1bd4f44 100644 --- a/lib/ble/index.js +++ b/lib/ble/index.js @@ -11,7 +11,7 @@ const log = require('../log')('ble') const wifi = require('../wifi') const BLENO_DEVICE_NAME = process.env.BLENO_DEVICE_NAME || 'intval3' -const DEVICE_ID = process.env.DEVICE_ID || 'intval3' +let DEVICE_ID = process.env.DEVICE_ID || 'intval3' const SERVICE_ID = process.env.SERVICE_ID || 'intval3_ble' const CHAR_ID = process.env.CHAR_ID || 'intval3char' const WIFI_ID = process.env.WIFI_ID || 'wifichar' @@ -134,7 +134,7 @@ class BLE { log.info('stateChange', { state : state }) if (state === 'poweredOn') { log.info('Starting advertising', { BLE_ID : BLE_ID }) - bleno.startAdvertising(BLENO_DEVICE_NAME, [BLE_ID]) + bleno.startAdvertising(BLE_ID, [CHAR_ID, WIFI_ID]) } else { bleno.stopAdvertising() }