So did you try any other characteristics, or just 039afff8-2c94-11e3-9e06-0002a5d5c51b?
To write data, you'd need to do something like :
var service;
// ...
}).then(function(g) {
console.log("Connected");
gatt = g;
return gatt.getPrimaryService(
"039afff0-2c94-11e3-9e06-0002a5d5c51b");
}).then(function(s) {
service = s;
return service.getCharacteristic(
"039afff8-2c94-11e3-9e06-0002a5d5c51b");
}).then(function (c) {
console.log("Got Characteristic");
characteristic = c;
characteristic.on('characteristicvaluechanged', function(event) {
processBrainData(event.target.value.buffer);
});
return characteristic.startNotifications();
}).then(function() {
return service.getCharacteristic("039affa0-2c94-11e3-9e06-0002a5d5c51b"); //<--- might be a different one
}).then(function() {
return c.writeValue([0x04]);
}).then(function() {
console.log("Connected.");
enableOutput(buf1);
});
But as they have developer docs, I wonder whether you could actually just get in touch with them and ask them if they have an explanation of their Bluetooth protocol?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
So did you try any other characteristics, or just
039afff8-2c94-11e3-9e06-0002a5d5c51b
?To write data, you'd need to do something like :
But as they have developer docs, I wonder whether you could actually just get in touch with them and ask them if they have an explanation of their Bluetooth protocol?