Question

Sorry for the long intro, but it helps explaining the context of the question.

I've been trying to understand more about how the smart watch works to write a custom firmware for it by reading the arduino-like code that was posted on github. I noticed that all the examples have in the loop() function the following code:

if(digitalRead(BUTTON)) standardShutdown();

This line appears to be monitoring the power button, and in case it's pressed, shut down the watch. This raises a concern, though. The boot chain as I've understood so far is this: when the watch is turned on, it starts executing the bootloader code at the address 0x08000000. If the USB is connected and the user pushes the button within one second, it enters dfu mode and allows to download a new firmware. Otherwise, the user code, which sits at 0x08040000 is run.

Now, what happens if due to a programmer mistake, the code enters an infinite loop, and never checks the power button nor shutdown? Is there a way to force-reset the watch (such as holding the power button for five seconds, connecting the usb cable with the button pressed or some combination like that) to run the bootloader again, and download a new firmware? If there isn't, will a mistake that causes an infinite loop brick the watch permanently?

Normally I would just try and see what happens, but I don't want to brick my watch, that's why I'm asking here.

Was it helpful?

Solution

If you remove the USB power and hold the button for 10 seconds, it will power off (with USB power applied power-off is not possible). The magic recovery sequence is to get the watch powered off and hooked to its USB cable, but DON'T plug the USB cable into the PC yet. Now, push in the watch's power button, and then insert the USB connector to your PC, and then release the power button. You have to do this sequence within one second! This will put the watch into DFU mode (its display will have a green bar at the bottom of the screen), and you can now reflash it.

Instructions from Sony are here:

http://developer.sonymobile.com/services/open-smartwatch-project/how-to-flash-alternative-firmware-to-smartwatch/

Perhaps the watch is not unbrickable, but Sony seems to have done a decent job of setting things up so you can usually recover.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top