public interface BootloaderScanner
The DFU Bootloader may advertise with the same address as an application (in case of the buttonless update) or one incremented by 1 (in case of jumping to the DFU mode with a button, or after flashing the new Soft Device (flashing new SD removes the old application)).
The DFU service always connects to the address given as a parameter. However, when flashing SD+BL+App it will first send the SD+BL as part one followed by the App in the second connection. As the service does not know which address was used in the first connection (normal, when buttonless update, or +1 when with-button update) we have to scan for the advertising device after SD+BL part is completed.
Modifier and Type | Field and Description |
---|---|
static int |
ADDRESS_DIFF
The bootloader may advertise with the same address or one with the last byte incremented by this value.
|
static long |
TIMEOUT
After the buttonless jump from the application mode to the bootloader mode the service will wait this long for the advertising bootloader (in milliseconds).
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
searchFor(java.lang.String deviceAddress)
Searches for the advertising bootloader.
|
static final long TIMEOUT
static final int ADDRESS_DIFF
java.lang.String searchFor(java.lang.String deviceAddress)
deviceAddress
- the application device address