364 lines
17 KiB
HTML
364 lines
17 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_152-release) on Fri Nov 17 17:43:02 CET 2017 -->
|
|
<title>DfuSettingsConstants</title>
|
|
<meta name="date" content="2017-11-17">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="DfuSettingsConstants";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/R.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?no/nordicsemi/android/dfu/DfuSettingsConstants.html" target="_top">Frames</a></li>
|
|
<li><a href="DfuSettingsConstants.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li>Method</li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li>Method</li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">no.nordicsemi.android.dfu</div>
|
|
<h2 title="Interface DfuSettingsConstants" class="title">Interface DfuSettingsConstants</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public interface <span class="typeNameLabel">DfuSettingsConstants</span></pre>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_ASSUME_DFU_NODE">SETTINGS_ASSUME_DFU_NODE</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_DEFAULT_MBR_SIZE">SETTINGS_DEFAULT_MBR_SIZE</a></span></code>
|
|
<div class="block">The default value of the MBR size.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_MBR_SIZE">SETTINGS_MBR_SIZE</a></span></code>
|
|
<div class="block">This property must contain an integer value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_NUMBER_OF_PACKETS">SETTINGS_NUMBER_OF_PACKETS</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_NUMBER_OF_PACKETS_DEFAULT">SETTINGS_NUMBER_OF_PACKETS_DEFAULT</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_PACKET_RECEIPT_NOTIFICATION_ENABLED">SETTINGS_PACKET_RECEIPT_NOTIFICATION_ENABLED</a></span></code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="SETTINGS_PACKET_RECEIPT_NOTIFICATION_ENABLED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SETTINGS_PACKET_RECEIPT_NOTIFICATION_ENABLED</h4>
|
|
<pre>@Deprecated
|
|
static final java.lang.String SETTINGS_PACKET_RECEIPT_NOTIFICATION_ENABLED</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<div class="block">This property must contain a boolean value.
|
|
<p>If true (default) the Packet Receipt Notification procedure will be enabled. See DFU documentation on http://infocenter.nordicsemi.com for more details.
|
|
The number of packets before receiving a Packet Receipt Notification is set with property <a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_NUMBER_OF_PACKETS"><code>SETTINGS_NUMBER_OF_PACKETS</code></a>.
|
|
|
|
This constant is now deprecated. Please, use <a href="../../../../no/nordicsemi/android/dfu/DfuServiceInitiator.html#setPacketsReceiptNotificationsEnabled-boolean-"><code>DfuServiceInitiator.setPacketsReceiptNotificationsEnabled(boolean)</code></a> to set it.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuSettingsConstants.SETTINGS_PACKET_RECEIPT_NOTIFICATION_ENABLED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="SETTINGS_NUMBER_OF_PACKETS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SETTINGS_NUMBER_OF_PACKETS</h4>
|
|
<pre>@Deprecated
|
|
static final java.lang.String SETTINGS_NUMBER_OF_PACKETS</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<div class="block">This property must contain a positive integer value, usually from range 1-200.
|
|
<p>The default value is <a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_NUMBER_OF_PACKETS_DEFAULT">12</a>. Setting it to 0 will disable the Packet Receipt Notification procedure.
|
|
When sending a firmware using the DFU procedure the service will send this number of packets before waiting for a notification.
|
|
Packet Receipt Notifications are used to synchronize the sender with receiver. On Android, calling <code>BluetoothGatt.writeCharacteristic(BluetoothGattCharacteristic)</code>
|
|
will simply add the packet to outgoing queue before returning the callback. Adding the next packet in the callback is much faster than the real transmission (also the speed depends on
|
|
the device chip manufacturer) and the queue may reach its limit. When does, the transmission stops and Android Bluetooth hangs. Using PRN procedure eliminates this problem as
|
|
the notification is send when all packets were delivered the queue is empty.
|
|
<p>Note: this bug has been fixed on Android 6.0 Marshmallow and now no notifications are required. The onCharacteristicWrite callback will be
|
|
postponed until half of the queue is empty.
|
|
|
|
This constant is now deprecated. Please, use <a href="../../../../no/nordicsemi/android/dfu/DfuServiceInitiator.html#setPacketsReceiptNotificationsValue-int-"><code>DfuServiceInitiator.setPacketsReceiptNotificationsValue(int)</code></a> to set it.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuSettingsConstants.SETTINGS_NUMBER_OF_PACKETS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="SETTINGS_NUMBER_OF_PACKETS_DEFAULT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SETTINGS_NUMBER_OF_PACKETS_DEFAULT</h4>
|
|
<pre>@Deprecated
|
|
static final int SETTINGS_NUMBER_OF_PACKETS_DEFAULT</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<div class="block">The default value of <a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_NUMBER_OF_PACKETS"><code>SETTINGS_NUMBER_OF_PACKETS</code></a> property. Different phones sent a different number of packets each connection interval. The values are (for tested phones):
|
|
<ul>
|
|
<li>1 packet - Nexus 4 and Nexus 7 and others</li>
|
|
<li>4 packets - Nexus 5 and Nexus 6 and others</li>
|
|
<li>6 packets - LG F60 and others</li>
|
|
</ul>
|
|
The least common multiplier is 12 which is reasonably small. You may try other values, like 24 etc.
|
|
Values higher than ~300 may cause the Bluetooth outgoing queue overflow error on Android versions before Marshmallow.
|
|
|
|
This constant is now deprecated. Please, use <a href="../../../../no/nordicsemi/android/dfu/DfuServiceInitiator.html#setPacketsReceiptNotificationsValue-int-"><code>DfuServiceInitiator.setPacketsReceiptNotificationsValue(int)</code></a> to set it.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuSettingsConstants.SETTINGS_NUMBER_OF_PACKETS_DEFAULT">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="SETTINGS_MBR_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SETTINGS_MBR_SIZE</h4>
|
|
<pre>static final java.lang.String SETTINGS_MBR_SIZE</pre>
|
|
<div class="block">This property must contain an integer value.
|
|
<p>Size of the MBR (Master Boot Record) for the target chip. This applies only if you are using HEX files. The HEX_to_BIN parser included in the library will skip the addresses
|
|
from 0 to this value. By default for nRF51 and the SoftDevice S110 this value is equal 4096 (0x1000 HEX) and for nRF52 has to be changed to 12288 (0x3000). If you want to send
|
|
a firmware in HEX onto another MCU via nRF chip, set this value to 0.
|
|
<p>If you are using the PC nrf util tool to create a ZIP Distribution Packet with the firmware and Init Packet this option does not apply as the nrf tool will convert HEX to BIN itself.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuSettingsConstants.SETTINGS_MBR_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="SETTINGS_DEFAULT_MBR_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SETTINGS_DEFAULT_MBR_SIZE</h4>
|
|
<pre>static final int SETTINGS_DEFAULT_MBR_SIZE</pre>
|
|
<div class="block">The default value of the MBR size.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html#SETTINGS_DEFAULT_MBR_SIZE"><code>SETTINGS_DEFAULT_MBR_SIZE</code></a>,
|
|
<a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuSettingsConstants.SETTINGS_DEFAULT_MBR_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="SETTINGS_ASSUME_DFU_NODE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>SETTINGS_ASSUME_DFU_NODE</h4>
|
|
<pre>@Deprecated
|
|
static final java.lang.String SETTINGS_ASSUME_DFU_NODE</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
|
|
<div class="block">This property must contain a boolean value.
|
|
<p>The <a href="../../../../no/nordicsemi/android/dfu/DfuBaseService.html" title="class in no.nordicsemi.android.dfu"><code>DfuBaseService</code></a>, when connected to a DFU target will check whether it is in application or in DFU bootloader mode. For DFU implementations from SDK 7.0 or newer
|
|
this is done by reading the value of DFU Version characteristic. If the returned value is equal to 0x0100 (major = 0, minor = 1) it means that we are in the application mode and
|
|
jump to the bootloader mode is required.
|
|
<p>However, for DFU implementations from older SDKs, where there was no DFU Version characteristic, the service must guess. If this option is set to false (default) it will count
|
|
number of device's services. If the count is equal to 3 (Generic Access, Generic Attribute, DFU Service) it will assume that it's in DFU mode. If greater than 3 - in app mode.
|
|
This guessing may not be always correct. One situation may be when the nRF chip is used to flash update on external MCU using DFU. The DFU procedure may be implemented in the
|
|
application, which may (and usually does) have more services. In such case set the value of this property to true.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#no.nordicsemi.android.dfu.DfuSettingsConstants.SETTINGS_ASSUME_DFU_NODE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../no/nordicsemi/android/dfu/R.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?no/nordicsemi/android/dfu/DfuSettingsConstants.html" target="_top">Frames</a></li>
|
|
<li><a href="DfuSettingsConstants.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li>Method</li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li>Method</li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|