1.5.0 • Published 7 years ago
cordova-plugin-nordic-dfu v1.5.0
This plugin provides dfu implementation to update the boards
Installation
cordova plugin add cordova-plugin-nordic-dfu
Need to add file permission for android MarshMallow from your MainActivity.java
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (checkSelfPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);
}
}
Add the url to the file for the app hex file for server file.
<!-- Add the url based on the device version. For Ex:- for device version is A10/A20 variant is AX0
for B10/B20 variant is BX0 and For B30 varaiant is B30 -->
Need to place version.json along with zip file on server .
<preference name="variant 1" value="zip file url"/>
<preference name="variant 2" value="zip file url"/>
<preference name="variant 3" value="zip file url"/>
Add the file for taking local files.
Need to Place zip file and version.json on Resource folder
<preference name="fileName" value="zip file url"/>
Add this code to the Javascript side.
var updateMessage = {};
updateMessage.uuid = ConnectedPeripheralUUID;
updateMessage.swVersion = "software version from device";
updateMessage.hwVersion = "hardware version from device";
dfuimpl.request('startDFU', JSON.stringify(updateMessage), function(){
console.log('update success');
}, function(){
console.log('update fail');
});
1.5.0
7 years ago
1.4.2
7 years ago
1.4.1
7 years ago
1.4.0
7 years ago
1.3.8
7 years ago
1.3.7
7 years ago
1.3.6
7 years ago
1.3.5
7 years ago
1.3.4
7 years ago
1.3.3
7 years ago
1.3.2
7 years ago
1.3.1
7 years ago
1.3.0
7 years ago
1.2.9
7 years ago
1.2.8
7 years ago
1.2.7
7 years ago
1.2.6
7 years ago
1.2.5
7 years ago
1.2.4
7 years ago
1.2.3
7 years ago
1.2.2
7 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.9
7 years ago
1.1.8
7 years ago
1.1.7
7 years ago
1.1.6
7 years ago
1.1.5
7 years ago
1.1.4
7 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.9
7 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago