continuing

This commit is contained in:
Martin Donnelly 2016-07-06 14:23:38 +01:00
parent f63655efde
commit eb7e1e02f1

View File

@ -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);