Reconnect Fails
I need use with node and Im using the javascript SDK.
Here is my code:
var MetaWear = require('metawear');
MetaWear.discoverAll(function (device) {
device.once('disconnect', function () {
console.log(disconnect ${device._peripheral.advertisement.localName}`)
})
device.connectAndSetUp(function (error) { if (error) { console.log("error" + error)
}
console.log(`connected ${device._peripheral.advertisement.localName}`)
});
},true); `
The code works, I can connect and disconnect, but my problem is when I want to reconnect the same MetaWear, I cant do this and i don't know why.
I have debugged all and I don't find why that happens.
Can you help me please ?
In the official forum of MetaWear is there zero information ABOUT THIS PROBLEM
Im working on MacOS but i have linux too on a rasberry and its the same thing!
We are already addressing your issue on our forums:
https://mbientlab.com/community/discussion/2600/problem-at-reconnection