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() }