Skip to main content

Troubleshooting

This page has two parts:

All our troubleshooting links for wearers are available here: https://corsano.com/knowledge-base/

Problems in your app​

The SDK reports a failure through the error channel of the call you made: the onError callback, a failed Result, a listener. Always log that Throwable: its class and message name the cause. The SDK also keeps its own logs, which you can export for Corsano support, see SDK logs.

SymptomGo to
Every command fails with NotInitializedExceptionCommands fail with NotInitializedException
A call fails with SdkLicenceException, or everything stopped working at onceSdkLicenceException
A command fails with another errorOther command errors
The scan finds no braceletThe scan returns nothing
No data arrives in the databaseNothing downloads
Vital signs arrive, raw data (PPG2, accelerometer, BioZ) does notRaw data does not arrive
A firmware update failsA firmware update fails
The bracelet looks dead after a firmware updateThe bracelet is stuck in its bootloader
The battery level is above 100Battery error detection

Commands fail with NotInitializedException​

Cause. From SDK 2.0.0 the bracelet must be initialized after every connection before it accepts commands. Until the bracelet initialization has finished on the current connection, the SDK rejects every command with NotInitializedException and does not send it. Only the commands of the initialization itself pass. BleDevice.isInitialized is false again after every disconnect.

Fix.

  1. Call enableAutoInitialization once, when your app starts (in Application.onCreate()). The SDK then initializes every bracelet each time it connects:

    DataSdk.getInstance().getManager().enableAutoInitialization(
    InitializationConfig(
    braceletPlan = DevicePlan.HOSPITAL_MULTICOLOR,
    samplingRate = SampleRate.ONE_MIN,
    )
    )
  2. A command you send right after the bracelet connects can still be too early. Wait for the initialization first: manager.ensureInitialized(bleDevice) is a suspend function that returns a successful Result when the bracelet is initialized.

  3. If it still fails, the initialization itself fails. Pass a BraceletInitializationListener to enableAutoInitialization and log its onError. A configuration that the SDK refuses (see Bracelet Plans) is reported there too, and then no bracelet is initialized.

SdkLicenceException​

Cause. The licence check locked the SDK. While it is locked, everything that reaches the bracelet or produces new data fails with SdkLicenceException, a scan ends at once with BleScanEvent.BleScanFailed (-32), a firmware update fails with DfuError.LICENCE_LOCKED (-32), and the automatic download stops. The data already on the phone stays readable.

Fix. Retrying the call does not help. Read SdkLicenceException.reason:

reason (LicenceError)Fix
PhoneDateInvalidThe phone's date is wrong. Ask the user to switch on the automatic date and time, then call DataSdk.recheckLicence().
UnknownThe Corsano cloud does not know your licence key. Check the key you pass in DataSdk.Config.
ExpiredThe subscription of the key has ended or has not started. Contact Corsano.
NotConfirmedThe phone has not reached the Corsano cloud (api.health.cloud.corsano.com) to confirm the key for two days. Give the phone a connection that reaches it, then call DataSdk.recheckLicence(). See Licence Key.
NoLicenceKeyThe SDK started without a licence key: your app does not include the data module, or removed its initialiser from the manifest. The ble and dfu modules do not work without it: add data and pass DataSdk.Config(licenceKey = ...). A recheck does not lift this lock. See Licence Key.

The full description, the LicenceListener and DataSdk.licenceState are in Getting Started, Licence Key.

Other command errors​

ErrorCauseFix
PairingRequiredExceptionThe bracelet answers that it is not paired with this phone.Pair again, see Pairing.
RuntimeException with the message "Watch disconnected"The connection was lost while the command was waiting or running.Wait until the bracelet is connected and initialized again, then send the command again.
TimeoutCancellationException (from awaitCommandV2 with a timeout)No answer within your timeout. A command for a bracelet that is not connected waits in the queue.Check the connection state. Send the command again when the bracelet is connected.
CommandResponseValidationException, InvalidCommandResponseExceptionThe SDK could not use the bracelet's answer. Example: GetBatteryLevelRequest when the bracelet reports a battery error code instead of a level.Log the message. If it stays, export the SDK logs for Corsano support.

How commands are queued and how errors arrive is described in BLE SDK.

The scan returns nothing​

Check these in order:

CauseHow you see itFix
A runtime permission is missingscanner.getMissingPermissions() is not emptyRequest the permissions it returns, then scan.
Bluetooth is offstartScan throws IllegalStateException ("BluetoothLeScanner not found")Ask the user to switch Bluetooth on.
A scan is already runningstartScan throws IllegalStateException ("Scanning already started"); scanner.isScanning() is trueCall stopScan() first.
The SDK is locked by the licence checkThe listener gets BleScanEvent.BleScanFailed with errorCode == BleScanFailed.LICENCE_LOCKED (-32) at onceSee SdkLicenceException.
Android refused the scanThe listener gets BleScanEvent.BleScanFailed with one of Android's ScanCallback.SCAN_FAILED_* codesCall stopScan(), then scan again.
You limited the device typesYou passed deviceTypes to startScan without the type of your braceletLeave deviceTypes out. The default looks for the 287-1B, the 287-2B and bracelets that need recovery.
The bracelet is in its bootloaderIt is reported with a scanType that has needsRecovery == true, without advertisementDataSee The bracelet is stuck in its bootloader.
You use startScanForPusherEventIt only reports a bracelet whose button is being pressedAsk the user to press the button, or use startScan.

The scanning flow is described in Pairing.

Nothing downloads​

The automatic download works like this: your app subscribes the bracelet once, the connected bracelet sends a ping every minute, and each ping starts a download. See Data transfer. When no data arrives, one of these is the cause:

CauseFix
The bracelet was never subscribed.Call subscribeDeviceForDownload(address, hardwareId, plan) once after pairing. The SDK stores the subscription and starts listening for pings again at every start of your app.
The bracelet is not connected, so no ping arrives.Connect with connect(keepAlive = true), so that the SDK reconnects after a lost connection. See Pairing.
The bracelet cannot be initialized. A download initializes the bracelet first, with the configuration of enableAutoInitialization. Without that call (and when you did not initialize the bracelet yourself on this connection) it fails, and the download is tried again later, without end.Call enableAutoInitialization when your app starts. See Commands fail with NotInitializedException.
The SDK is locked by the licence check. The download ends with SdkLicenceException, and triggerDownload does nothing.See SdkLicenceException.
The bracelet is still pairing, or the phone is not authenticated with the bracelet. The SDK holds the downloads that a ping starts.Finish the pairing. triggerDownload is not held back.
The last download started less than a minute ago.Nothing: a ping starts at most one download per minute.
The bracelet is not connected and paired (bonded) in time. A download waits up to 30 seconds for that, then ends with an error.Connect and pair the bracelet, see Pairing.
You called unsubscribeDeviceForDownload or stopAll.Subscribe again.

To see why a download ended, add a completion listener. error is null after a successful download:

import com.corsano.sdk.data.DataSdk
import com.corsano.sdk.data.download.DeviceDownloadClient

val downloadManager = DataSdk.getInstance().getDownloadManager()

downloadManager.getDownloadClient(address, hardwareId, plan).addCompletionListener(
object : DeviceDownloadClient.DownloadCompletionListener {
override fun onDownloadFinished(address: String, error: Throwable?) {
if (error != null) Log.e("Corsano-SDK", "Download of $address failed", error)
}
}
)

Here hardwareId is a HardwareId and plan a DevicePlan, the same values you gave to subscribeDeviceForDownload.

Raw data does not arrive​

The vital signs arrive but a raw file (PPG2, accelerometer, BioZ, ECG, raw temperature) or EmoGraphy does not:

CauseFix
Your licence does not include this raw data. The automatic download then skips the file.Ask Corsano what your licence includes. The phone must have been online for one start of your app after a change. See The licence and raw data.
The plan does not record it.Choose a plan that does, see Bracelet Plans.
The accelerometer, or BioZ and EmoGraphy, is not switched on.Set isAccEnabled or isBiozOrEmographyEnabled in the InitializationConfig. See Enable raw streams.
The bracelet is a 287-1B. The SDK downloads PPG2, EmoGraphy, BioZ, accelerometer, ECG, raw temperature and sleep from a 287-2B only.Use a 287-2B.

A firmware update fails​

startDfu reports a failure in DfuListener.onDfuFailed(address, error). Look at error.errorCode:

errorCodeCauseFix
DfuError.BRACELET_BATTERY_TOO_LOW (-30)The bracelet's battery is below 30 %. Nothing was sent.Charge the bracelet. Start again after at least 3 minutes.
DfuError.START_FAILED (-31)Android refused to start the DFU service, for example because your app was in the background. Nothing was sent.Start again while your app is in the foreground.
DfuError.LICENCE_LOCKED (-32)The SDK is locked by the licence check. Nothing was sent.See SdkLicenceException.
Another codeAn error of the Nordic DFU library during the update, for example 4096: the bracelet disconnected.Keep the phone near the bracelet and start again. If the bracelet no longer shows up in a normal scan, see the next section.

startDfu itself throws in three cases:

ExceptionCauseFix
IllegalStateExceptionAn update is already in progress.Wait for it to end; check getDfuState().isInProgress.
IllegalArgumentExceptionThe specific version cannot be installed on this hardware: it is unknown, it is in com.corsano.sdk:dfu-archive which your app excludes, or the bracelet is a 287-1B.Check with FirmwareConfig.getSpecificVersion(hardwareId, version) first.
ErrorThe hardware ID is not a 287-1B (51) or a 287-2B (54).Check the hardware ID before you call the DFU methods.
warning

A 287-2B on firmware 9.42 or later cannot be downgraded to firmware 8.x or older. This is a rule of the firmware; the SDK does not check it before the update starts. Do not start such an update. The default firmware of SDK 3.0.0 is 9.50, so every 287-2B you update with startDfu(address, hardwareId) passes this point. See DFU SDK.

All statuses and errors are described in DFU SDK.

The bracelet is stuck in its bootloader​

Symptom. After an interrupted firmware update the bracelet appears dead: lights off, even on the charger. Your app cannot connect to it, and a scan no longer reports it as a normal bracelet.

Cause. The update stopped midway (Bluetooth switched off, the app killed or removed from the recent apps, the bracelet's battery empty). The bracelet has no working firmware and waits in its bootloader.

Fix. Install the firmware again:

  1. Put the bracelet on its charger.
  2. Scan with startScan. The bracelet is reported with scanType ScanDeviceType.BRACELET_1B_NEED_RECOVERY or ScanDeviceType.BRACELET_2B_NEED_RECOVERY (needsRecovery is true).
  3. Call CorsanoDfu.getInstance().startDfu(record.address, hardwareId) with the address of that scan record. The hardware ID is 51 for BRACELET_1B_NEED_RECOVERY and 54 for BRACELET_2B_NEED_RECOVERY. Do not connect or pair first.

The code is in DFU SDK, DFU recovery.

Wearing, charging and pairing​

How to Wear Your Corsano Bracelet Correctly​

https://corsano.com/knowledge-base/wearing-your-bracelet/

Prevent skin irritation​

https://corsano.com/knowledge-base/prevent-skin-irritation/

Charge your CardioWatch 287-2​

https://corsano.com/knowledge-base/pairing-287-2b-2/

Pairing​

https://corsano.com/knowledge-base/pairing-2/