mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-12 12:08:13 +08:00
Added an init packet which (for recent DFU OTA protocols) must transferred before the firmware image.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
<script>
|
||||
var urlMask = "//thegecko.github.io/web-bluetooth-dfu/firmware/NRF51822_{0}_Rob_OTA.hex";
|
||||
var urlMask52 = "https://raw.githubusercontent.com/mjdietzx/web-bluetooth-dfu/develop/firmware/ble_app_hrs_with_dfu_nrf52.hex";
|
||||
var resultsEl = document.getElementById("results");
|
||||
|
||||
function log(message) {
|
||||
@@ -35,7 +36,8 @@
|
||||
|
||||
function transfer(device) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var url = urlMask.replace("{0}", device.name === "Hi_Rob" ? "Bye" : "Hi");
|
||||
//var url = urlMask.replace("{0}", device.name === "Hi_Rob" ? "Bye" : "Hi");
|
||||
var url = urlMask52; // nRF52832 application (example BLE heart rate from Nordic SDK) for DFU OTA update.
|
||||
|
||||
download(url)
|
||||
.then(hex => {
|
||||
|
||||
Reference in New Issue
Block a user