Non Invasive Blood Pressure
Overview
NIBP measurement requires the Corsano BP Cuff. To order your cuff, contact us.
NIBP (non-invasive blood pressure) is measured on the bracelet every 30 minutes, once the bracelet has been calibrated with cuff measurements. The raw activity data contains a value every 30 minutes. If movement is detected, the measurement is postponed by one minute, repeating as necessary until a stable reading is obtained.
What to do, in order:
- Use a bracelet plan that supports NIBP and enable NIBP in the bracelet initialization. See Bracelet setup.
- Calibrate the bracelet with the Corsano BP cuff:
NibpCalibrationManager.startCalibration. See Measurements with a Corsano cuff. - Ask the bracelet whether its calibration is good:
GetNibpTrainingInfoRequest. See NIBP model status. - Read the blood pressure values the bracelet then produces. See NIBP models.
| What you want | Call | Where it arrives |
|---|---|---|
| Progress of a calibration | NibpCalibrationManager.addListener(listener) | NibpCalibrationListener.onStatusChanged(status, session) |
| An error of a calibration | The same listener | onError(type, t), and a failed Result of the call |
| The cuff readings and whether the bracelet accepted them | The session of the listener, or manager.nibpCalibrationRepository.getLast() | BloodPressureSession.measurements |
| Whether a (new) calibration is needed | GetNibpTrainingInfoRequest() | Response.modelStatus |
| The blood pressure of the bracelet, every 30 minutes | manager.metricActivityRepository, see Raw data models | MetricActivity.nibpSystolic, nibpDiastolic |
| The blood pressure per day | manager.bloodPressureSummaryRepository, manager.bloodPressureSummaryUpdated | MetricBloodPressureSummary |
The snippets on this page use:
val manager = DataSdk.getInstance().getManager()
val nibpManager = manager.getNibpCalibrationManager()
val bleDevice = BleSdk.getInstance().getDevice(address) // address: the bracelet's BLE MAC address
2-minute measurement every 30 minutes: motion-aware behavior
Every 30 minutes, the bracelet attempts to start a 2-minute measurement.
Before starting, it checks for motion.
If motion is detected, the measurement is delayed by 1 minute.
After that 1 minute, motion is checked again, and the same rule applies (delay + recheck).
If the entire 30-minute window passes without finding a still period, the bracelet will run the 2-minute measurement immediately at the end of the window, regardless of motion.
Prerequisites
- Bracelet: a 287-2B (B2).
- Software: SDK 1.1.4 or later.
- Accessory: the Corsano BP cuff, for the calibration.
- The bracelet is connected and its bracelet initialization has finished.
- A valid licence. While the SDK is locked, starting a calibration fails with
SdkLicenceException. See Licence Key.
Bracelet setup
1) Bracelet Plan
Ensure the bracelet plan supports NIBP. Refer to the bracelet plans description
2) Enable NIBP
Enable NIBP in the bracelet initialization, with isNibpEnabled = true in your InitializationConfig:
val config = InitializationConfig(
braceletPlan = plan, // your DevicePlan
samplingRate = SampleRate.ONE_MIN,
isNibpEnabled = true,
)
The initialization then sets the NIBP sampling rate to 1/30 min (SampleRate.THIRTY_MIN). With isNibpEnabled = false (the default) it sets it to SampleRate.OFF, which disables NIBP.
- NIBP cannot be combined with BioZ / EmoGraphy (
isBiozOrEmographyEnabled), nor with a PPG2 frequency of 128 Hz:enableAutoInitializationandupdateConfigurationreject such a configuration. - The request behind it is
SetVitalParameterSamplingRateRequest(VitalParameterWithSamplingRateType.NIBP, SampleRate.THIRTY_MIN). It is deprecated for direct use: the initialization sends it for you.
NIBP model status:
From FW 8.12
Ask the bracelet for the status of its NIBP model:
bleDevice.enqueueCommand(
request = GetNibpTrainingInfoRequest(),
onSuccess = { info ->
if (info.modelStatus == 0) askUserToCalibrate()
},
onError = { error -> /* not connected, not initialized, or a firmware without this request */ }
)
The response:
data class Response(
val engineStatus: Int,
val modelStatus: Int
)
| Field | Value |
|---|---|
engineStatus | 1: the NIBP engine of the bracelet has started. 0: it has never started, so a cuff measurement has to be performed |
modelStatus | 1: the calibration is good. 0: a new calibration is required |
If the model status is zero, ask the user for a new calibration.
A firmware that does not know this request leaves it unanswered: onError is called after the command's timeout.
To reset the calibration on the bracelet, send ResetNibpCalibrationRequest().
Measurements with a Corsano cuff
NIBP requires three sets of measurements, with at least one hour between each set. One set is one call of startCalibration: the NIBP manager takes two cuff measurements with the Corsano BP cuff, a third when the first two are too far apart, and handles the whole sequence.
Start a measurement:
lifecycleScope.launch {
val result = nibpManager.startCalibration(
bleDevice,
"B8:B7:7D:00:0C:AF" // MAC address of the Corsano BP cuff
)
}
startCalibration is a suspend function. It returns when the whole sequence has ended, which takes several minutes: Result.success(true) when the measurements were taken and the bracelet is back in its plan, a failed Result otherwise. nibpManager.isInProgress is true while it runs.
Pass the MAC address of the Corsano BP cuff. Either read it on the sticker on the back of the cuff, or find it with the cuff scan:
val scanner = BpCuffScanner(
bluetoothManager.adapter, // Bluetooth must be on
Scheduler.MAIN,
{ results -> showCuffs(results) }, // ArrayList<ScanResult>, updated at each new cuff
{ errorCode -> showScanError(errorCode) },
{ /* the scan stopped after the timeout */ }
)
scanner.startScan(30) // timeout in seconds
// scanner.stopScan()
The scan needs the same Bluetooth permissions as the bracelet scan, see Pairing. You can let the SDK remember the cuff:
Function of NibpCalibrationManager | Description |
|---|---|
suspend fun saveBpCuff(macAddress): Result<Boolean> | Stores the cuff's MAC address on the phone |
suspend fun getSavedBpCuff(): Result<LocalSettingDB?> | The stored address is the value of the result |
suspend fun deleteSavedBpCuff(): Result<Boolean> | Forgets the cuff |
Stop a measurement:
lifecycleScope.launch {
val result = nibpManager.stopCalibration(
bleDevice,
DevicePlan.HOSPITAL_MULTICOLOR, // the plan the bracelet goes back to: yours
null // its PPG2 frequency; null means 32 Hz
)
}
stopCalibration ends the calibration mode on the bracelet, puts the bracelet back in the plan you pass, and closes the session in the database.
- At the end of a complete sequence the manager does this itself, and restores the plan the bracelet had before.
- A failed sequence cleans up too. When a measurement fails, the stop fails, or the coroutine that called
startCalibrationis cancelled, the manager ends the calibration mode, puts back the plan and PPG2 frequency the bracelet had before (not the calibration planDevicePlan.HOSPITAL_RAWat 128 Hz), and closes the session with the measurements saved so far. - To abandon a running sequence, call
stopCalibration. It ends the runningstartCalibration, which returns a failedResultwithout callingonError. A cuff measurement that arrives afterwards is neither saved nor sent to the bracelet, so the plan you passed stays. - Without an open session,
stopCalibrationstill puts the bracelet in the plan you pass, and reportsNO_ONGOING_SESSION. stopCalibrationalso works while the SDK is locked by the licence check, so a bracelet does not stay in the calibration.
Measurement Sequence:
The status in each step is the NibpCalibrationStatus your listener receives.
1) Start
- The manager reads the bracelet's current plan, to restore it at the end.
BLE_COMMUNICATION_START_MEASUREMENT_START: it sets the calibration plan (PPG 128Hz) and starts the calibration mode.- A BloodPressureSession is created in the database.
2) Warm up: 30 seconds
WARM_UP_START, thenWARM_UP_FINISHEDafter 30 seconds.- The patient must sit still and remain silent.
3) Cuff measurement 1
WAITING_FOR_CUFF_MEASUREMENT: the manager connects to the cuff.- The patient wears the cuff on the opposite arm from the bracelet.
- The patient presses the START button on the cuff.
- Once completed, the cuff transmits SYS/DIA/Pulse to the manager:
MEASUREMENT_RECEIVED_FROM_CUFF. The manager waits up to 5 minutes for it, and takes the cuff's newest record 8 seconds after the cuff's last one. BLE_COMMUNICATION_SEND_MEASUREMENT: the manager sends the values to the bracelet. The bracelet rates the measurement as good or bad. A bad rating comes from excessive movement or improper bracelet wear.- The BloodPressureValue and its rating (
braceletSuccess) are saved in the database.
4) Pause (30 seconds)
PAUSE_BETWEEN_MEASUREMENT: a 30-second pause before the next measurement.
5) Cuff measurement 2
Same as step 3.
6) Pause (30 seconds)
PAUSE_BETWEEN_MEASUREMENT: a 30-second pause.
7) Cuff measurement 3, only when the first two are too far apart
When the first two measurements differ by more than 15 mmHg in SYS or in DIA (exactly 15 is not more), the manager takes a third one, as in step 3, then pauses 30 seconds again (PAUSE_BETWEEN_MEASUREMENT). Otherwise it goes straight to the end. A sequence never takes more than three measurements.
To know during the pause after the second measurement whether a third follows, call nibpManager.shouldDoAnotherMeasurement(session) with the session that PAUSE_BETWEEN_MEASUREMENT carries.
8) End
BLE_COMMUNICATION_STOP_MEASUREMENT_START: the manager stops the calibration mode (PPG 128Hz) and restores the plan the bracelet had before.DONE: the BloodPressureSession is updated with anendTimestamp.- If the bracelet rated every measurement as bad (
session.statusisDONE_WITH_FAILURE), repeat the sequence.
NB_MEASUREMENTS_PER_SESSION (2) is the number of measurements every sequence takes, not the most a session holds.
Listener during the sequence
nibpManager.addListener(object : NibpCalibrationListener {
override fun onStatusChanged(status: NibpCalibrationStatus, session: BloodPressureSession?) {
showStep(status) // status.details is an English text for the step
session?.measurements?.lastOrNull()?.let { showReading(it.sbp, it.dia, it.hr, it.braceletSuccess) }
}
override fun onError(type: NibpCalibrationErrorType, t: Throwable?) {
showError(type, t)
}
})
// When your screen goes away:
nibpManager.removeListener()
The manager holds one listener: addListener replaces the previous one. The listener is called in the coroutine that called startCalibration.
NibpCalibrationStatus:
| Status | Meaning | session |
|---|---|---|
BLE_COMMUNICATION_START_MEASUREMENT_START | Starting the calibration on the bracelet | null |
WARM_UP_START | Warm-up started: sit still and relax | Set |
WARM_UP_FINISHED | Warm-up done | Set |
WAITING_FOR_CUFF_MEASUREMENT | Press START on the cuff and wait for the measurement to finish. Also before a third measurement | Set |
MEASUREMENT_RECEIVED_FROM_CUFF | The cuff delivered a measurement; braceletSuccess of the new value is still null | Set |
BLE_COMMUNICATION_SEND_MEASUREMENT | Sending the measurement to the bracelet | Set |
PAUSE_BETWEEN_MEASUREMENT | The bracelet rated the measurement; pause | Set, with braceletSuccess |
BLE_COMMUNICATION_STOP_MEASUREMENT_START | Stopping the calibration on the bracelet | Set or null |
DONE | The session is closed | Set, with endTimestamp |
Errors and what to do
An error arrives in onError(type, t), and the call returns a failed Result. After an error of startCalibration, the bracelet is already back in its plan and the session is closed: you do not need to call stopCalibration before you start again.
NibpCalibrationErrorType | Cause | What to do |
|---|---|---|
TECH_ERROR with an SdkLicenceException | The SDK is locked by the licence check | Retrying does not help. See Licence Key |
TECH_ERROR with a TimeoutException | The cuff delivered no measurement within 5 minutes | Check that the cuff is on, in range and that the user pressed START. If the cuff did take a measurement, check the cuff's date and time, see below |
TECH_ERROR (other) | An unexpected error while stopping. Also reported when the external cuff functions are called with a licence that has no access to them | Start again |
BLE_COMMUNICATION_ERROR_PLAN | The bracelet's plan could not be read. Nothing was started | Check the connection and the initialization, then start again |
BLE_COMMUNICATION_ERROR_START1 | The calibration plan could not be set. Nothing was started; the previous plan was sent back in case the bracelet took the new one. With the bracelet out of range this takes up to 20 seconds longer | Check the connection, then start again |
BLE_COMMUNICATION_ERROR_START2 | The calibration plan was set, but the calibration mode did not start. The previous plan was put back; no session exists | Check the connection, then start again |
DB_ERROR_START | The session could not be read or stored. The previous plan was put back | Start again |
ALREADY_RUNNING | A session is still open: a sequence is running, or an external-cuff session was not stopped. Nothing was sent | Wait for the running sequence, or call stopCalibration, then start again |
BLE_COMMUNICATION_ERROR_SEND_BP_VALUE | The bracelet did not answer a cuff measurement. The calibration ends | Start again |
DB_ERROR_UPDATE | A cuff measurement could not be stored | Start again |
NO_ONGOING_SESSION | stopCalibration was called without an open session. The bracelet was put in the plan you passed all the same | Nothing to stop |
BLE_COMMUNICATION_ERROR_STOP1 | The calibration mode could not be stopped. DB_ERROR_STOP follows | At the end of startCalibration the manager tries the restore once more itself. After your own stopCalibration, call it again when the bracelet is connected |
BLE_COMMUNICATION_ERROR_STOP2 | The calibration mode was stopped, but the plan could not be restored. DB_ERROR_STOP follows | As BLE_COMMUNICATION_ERROR_STOP1 |
DB_ERROR_STOP | The stop did not complete: see the error before it; or the session could not be read or closed | As BLE_COMMUNICATION_ERROR_STOP1 |
Since 3.0.0:
startCalibrationno longer waits for ever for a cuff that delivers nothing: after 5 minutes without a measurement it reportsTECH_ERRORand returns a failedResult(TimeoutException).- A bracelet that does not answer a cuff measurement ends the calibration with
BLE_COMMUNICATION_ERROR_SEND_BP_VALUEand a failedResult. Before, the manager went on and threw. - A failure of the second measurement returns its own error instead of the first measurement's.
startCalibrationtakes the third measurement itself when the first two are more than 15 mmHg apart (it always stopped after two, in 2.3.0 too). A failed third measurement ends the sequence like a failed second one.- A failed or cancelled sequence puts the bracelet's plan back and closes the session; before, the bracelet stayed in the calibration plan until your app called
stopCalibration. - An open session is reported as
ALREADY_RUNNINGinstead ofDB_ERROR_START, bystartCalibrationandstartMeasurementWithExternalCuff. A failed calibration-mode command is reported asBLE_COMMUNICATION_ERROR_START2alone, withoutDB_ERROR_STARTafter it. stopCalibrationduring a runningstartCalibrationends that sequence, and puts the bracelet in the plan you pass even without an open session.isInProgressistruewhile a calibration or an external-cuff session runs; it was alwaysfalse.- A cuff sends its whole history when it connects. A record the cuff took more than 5 minutes ago is no longer taken as the new measurement.
- A cuff without one of its two intermediate characteristics now connects.
- The cuff's values are decoded correctly when the cuff reports them in kPa (they are converted to mmHg) or with an exponent, and when a record has no time stamp or no pulse.
The age of a cuff record is the cuff's time stamp compared with the phone's clock, so the cuff's clock must be right. The SDK does not set it.
- A time stamp more than 24 hours off is not trusted: the record is taken.
- A cuff whose clock runs between 5 minutes and 24 hours behind (for example a cuff that was never moved to summer time) has every measurement treated as history. The calibration then ends with
TECH_ERRORafter the 5 minutes.
Data models
Since 3.0.0 the models are plain classes; every model a repository returns is a copy.
Calibration data models
Read the sessions from manager.nibpCalibrationRepository (a NibpCalibrationRepository; since 3.0.0 you cannot construct one yourself). Its functions are suspend and return a Result:
| Function | Returns |
|---|---|
getLast() | The newest session, or null |
getAll() | Every session, oldest first |
deleteByTimestampRange(startTimestamp, endTimestamp) | Deletes the sessions that start in the range, both ends included |
deleteAll() | Deletes every session |
nibpManager.getOnGoingMeasurement() returns the session that is still open, or null.
BloodPressureSession
open class BloodPressureSession {
var startTimestamp: Long = 0L
var endTimestamp: Long = 0L
var measurements: MutableList<BloodPressureValue>? = null
var isCorsanoCuff: Boolean = true
val status: MeasurementStatus
}
| Field | Value |
|---|---|
startTimestamp | Start of the session, epoch milliseconds |
endTimestamp | End of the session, epoch milliseconds; 0 while the session is open |
measurements | The cuff measurements, in the order taken; null before the first one |
isCorsanoCuff | false for a session with an external cuff |
status | Computed from the fields above and the phone's clock, see MeasurementStatus below |
A closed session of the Corsano cuff has the status DONE_WITH_SUCCESS when the bracelet rated at least one measurement as good (braceletSuccess == true), and DONE_WITH_FAILURE otherwise. A session closed by a failed sequence can also read DONE_WITH_SUCCESS when a measurement before the failure was good: whether the sequence completed is told by the Result of startCalibration and by your listener, not by the status.
BloodPressureValue
open class BloodPressureValue {
var timestamp: Long = 0L
var date: String = ""
var sbp: Int = 0
var dia: Int = 0
var hr: Int = 0
var braceletSuccess: Boolean? = null
}
| Field | Value |
|---|---|
timestamp | When the SDK received the measurement, epoch milliseconds (the phone's clock, not the cuff's) |
date | The same as an ISO date and time |
sbp / dia | Systolic and diastolic pressure, mmHg |
hr | Pulse rate of the cuff, beats per minute; 0 when the cuff sent none |
braceletSuccess | true: the bracelet rated the measurement as good. false: as bad. null: not rated (yet), which is always the case with an external cuff |
NIBP models
Raw data
Continuous NIBP data is stored in MetricActivity under nibpSystolic and nibpDiastolic. Both are null in a record without a blood pressure value.
MetricBloodPressureSummary
One summary per day, see Summaries for the fields and the repository. Its slots are nibpSlotsIntervalSecs long (DataSdk.Config, 2 hours by default). The day's average, minimum and maximum are taken over the slot averages, not over single readings, a slot's date and endDate are local times as HH:mm, and a day without any blood pressure value has no summary.
open class MetricBloodPressureSummary {
var startTimestamp: Long = 0L
var endTimestamp: Long = 0L
var serverDate: String = ""
var averageSys: Int? = null
var averageDia: Int? = null
var maxDaySys: Int? = null
var maxDayDia: Int? = null
var minDaySys: Int? = null
var minDayDia: Int? = null
var slots: MutableList<MetricBloodPressureSummarySlot> = mutableListOf()
}
MetricBloodPressureSummarySlot
open class MetricBloodPressureSummarySlot {
var startTimestamp: Long = 0L
var endTimestamp: Long = 0L
var date: String = ""
var endDate: String = ""
var systolicPressure: Int? = null
var diastolicPressure: Int? = null
}
Restricted - Measurements with an External cuff (non Corsano)
From SDK 1.1.23 Restricted to a specific customer following agreement with Corsano
With any other licence key, startMeasurementWithExternalCuff and sendMeasurementFromExternalCuff report TECH_ERROR and return a failed Result.
NIBP requires three sets of measurements, with at least one hour between each set. Each set consists of two or three cuff measurements. The NIBP measurements have to follow this specific sequence:


1) Warm-up
Screens 2) -> 6)
Instructions to prepare the measurement
Duration: 30 seconds
2) Measurement
Screen 7)
Take the measurement on the patient, select the values in the picker and send it to the SDK
Duration: 45 seconds minimum to take the measurement on the patient, before being able to send it to the SDK
3) Pause after measurement
Screen 8)
Display the result of the quality of the measurement
Wait 30 seconds before the next step
Duration: 30 seconds
Redo 2) and 3) another time or 2 other times to gather x2 or x3 measurements. In this flow your app decides on the third measurement; the SDK does not.
Why x2 or x3?
If the measurement 1 and measurement 2 are too far one from another, a third measurement must be done.
Too far = more than 15 mmHg between SYS or DIA
nibpManager.shouldDoAnotherMeasurement(session) applies this rule: it returns true while the session has fewer than two measurements, and for two measurements that are too far from one another.
4) Result of the measurements session
Screen 9)
Display the result of the measurements.
SDK calls during the sequence
Start a measurement:
To call before warm up.
val result = nibpManager.startMeasurementWithExternalCuff(bleDevice) // suspend, Result<BloodPressureSession>
This will start the PPG 128Hz on the bracelet, and start the session in the DB. It returns at once, with the new session: your app times the steps itself.
Example in MainDataNibpExternalCalibrationFragment.kt
Send a measurement from the external cuff:
val result = nibpManager.sendMeasurementFromExternalCuff(
bleDevice,
sysValue, diaValue, pulseRateValue
) // suspend, Result<BloodPressureSession>
This will send the values to the SDK, and save them into the DB. The values are not sent to the bracelet.
The call fails ("too soon") unless the session's status is WAITING_FOR_CUFF_MEASUREMENT_1, _2 or _3: 75 seconds after the start for the first measurement (30 seconds of warm-up and 45 seconds to take it), and 75 seconds after the previous measurement for the next ones (30 seconds of pause and 45 seconds to take it).
Example in MainDataNibpExternalCalibrationFragment.kt
Stop a measurement:
val result = nibpManager.stopCalibration(
bleDevice,
DevicePlan.HOSPITAL_RAW, // TODO update with your chosen plan
Ppg2Frequency.THIRTY_TWO_HZ // TODO update with your chosen PPG frequency
)
This will stop the PPG 128Hz on the bracelet, put the bracelet back in the plan you pass, and stop the session in the DB.
Example in MainDataNibpExternalCalibrationFragment.kt
Status of a measurement (optional):
val onGoingCalibrationResult = nibpManager.getOnGoingMeasurement()
if (onGoingCalibrationResult.isSuccess) {
onGoingCalibrationResult.getOrNull()?.status
}
enum class MeasurementStatus(val details: String) {
WARM_UP("CardioWatch warm up started, sit still and relax"),
READY_TO_TAKE_CUFF_MEASUREMENT_1("Please take the measurement 1 on the patient"),
WAITING_FOR_CUFF_MEASUREMENT_1("Bracelet ready to receive cuff measurement 1"),
PAUSE_BETWEEN_MEASUREMENTS("Measurement received, pause before next measurement"),
READY_TO_TAKE_CUFF_MEASUREMENT_2("Please take the measurement 2 on the patient"),
WAITING_FOR_CUFF_MEASUREMENT_2("Bracelet ready to receive cuff measurement 2"),
READY_TO_TAKE_CUFF_MEASUREMENT_3("Please take the measurement 3 on the patient"),
WAITING_FOR_CUFF_MEASUREMENT_3("Bracelet ready to receive cuff measurement 3"),
DONE_WITH_SUCCESS("Finished with success"),
DONE_WITH_FAILURE("Finished with failure");
}
The status is computed from the session and the phone's clock each time you read it:
WARM_UP: screens 2) -> 6), the first 30 secondsREADY_TO_TAKE_CUFF_MEASUREMENT_1: screens 7) part 1 before being able to send it to the SDK, the next 45 secondsWAITING_FOR_CUFF_MEASUREMENT_1: screens 7) part 2 measurement can be sentPAUSE_BETWEEN_MEASUREMENTS: screens 8) pause of 30 seconds after a measurementREADY_TO_TAKE_CUFF_MEASUREMENT_2,_3andWAITING_FOR_CUFF_MEASUREMENT_2,_3: the same for the second and the third measurementDONE_WITH_SUCCESS: screens 9) the session is stopped. A stopped session with an external cuff always has this statusDONE_WITH_FAILURE: a stopped session with the Corsano cuff in which the bracelet rated no measurement as good