Anyway so far that was all without bonding. I tried 'pairing' the device in linux in Bluetooth devices panel and this seem to create bond.
Here is the interesting part stored in the page below bootloader. I dump everything via for (i=0;i<8192;i+=256) print(btoa(require("Flash").read(256,0xf5000+i))). Before any pairing the second page started as
I still get bonded, encrypted connection but there is another short record added.
Then I noticed that each time I disconnect Bangle from linux side (so that blue icon on bangle turns into grey) there is another such record added after each next connection, otherwise everything works. here are few lines with added records
Then I removed device on linux side so the bonding got lost on linux side and after reconnection the stored data were still the same however the encryption was turned off
no record was added on this new connection. It still says bonded.
Then I did the pairing from linux side again and it added another long bonding record and turned encryption to true so it looks like this
So for me reboot does not clear anything, only every new connection add some extra record there (maybe connection encryption keys?). Also clearing bonding from linux side does not change bonding info in Bangle at all. New bonding invalidates previous - it can be seen previous records are modified when next is written so new bonding clears something in the first one.
When it works the connection is encrypted and rebooting watch does not break this, reconnecting after reboot keeps it still encrypted.
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.
Anyway so far that was all without bonding. I tried 'pairing' the device in linux in Bluetooth devices panel and this seem to create bond.
Here is the interesting part stored in the page below bootloader. I dump everything via
for (i=0;i<8192;i+=256) print(btoa(require("Flash").read(256,0xf5000+i)))
. Before any pairing the second page started asThe first page is very similar and does not change.
Then I did pairing from linux side and the second page changed into
Also I noticed security status shows
so there is encrypted true, bonded true. Then I rebooted device and reconnected and it changed into
I still get bonded, encrypted connection but there is another short record added.
Then I noticed that each time I disconnect Bangle from linux side (so that blue icon on bangle turns into grey) there is another such record added after each next connection, otherwise everything works. here are few lines with added records
Then I removed device on linux side so the bonding got lost on linux side and after reconnection the stored data were still the same however the encryption was turned off
no record was added on this new connection. It still says bonded.
Then I did the pairing from linux side again and it added another long bonding record and turned encryption to true so it looks like this
So for me reboot does not clear anything, only every new connection add some extra record there (maybe connection encryption keys?). Also clearing bonding from linux side does not change bonding info in Bangle at all. New bonding invalidates previous - it can be seen previous records are modified when next is written so new bonding clears something in the first one.
When it works the connection is encrypted and rebooting watch does not break this, reconnecting after reboot keeps it still encrypted.