mirror of
https://gitlab.silvrtree.co.uk/martind2000/bluetest.git
synced 2025-02-10 20:59:16 +00:00
continuing
This commit is contained in:
parent
97b407390f
commit
00af6eaf5b
12
lib/index.js
12
lib/index.js
@ -21,6 +21,16 @@ var bluetest = module.exports = function(options) {
|
|||||||
var core = {};
|
var core = {};
|
||||||
|
|
||||||
|
|
||||||
|
core.connectGatt = function() {
|
||||||
|
logger.info('trying to connect using gatttool');
|
||||||
|
var gatt = spawn('gatttool -I');
|
||||||
|
gatt.on('exit', function(code) {
|
||||||
|
|
||||||
|
logger.debug('gatt exit code', code);
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
core.init = function(options) {
|
core.init = function(options) {
|
||||||
|
|
||||||
var _mac;
|
var _mac;
|
||||||
@ -52,6 +62,8 @@ var bluetest = module.exports = function(options) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
core.connectGatt();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user