The SmartWatch firmware is updated over USB, using the DFU (Device Firmware Upgrade) format. There are several open source tools available to do this, but the instruction above is for the dfu-util tool. The developers of dfu-util offer binaries for Windows, Mac OSX and Linux distributions, and if you want to learn more about how dfu-util works, you can check out the dfu-util manual page.
However, the main dfu-util instructions that are used in this case are:
Lists the attached DFU capable USB devices.
-c, –cfg CONFIG-NR
Specifies the Configuration number for of the DFU device. Note that this is only used for matching. The configuration is not set by dfu-util.
-i, –intf INTF-NR
Specifies the DFU Interface number.
-a, –alt ALT
Specifies the altsetting of the DFU interface by name or by number.
-D, –download FILE
Writes firmware from FILE on to the device.
When the SmartWatch is in DFU mode, you can list the SmartWatch device with the dfu-util.
As you can see, there are two flashable DFU areas on SmartWatch.
- Internal Flash – this is area should be your target when flashing the alternative firmware, as this is where the SmartWatch firmware is located. The area consists of 12 sectors, for a total of 1 Mb.
- Sectors 1-3, 16 Kb, read-only.
- Sector 4, 16 Kb sector, read-write.
- Sector 5, 64 Kb, read-write.
- Sectors 6-12, 128 Kb, read-write.
- OTP area – OTP means One Time Programming. Note! This area should NOT be updated or you may brick the device.
You update the Internal Flash area by specifying the altsetting of the DFU interface. And to be completely sure you are not targeting some other connected DFU device, you should also state the Configuration number and the DFU Interface number.
If you list the device with the dfu-util, you will see that the Configuration number is 1 (cfg=1), the DFU Interface number is 0 (intf=0) and the Altsetting is 0 (alt=0). This is why we get the update command dfu-util -c 1 -i 0 -a 0 -D SmartWatch.dfu
If you run that command, you will get the following result:
This means the alternative firmware has successfully been flashed to the SmartWatch device. Just restart the device and it will now be running the alternative firmware.