diff --git a/lib/index.js b/lib/index.js index 29e9e70..c8eaf65 100644 --- a/lib/index.js +++ b/lib/index.js @@ -28,6 +28,7 @@ var bluetest = module.exports = function(options) { core.connectGatt = function() { logger.info('trying to connect using gatttool'); var gatt = spawn('gatttool',['-I']); + var cStr; gatt.on('error', function(err) { logger.error(err); }); @@ -37,7 +38,8 @@ var bluetest = module.exports = function(options) { }); logger.info('Trying to connect to ', core.mac); - //gatt.send(); + cStr = 'connect ' + core.mac; + gatt.send(cStr); }; core.init = function(options) {