mirror of
https://gitlab.silvrtree.co.uk/martind2000/bluetest.git
synced 2025-01-26 20:56:17 +00:00
continuing
This commit is contained in:
parent
f63655efde
commit
eb7e1e02f1
12
lib/index.js
12
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);
|
||||
|
Loading…
Reference in New Issue
Block a user