The espruino_2v04_puckjs.zip file is not working for me. I even went and installed 2v03 to make sure it was not updating and that I was doing it properly. 2v03 worked just fine. That master branch version of 2v04 does not. The NRF Connect app says "Starting DFU" then immediately says "disconnecting..."
I also wanted to say that I am using web-bluetooth to connect to the characteristic. Here is my code for that:
connectClick(event) {
console.log('clicked', event);
navigator.bluetooth.requestDevice({
filters: [{
services: [0xabcd],
}]
})
.then(device => {
console.log("requested", device);
return device.gatt.connect();
})
.then(server => {
console.log('got server', server);
return server.getPrimaryService(0xabcd);
})
.then(service => {
console.log('got service', service);
service.getCharacteristic(0xAB40).then(characteristic => {
this.startListeningForTime(characteristic);
});
service.getCharacteristic(0xAB41).then(characteristic => {
this.startListeningForTime(characteristic);
}).catch(error => {
console.log('error', error);
})
})
}
handleCharacteristicValueChanged(event) {
var enc = new TextDecoder("utf-8");
var value = event.target.value;
console.log('Received ' + enc.decode(value))
// TODO: Parse Heart Rate Measurement value.
// See https://github.com/WebBluetoothCG/demos/blob/gh-pages/heart-rate-sensor/heartRateSensor.js
}
startListeningForTime(characteristic) {
characteristic.startNotifications()
.then(char => {
console.log('notification started', char)
// Writing 1 is the signal to reset energy expended.
char.addEventListener('characteristicvaluechanged', this.handleCharacteristicValueChanged.bind(this));
})
}
Just wanted to make sure that I should not be able to access that without entering a passkey if it is working.
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.
The espruino_2v04_puckjs.zip file is not working for me. I even went and installed 2v03 to make sure it was not updating and that I was doing it properly. 2v03 worked just fine. That master branch version of 2v04 does not. The NRF Connect app says "Starting DFU" then immediately says "disconnecting..."
I also wanted to say that I am using web-bluetooth to connect to the characteristic. Here is my code for that:
Just wanted to make sure that I should not be able to access that without entering a passkey if it is working.