-
with BDS, you can send text back
For that you would need something with much bigger battery and better antenna. Even your phone would struggle with that task https://en.m.wikipedia.org/wiki/Satellite_phone#Integration_into_conventional_mobile_phones
But maybe there could be deluxe version of the watch sold as a kit with two tinfoil hats, one small for the watch and one bigger :-)
-
I did not add pull up resistors to WP and HOLD but seems to work without it (did not try writing yet).
Just a followup - I found out that I bought W25Q16JVUXIQ where the last Q means it is permanently in Quad SPI mode after reset and this mode cannot be cleared. However normal SPI commands still work in this mode so it is OK, the only difference is that /WP and /HOLD pins are data pins and its classic functionality is disabled which is actually good for me as those pins are floating (in theory it is even possible to wire them from unpopulated pull up resistor pads to some nrf pins to have quad mode working but it is not worth it)
So everything should work as floating WP or HOLD would not interfere with writes however I could not make writes work with software SPI! All other SPI commands worked - getting ids , putting in and out of sleep, reading unique 64bit id, reading all 3 status registers, write enable (0x6) (the WE bit in status register is set), even the writing or erase command (0x2, 0x20) would clear the WE bit in status register but the data did not change. Checked various flash protection bits and everything was disabled as it should be by default according to datasheet but still nothing.
So I built 2MB SPI flash storage area into the firmware by adding
'NFC': { 'pin_a':'D9', 'pin_b':'D10' }, 'SPIFLASH' : { 'pin_cs' : 'D19', 'pin_sck' : 'D12', 'pin_mosi' : 'D11', 'pin_miso' : 'D18', 'size' : 2048*1024, # 2MB 'memmap_base' : 0x60000000, }
and the espruino code did not work too
>var f=require("Flash") =function () { [native code] } >f.getFree() =[ { addr: 364544, length: 4096 }, { addr: 1610612736, length: 2097152 } ] >f.read(8,0x60000000) =new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]) >f.write([1,2,3,4,5,6,7,8],0x60000000) FW addr 0x00000000 fail Status 0 =undefined >f.write([1,2,3,4,5,6,7,8],0x60010000) FW addr 0x00010000 fail Status 0 =undefined >f.write([1,2,3,4,5,6,7,8],0x60100000) FW addr 0x00100000 fail Status 0 =undefined >f.read(8,0x60000000) =new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255])
So I enabled hardware SPI in the build and tried that
var sf=SPI1;//new SPI(); var FCS=D19;FCS.write(1); sf.setup({sck:D12,mosi:D11,miso:D18,baud:80000000,mode:3});
and suddenly everything worked. The very same lines now started to work, I even saw for the first time the busy bit set in status register when erasing
>sf.send([0x6],FCS);sf.send([0x20,0,0,0],FCS);sf.send([0x5,0,0,0],FCS) =new Uint8Array([255, 3, 3, 3]) >sf.send([0x5,0,0,0,0,0,0,0,0,0,0,0],FCS) =new Uint8Array([255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) >sf.send([0x6],FCS);sf.send([0x2,0,0,0,1,2,3,4,5,6,7,8,9,10],FCS);sf.send([0x5,0,0,0],FCS) =new Uint8Array([255, 0, 0, 0]) >sf.send([0x3,0,0,0,0,0,0,0,0,0,0,0],FCS) =new Uint8Array([0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8])
And what is interesting is that since then also the software serial and the builtin espruino flash storage started to work - I could erase again and write different data and it all works now.
So not sure what really happened. Did not try removing battery yet if it breaks again, will try.
-
I use original charging cable that came with it plugged into my cable that has usb female on one side - cut from some generic usb extension cable I had - something like visible here https://github.com/fanoush/ds-d6/blob/master/photos/dfu-serial-updating.jpg here it is for serial but bangle has SWD on usb data pins. Have no photo for now but can make one with bangle 2 and stlink.
-
p8 got 5 variants and i bought the troublesome one, bad experience.
you would buy 'troublesome one' if you'd get one based on Goodix GR5515 CPU as some other people got, as long as it is nrf52832 they are just different :-)
i'll better pay more and buy the version that is used by most people
Oh, if you know which one it is (I don't) then how will you find shop that still sells it? It may be quite random what you get, most sellers even don't know (or care) what version they are shipping. That may be one advantage of Pinetime - it is basically a P8 but you pay extra to get same version as others.
-
-
i got a sealed pinetime so cant do developement
not true, can be programmed over BLE too and you can of course take it apart if you prefer SWD
i saw from eucwath or else, the p8/pinetime espruino is just v2.14 vs latest v2.19,
any one can comment is it hard to pick from what others have been done?I'd say it is almost trivial but I may be wrong :-) For starting and learning the version is not important. By the time you learn enough (even with older version) you won't be asking that question. I did not update my builds mainly because nobody had issues with older version and it is probably the same reason for other builds you found. So feel free to jump in. Building your own build from source for any device is a good start.
And BTW Pinetime or P8 is 52832 based watch like Bangle 1. Bangle 2 is 52840 based so it has 4x the RAM (256 vs 64 KB) and 4x faster SPI for updating the display. There are also very cheap hackable 52840 watches like C17/Magic3 or QY03
https://www.aliexpress.com/item/1005005373233740.html
https://www.aliexpress.com/item/1005002688104850.html
However I am not saying that P8 is not good enough, it is perfectly fine too. -
and got fake ones.
Oh, bad luck. All I got were good nrf52832, no issues at all.
First I ordered
https://www.aliexpress.com/item/1005005845252482.html , https://www.aliexpress.com/item/1005005829460356.html and
https://www.aliexpress.com/item/1005005820599424.html one was different board than the other two, these were relatively expensive - about $9 including shipping. Then I got few more of this third variant with empty SPI flash pads - current link in previous post, these were cheaper.Now I have 3 flashed with Espruino, each board different variant, and also got couple of spare unused ones of the third variant - could send you some to Germany if you don't find good seller. Only one variant has buzzer that is actually audible from a distance, the rest is very quiet so the buzzer is mostly worthless - maybe good as a feedback that you clicked the button but the microswitch click is good enough for that too. Or maybe as a feedback that NFC communication started but when using the phone it already vibrates for that.
-
found 2MB chips here https://www.aliexpress.com/item/1005004379141351.html - will try to kill at least one NFCBoxLink board by adding it via reflowing by hot air. It is not that much useful there, I know, but still :-)
So I got couple of those W25Q16JVUXIQ USON-8 2x3mm flash chips from that aliexpress shop and tried one with this Amiibo board and it works :-)
>var sf=new SPI(); // SPI flash =SPI: { } >var FCS=D19;FCS.write(1); =undefined >sf.setup({sck:D12,mosi:D11,miso:D18,mode:3}); =undefined >sf.send([0xab],FCS); =new Uint8Array(1) >print(sf.send([0x9f,0,0,0],FCS)) new Uint8Array([255, 239, 64, 21]) =undefined
Got flash ID from the chip - 239, 64, 21 = 2MB winbond flash :-)
Photos here https://ibb.co/album/yhhkwZ, left = modified board with W25Q16JVUXIQ added (I also previously removed buzzer, was trying to add piezo or something else), right another original board with no modification
Still, it is probably not that much useful, but I simply wanted to try :-)
It was first test of hot air gun I got recently https://www.aliexpress.com/item/4000525251154.html
Never did this before. It worked 3rd time. First it looked OK but I got no response over SPI, on 2nd try it got worse and moved in wrong way, third time I added more flux realigned and it works now :-) I did not add pull up resistors to WP and HOLD but seems to work without it (did not try writing yet).EDIT: and BTW the shop lowered the price even more https://www.aliexpress.com/item/1005005571264919.html I see it as US $2.70 including VAT. Ordered another two pieces with $2.77 aliexpress saver shipping so it was total US $8.17 including shipping for two = about $4 for one :-) let's see if I really get it with this untracked shipping.
-
but the espruino compiler isn't releasing memory when splice or shift.
it is interpreter, compilers are supposed to compile, not manage runtime memory
Just tried slice, splice, shift and also pop, at least in simple cases it works
____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v19.182 (c) 2023 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate >a=[];i=0 =0 >process.memory() ={ free: 13978, usage: 22, total: 14000, history: 9, gc: 0, gctime: 2.469, blocksize: 18 } >for (var i=0;i<100;i++)a.push(i) =undefined >process.memory() ={ free: 13878, usage: 122, total: 14000, history: 13, gc: 0, gctime: 2.435, blocksize: 18 } >while(a.length)a.shift() =undefined >process.memory() ={ free: 13978, usage: 22, total: 14000, history: 16, gc: 0, gctime: 1.872, blocksize: 18 } >for (var i=0;i<100;i++)a.push(i) =undefined >process.memory() ={ free: 13878, usage: 122, total: 14000, history: 16, gc: 0, gctime: 1.664, blocksize: 18 } >for (i=0;i<100;i++)a.push(i) =undefined >process.memory() ={ free: 13778, usage: 222, total: 14000, history: 20, gc: 0, gctime: 0.697, blocksize: 18 } >while(a.length)a.shift() =undefined >process.memory() ={ free: 13978, usage: 22, total: 14000, history: 20, gc: 0, gctime: 2.424, blocksize: 18 } >for (i=0;i<100;i++)a.push(i) =undefined >process.memory() ={ free: 13878, usage: 122, total: 14000, history: 20, gc: 0, gctime: 2.41, blocksize: 18 } >while(a.length)a.pop() =undefined >process.memory() ={ free: 13978, usage: 22, total: 14000, history: 23, gc: 0, gctime: 0.525, blocksize: 18 } >for (i=0;i<100;i++)a.push(i) =undefined >a=a.slice(50) =[ 50, 51, 52, 53, 54, ... 95, 96, 97, 98, 99 ] >process.memory() ={ free: 13928, usage: 72, total: 14000, history: 25, gc: 0, gctime: 0.528, blocksize: 18 } >while(a.length)a.pop() =undefined >process.memory() ={ free: 13978, usage: 22, total: 14000, history: 25, gc: 0, gctime: 0.687, blocksize: 18 } > >a=[1,2,3,4,5] =[ 1, 2, 3, 4, 5 ] >process.memory() ={ free: 13973, usage: 27, total: 14000, history: 30, gc: 0, gctime: 0.812, blocksize: 18 } >a.splice(3,2,10,11) =[ 4, 5 ] >a =[ 1, 2, 3, 10, 11 ] >process.memory() ={ free: 13973, usage: 27, total: 14000, history: 30, gc: 0, gctime: 2.526, blocksize: 18 } >a.splice(3,2) =[ 10, 11 ] >process.memory() ={ free: 13975, usage: 25, total: 14000, history: 34, gc: 0, gctime: 2.294, blocksize: 18 } >a =[ 1, 2, 3 ] >
check
usage
, goes up and down as expectedIt will limit you from creating good stable apps
For me good and stable app is not bloated app that runs slow (=drains more battery) and needs lot of memory.
which are easy to maintain and extend. Most of the apps in the current app library are not extendable or maintainable.
This is debatable. Smaller code without unneeded abstractions can be easy to maintain and extend too. Someone else may see your perfectly testable and extensible code hard too. Also the size of typical watch app is not that big and people write it for fun and for free so extendable and maintainable may not be even the goal here.
-
you can monitor RX pin with setWatch (with input pulldown) and when it goes up you reconfigure it as serial, I had it like this on DS-D6
https://gist.github.com/fanoush/ce461c73c299834bcb53a615721b5a2e#file-dsd6-js-L234You could also have pull up and monitor when it goes low if the serial is permanently attached and the pin is high but first character may be lost, which is still ok for console if you first press Enter and wait a bit.
For ds-d6 I went with first option so console was enabled when I plugged it into usb female attached to usb serial adapter.
-
-
-
That was one of the things that was specifically called out in Pebble development. The display was updated a horizontal row at a time, and a whole row had to be sent. So even if you were only updating a rectangle 10 px high by 3 px wide, you'd still have to send the entire 10 rows
Yes, that is true also here, display is updated in whole lines. Framebuffer is in RAM, pixels are updated as needed, then at flip() time whole area between min and max modified Y coordinate is sent from RAM to the display (3 bits per pixel - 66 bytes per line).
And the display's power consumption increased dramatically when updating.
the watch has LPM013M126 display, found two datasheets for A and C versions, both have same table on page 9
https://www.j-display.com/product/pdf/Datasheet/4LPM013M126A_specification_Ver02.pdf#page=9
https://www.j-display.com/product/pdf/Datasheet/5LPM013M126C_specification_ver03.pdf#page=9Both values (no update vs data update) are very very low (116uW=~40uA at 3V absolute maximum or 10/3=3.3uA typical).
CPU draws 4mA when not in sleep, SPI DMA transfer draws about 1mA (CPU can sleep) so both drawing and sending data takes far more power on CPU side.
datasheet says max SPI frequency is 2MHz (page 10), we use 4 here https://github.com/espruino/Espruino/blob/master/libs/graphics/lcd_memlcd.c#L401
=500KB/s, whole display is 11.6KB so about 23ms (at ~1mA) to send over SPI (or 0.13ms per line)I'd guess the javascript code to compute and draw anything to framebuffer takes more than 23ms .
Maybe on Pebble if the drawing code is native then updating screen over SPI may take proportionally more time than producing the change as the SPI frequency is quite low. But in both cases it is the nrf52 chip that consumes most of the energy here, not the display.
But still for the whole watch it can be said that "power consumption increases dramatically when updating the screen" because otherwise everything sleeps most of the time. Well, unless you have backlight or GPS turned on :-) https://www.espruino.com/Bangle.js2#power-consumption
-
button press is taken by first unlocking and second entering menu. Not sure you get touch event when input is locked but after pressing button to unlock you should get the touch event when screen is touched.
Yes. However I guess it is not the display itself that consumes that much power on update it is the CPU wakeup and activity to produce something drawable before sending the result to display, here it is also the JavaScript interpreter that takes milliseconds to execute even few lines of code.
-
My first thought was that bangle was keeping files read from strorage (which I do in "loadRoute") in memory
Storage.read
returns just pointer to flash. However RAM is used once you start manipulating the data (like reading short blocks from storage and concatenating them) so sometimes it may be better to 'read' whole file at once and just iterating over the big string or array than reading in small chunks and possibly joining them back. so depends on your loadRoute code whether it ' was keeping files read from storage in memory' . If it was just iterating over it there is no data to garbage collect.Also the interpreter is running code directly from flash not using RAM. Unless you upload code to RAM, then it of course needs more RAM for storing uploaded code.
-
Strange characters also appear on the serial monitor
this is caused by incorrectly set baud rate on COM port, installed firmware is using different speed than you set there (9600 in bottom right)
I think the software it came with is damaged.
no, not 'damaged', it is no longer there at all, you overwrote it by installing other ones on top of it, and there is probably no point in installing it (and we can hardly guess which one it was)
If you want to use Arduino I'd start from scratch and follow some tutorial like https://techtutorialsx.com/2016/02/28/esp8266-uploading-code-from-arduino-ide/
Also for Arduino issues it is better to ask in some Arduino forum, not here
-
Shame no1 linked to it (and I wasn't able to find it) when I was asking about which version of javascript Espruino is based on.
You got that link right here https://forum.espruino.com/conversations/388506/#17058616 when you asked :-)
-
Where does the changed code for (change #1) now live. Is it in my forked repository ?
yes, the PR is based on branch in your repo that you want to merge to upstram repo so any change in that branch goes to the PR. I think there is no other way for changes done by others so you need to pull that branch and possibly merge those changes back to your local repo before you can push more changes
Can anyone show me where the 'Update' button is on a github repo.
not sure I understand but there is sync button on the branch
-
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 as3sCt3v4BHvH//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////w==
The first page is very similar and does not change.
Then I did pairing from linux side and the second page changed into3sCt3v4BHvEHwBQAAMAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAZrqpYvGRPZthHF+yDRG8k87z/U1JjQABagnjvAQDN7I+xxRW4Bvy4O/wo7gT5+57B+UAA9GT7P0A1vgYD2gbAAQAAwAAAAgAAAAEAAAAIwAQAAMAAAAMAAAADAAAACAAQAAIAAQDNygAA/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////w==
Also I noticed security status shows
NRF.getSecurityStatus() ={ advertising: false, connected: true, encrypted: true, mitm_protected: false, bonded: true, connected_addr: "64:bc:58:aa:ae:19 public" }
so there is encrypted true, bonded true. Then I rebooted device and reconnected and it changed into
3sCt3v4BHvEHwBQAAMAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAZrqpYvGRPZthHF+yDRG8k87z/U1JjQABagnjvAQDN7I+xxRW4Bvy4O/wo7gT5+57B+UAA9GT7P0A1vgYD2gbAAQAAwAAAAgAAAAEAAAAAAAQAAMAAAAMAAAADAAAACAAQAAIAAQDNygAAAAAEAADAAAAEAAAAAwAAAAgAEAACAAEAzcoAAAjABAAAwAAABQAAAAMAAAAIABAAAgABAM3KAAD//////////////////////////////////////////////////////////////////////////w==
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 records3sCt3v4BHvEHwBQAAMAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAZrqpYvGRPZthHF+yDRG8k87z/U1JjQABagnjvAQDN7I+xxRW4Bvy4O/wo7gT5+57B+UAA9GT7P0A1vgYD2gbAAQAAwAAAAgAAAAEAAAAAAAQAAMAAAAMAAAADAAAACAAQAAIAAQDNygAAAAAEAADAAAAEAAAAAwAAAAgAEAACAAEAzcoAAAAABAAAwAAABQAAAAMAAAAIABAAAgABAM3KAAAIwAQAAMAAAAYAAAADAAAACAAQAAIAAQDNygAA/////////////////////////////////////w== 3sCt3v4BHvEHwBQAAMAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAZrqpYvGRPZthHF+yDRG8k87z/U1JjQABagnjvAQDN7I+xxRW4Bvy4O/wo7gT5+57B+UAA9GT7P0A1vgYD2gbAAQAAwAAAAgAAAAEAAAAAAAQAAMAAAAMAAAADAAAACAAQAAIAAQDNygAAAAAEAADAAAAEAAAAAwAAAAgAEAACAAEAzcoAAAAABAAAwAAABQAAAAMAAAAIABAAAgABAM3KAAAAAAQAAMAAAAYAAAADAAAACAAQAAIAAQDNygAACMAEAADAAAAHAAAAAwAAAAgAEAACAAEAzcoAAA== 3sCt3v4BHvEHwBQAAMAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAZrqpYvGRPZthHF+yDRG8k87z/U1JjQABagnjvAQDN7I+xxRW4Bvy4O/wo7gT5+57B+UAA9GT7P0A1vgYD2gbAAQAAwAAAAgAAAAEAAAAAAAQAAMAAAAMAAAADAAAACAAQAAIAAQDNygAAAAAEAADAAAAEAAAAAwAAAAgAEAACAAEAzcoAAAAABAAAwAAABQAAAAMAAAAIABAAAgABAM3KAAAAAAQAAMAAAAYAAAADAAAACAAQAAIAAQDNygAAAAAEAADAAAAHAAAAAwAAAAgAEAACAAEAzcoAAA== CMAEAADAAAAIAAAAAwAAAAgAEAACAAEAzcoAAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////w==
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
NRF.getSecurityStatus() ={ advertising: false, connected: true, encrypted: false, mitm_protected: false, bonded: true, connected_addr: "64:bc:58:aa:ae:19 public" }
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 this3sCt3v4BHvEAABQAAMAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAZrqpYvGRPZthHF+yDRG8k87z/U1JjQABagnjvAQDN7I+xxRW4Bvy4O/wo7gT5+57B+UAA9GT7P0A1vgYD2gbAAQAAwAAAAgAAAAEAAAAAAAQAAMAAAAMAAAADAAAACAAQAAIAAQDNygAAAAAEAADAAAAEAAAAAwAAAAgAEAACAAEAzcoAAAAABAAAwAAABQAAAAMAAAAIABAAAgABAM3KAAAAAAQAAMAAAAYAAAADAAAACAAQAAIAAQDNygAAAAAEAADAAAAHAAAAAwAAAAgAEAACAAEAzcoAAA== AAAEAADAAAAIAAAAAwAAAAgAEAACAAEAzcoAAAfAFAAAwAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAABmuqli8ZBhGCfWMrObG4It5lSB38yJAANI2qOvqjzATvQ8Furn7uxrS8kakk1e6b5EtQADt6Vtdj5PQBlvLCMAEAADAAAAKAAAAAwAAAAgAEAACAAEAzcoAAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////w==
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.
-
Sorry for a lot of noise. Maybe you said that not only 'turn off' but every reboot actually breaks it? Then it is not the RAM. Or it is, but application startup clears it too.
Maybe I see something similar or related. In Chrome on Linux when I try to connect via webide it works and device is remembered in the list. Then I can disconnect and reconnect many times just fine. However if I reboot the watch the remembered item in the connect window stops working and I need to search for the watch again via first
Web Bluetooth
item. Then I see the device in the list and it has the '- paired' suffix there and when clicking connect it works. However I guess this is not related to bonding but it is interesting, why reboot would break that? Doing justNRF.restart()
which restarts the SoftDevice does not break it.EDIT: Chrome in Linux or the Bluez stack probably adds some of its own issues so it is not good example or benchmark. When trying more it has issues even when i turn BLE off in watch settings, then when turning BLE back on I see 'Bluetooth Device is no longer in range.' and it does not come back, I need to search again. The error message I mentioned earlier that happens after reboot is reported as "NetworkError: Connection Error: Connection attempt failed.'
-
-
And btw the softOff would be enough for your habit of turning it off so often, the real off makes sense if putting it away for several months.
Maybe the RAM can be kept on by poking the registers
RAM[x].POWER
directly bypoke32
before turning it off (unless they are protected), more info
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=5_2_0_17_1#unique_2047546596EDIT: they are protected, and RAM is indeed set to be turned off too
peek32(0x40000000+0x524).toString(16)
, you can try to run this to change itsetTimeout(function() { NRF.restart(function(){ poke32(0x40000554,3|3<<16) poke32(0x40000524,3|3<<16) }) }, 2000);NRF.disconnect();
to enable RAM retention in OFF mode and then you can try to power it off if it makes a difference.
Copy paste (ctrl+v) whole block when connected to watch via IDE https://www.espruino.com/ide/
It will disconnect. Then reconnect in few seconds and check via peek32 if the value changed. -
Reboot is almost like power off regarding starting of the firmware but power off turns off also the the RAM (most probably, it is configurable). So if something regarding bond info is stored in RAM it is lost. However since static data defined is C source that goes to RAM is reinitialized and bss section is cleared every startup it must be something else - like special linker section just for this. Maybe this can be tested by keeping the RAM on when doing 'power off'
just checked and there are actually two methods -off and softOff not sure which one is used
https://github.com/espruino/Espruino/blob/eccac25814d50e31e613ac682e56ab439eb64575/libs/banglejs/jswrap_bangle.c#L5281
can you try to call one or another to see if it makes a difference?Has the bonding info some time validity so it can be invalid because time gets reset to 1970?
-
(1024*1024)-(10*4096)
the bootloader is at 0xf7000 not 0xf8(?) https://github.com/espruino/Espruino/blob/master/targetlibs/nrf5x_15/nrf5x_linkers/secure_bootloader_gcc_nrf52.ld#L8
so FDS should start at at 0xf5000 = (1024*1024)-((9+2)*4096)
orpeek32(0x10001014)-2*4096
we need to load the info out of them at boot time somehow?
Was expecting that the code here does it
https://github.com/espruino/Espruino/blob/1f80e6e69b0435d5d960ac11e9f05c46158c34f6/targets/nrf5x/bluetooth.c#L2264
at least that line is failing when FDS storage is full/corrupted and it clears it and retries to continue
That is what the wikipedia link says too. Still we are talking about smartwatch here with tiny battery, not phone. Currently it loses phone connectivity even when you move 10m away and GPS is not the best one even as a receiver. Also we are talking about component that costs about dollar or two (and is connected over simple uart we have under complete control)
Anyway, point taken, next bangle 3 should not be huawei mate 60 pro.
And BTW since we have quite a lot of posts from you in many topics it would be nice if you would chose a nick.