continuing

This commit is contained in:
Martin Donnelly 2016-07-06 14:34:53 +01:00
parent 3ea2f14ef0
commit 2d0b31e48b

View File

@ -29,7 +29,7 @@ var bluetest = module.exports = function(options) {
core.connectGatt = function() { core.connectGatt = function() {
logger.info('trying to connect using gatttool'); logger.info('trying to connect using gatttool');
var gatt = fork('gatttool',['-I']); var gatt = spawn('gatttool',['-I']);
var cStr; var cStr;
gatt.on('error', function(err) { gatt.on('error', function(err) {
logger.error(err); logger.error(err);
@ -40,8 +40,8 @@ var bluetest = module.exports = function(options) {
}); });
logger.info('Trying to connect to ', core.mac); logger.info('Trying to connect to ', core.mac);
cStr = 'connect ' + core.mac; cStr = 'connect ' + core.mac + '\n';
gatt.send(cStr); gatt.stdin.write(cStr);
}; };
core.init = function(options) { core.init = function(options) {