summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-26 18:18:17 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-26 18:18:17 (GMT)
commit17a8cfc34638d14167d33c1f2b094813446e5c5b (patch)
tree877ced3a16dbc2be70173dd048a9a2ec7954d2e9
parent5ce0d4cd6fdc71d8db83f3e8869d5db226922db3 (diff)
tools: ota-dfu: Include a Linux-native OTA DFU tool
-rw-r--r--.gitmodules3
-rw-r--r--README.md21
m---------tools/ota-dfu0
3 files changed, 18 insertions, 6 deletions
diff --git a/.gitmodules b/.gitmodules
index cc94518..20c2c34 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -19,3 +19,6 @@
[submodule "tools/micropython-font-to-py"]
path = tools/micropython-font-to-py
url = https://github.com/peterhinch/micropython-font-to-py
+[submodule "tools/ota-dfu"]
+ path = tools/ota-dfu
+ url = https://github.com/daniel-thompson/ota-dfu-python
diff --git a/README.md b/README.md
index fd46538..b063dab 100644
--- a/README.md
+++ b/README.md
@@ -51,12 +51,15 @@ Note: *If you have a new PineTime then it will have been delivered with
flash protection enabled. You must disable the flash protection before
trying to program it.*
-* Use an SWD programmer to install `bootloader.hex` to the PineTime.
- This file is an Intel HEX file containing both the bootloader and
- the Nordic SoftDevice. Be careful to disconnect cleanly from the
- debug software since just pulling out the SWD cable will mean the
- nRF52 will still believe it is being debugged (and won't properly
- enter deep sleep modes).
+Use an SWD programmer to install `bootloader.hex` to the PineTime. This
+file is an Intel HEX file containing both the bootloader and the Nordic
+SoftDevice. Be careful to disconnect cleanly from the debug software
+since just pulling out the SWD cable will mean the nRF52 will still
+believe it is being debugged (and won't properly enter deep sleep
+modes).
+
+To install using Android device:
+
* Copy `micropython.zip` to your Android device and download nRF Connect
for Android if you do not already have it.
* In nRF Connect, choose settings and reduce the DFU packet count from
@@ -64,6 +67,12 @@ trying to program it.*
* Connect to PineDFU using nRFConnect, click the DFU button and send
`micropython.zip` to the device.
+To install using Linux and ota-dfu:
+
+* Look up the MAC address for your watch (try: `sudo hcitool lescan`).
+* Use ota-dfu to upload `micropython.zip` to the device. For example:
+ `tools/ota-dfu/dfu.py -z micropython.zip -a A0:B1:C2:D3:E3:F5 --legacy`
+
At the end of this process your watch will show the time (03:00) together
with a date and battery meter. When the watch goes into power saving mode
you can use the side button to wake it again.
diff --git a/tools/ota-dfu b/tools/ota-dfu
new file mode 160000
+Subproject 9cc61db89ec80ddbdc7a1ecee605cb5d4c391e1