Hmm, ok - looks like you are both trying to use the same device then!
So... I've just tried to add the security, but I have no way to actually test. You should be able to do:
NRF.setSecurity({keyboard:1});
// find device with NRF.requestDevice/etc
dev.on('passkeyRequest', function() {
// then you need to call the following after you've had a chance to get it
dev.sendPasskey("123456")
});
I have also added support for Indications (I hope!) - startNotifications will just use indicate if notify isn't there (as the Web Bluetooth spec seems to imply it should).
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.
Hmm, ok - looks like you are both trying to use the same device then!
So... I've just tried to add the security, but I have no way to actually test. You should be able to do:
I have also added support for Indications (I hope!) -
startNotifications
will just use indicate if notify isn't there (as the Web Bluetooth spec seems to imply it should).Builds are available at http://www.espruino.com/binaries/travis/master/
Please let me know how you get on!