From eb7e1e02f162927edad4d4e67efa191a40cfadfa Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Wed, 6 Jul 2016 14:23:38 +0100 Subject: [PATCH] continuing --- lib/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index 1166199..29e9e70 100644 --- a/lib/index.js +++ b/lib/index.js @@ -18,7 +18,11 @@ var logger = require('log4js').getLogger(); var bluetest = module.exports = function(options) { 'use strict'; - var core = {}; + var core = { + mac:'' + }; + + core.connectGatt = function() { @@ -32,17 +36,19 @@ var bluetest = module.exports = function(options) { logger.debug('gatt exit code', code); }); + logger.info('Trying to connect to ', core.mac); + //gatt.send(); }; core.init = function(options) { - var _mac; + var tool_path = ''; var hcidev = 'hvi0'; //If () if (typeof options.mac !== 'undefined') { - _mac = options.mac; + core.mac = options.mac; } else { console.log('You need to pass a mac address.'); process.exit(1);