Name and advertise properly

This commit is contained in:
mmcwilliams 2017-12-13 18:22:32 -05:00
parent e5207a8474
commit 47c75f5ba9
1 changed files with 2 additions and 2 deletions

View File

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