KN550
Device Version
1. FirmVersion below 2.0.0
1.Does not support time adjustment.
2.Supports obtaining battery power.
3.automatically deleting data after synchronizing historical data.
4.After pressing the power button M, the Bluetooth icon will flash on the screen.
2. FirmVersion 2.0.0
1.Does not support time adjustment
2.Does not support obtaining battery power
3.Automatically deletes data after synchronizing historical data
4.After pressing the power button M, there is no Bluetooth icon on the screen, and the Bluetooth icon will only flash after the screen is successfully connected to the mobile device
3. FirmVersion 2.0.1 and above
1.The firmware version is 2.0.1 and the isRightTime field is added. This field marks whether the historical data needs time correction (0: no need 1: need correction))
2.Supports obtaining battery power
3.Historical data must be deleted by calling the delete interface, otherwise historical data will always exist
4.After pressing the power button M, there is no Bluetooth icon on the screen, and the Bluetooth icon will only flash after the screen is successfully connected to the mobile device
info
- Scan and connect KN-550BT blood pressure monitor.
- KN-550BT only support offline measurement.
Connection to device
1.Listen to device notify
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onScanDevice(String mac, String deviceType, int rssi, Map manufactorData) { }
@Override
public void onDeviceConnectionStateChange(String mac, String deviceType, int status, int errorID, Map manufactorData){ }
@Override
public void onScanError(String reason, long latency) { }
@Override
public void onScanFinish() { }
@Override
public void onDeviceNotify(String mac, String deviceType,
String action, String message) { }
}
int callbackId = iHealthDevicesManager.getInstance().registerClientCallback(miHealthDevicesCallback);
iHealthDevicesManager.getInstance().addCallbackFilterForDeviceType(callbackId, iHealthDevicesManager.TYPE_550BT);
iHealthDevicesManager.getInstance().addCallbackFilterForAddress(callbackId, String... macs)
2.Scan for KN-550BT devices
iHealthDevicesManager.getInstance().startDiscovery(DiscoveryTypeEnum.BP550BT);
3.Connect to KN-550BT devices
iHealthDevicesManager.getInstance().connectDevice("", mac, iHealthDevicesManager.TYPE_550BT);
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
API reference
Get device battery
info
The KN-550BT doesn't support this feature on firmware 2.0.0.
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.getBattery();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.ACTION_BATTERY_BP.equals(action)) {
try {
JSONObject obj = new JSONObject(message);
int battery = obj.getInt(BpProfile.BATTERY_BP);
} catch (JSONException e) {
e.printStackTrace();
}
}
}
}
Get number of history data
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.getOfflineNum();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.ACTION_HISTORICAL_NUM_BP.equals(action)) {
try {
JSONObject obj = new JSONObject(message);
int count = obj.getInt(BpProfile.HISTORICAL_NUM_BP);
} catch (JSONException e) {
e.printStackTrace();
}
}
}
}
Get history data
info
When user use KN-550BT first time and don't set time yet, the device time is not correct. and the returned data will contain whether the time need to be set. Version 2.0.1 or above support this feature.
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.getOfflineData();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.HISTORICAL_DATA_BP.equals(action)) {
try {
JSONArray historyArr = new JSONArray(message);
for (int i = 0; i < historyArr.length(); i++) {
JSONObject obj = historyArr.getJSONObject(i);
String time = obj.getString(BpProfile.MEASUREMENT_DATE_BP);
int sys = obj.getInt(BpProfile.HIGH_BLOOD_PRESSURE_BP);
int dia = obj.getInt(BpProfile.LOW_BLOOD_PRESSURE_BP);
int heartRate = obj.getInt(BpProfile.PULSE_BP);
int ahr = obj.getInt(BpProfile.MEASUREMENT_AHR_BP);
int hsd = obj.getInt(BpProfile.MEASUREMENT_HSD_BP);
// only support firmware 2.0.1 or later
int timeCalibration = obj.getInt(BpProfile.TIME_CALIBRATION);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}
}
Set local time to KN-550BT
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.getFunctionInfo();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.ACTION_FUNCTION_INFORMATION_BP.equals(action)) {
try {
JSONObject obj = new JSONObject(message);
/**
* Blood pressure measurement mode, up air measurement mode and down air measurement mode.
* Up air measurement mode: measure blood pressure during the process of pressurization.
* Down air measurement mode: raise the pressure to a certain leven and then slowly release it to measure blood pressure.
* upAirMeasureFlg, true: up air measurement mode; false: down dir measurement mode.
*/
Boolean upAirMeasureFlg = obj.getBoolean(BpProfile.FUNCTION_IS_UPAIR_MEASURE);
/**
* It is used for measuring blood pressure on the arm or not.
*/
Boolean armMeasureFlg = obj.getBoolean(BpProfile.FUNCTION_IS_ARM_MEASURE);
/**
* It support detect angle of monitor.
*/
Boolean haveAngleSensorFlg = obj.getBoolean(BpProfile.FUNCTION_HAVE_ANGLE_SENSOR);
/**
* It support offline measurement mode or not.
*/
Boolean haveOfflineFlg = obj.getBoolean(BpProfile.FUNCTION_HAVE_OFFLINE);
/**
* It support diagnosis of hemodynamic stability or not. It is always false for KN-550BT.
*/
Boolean haveHSDFlg = obj.getBoolean(BpProfile.FUNCTION_HAVE_HSD);
/**
* It support angle detection or not. It is always false for KN-550BT.
*/
Boolean haveAngleSetFlg = obj.getBoolean(BpProfile.FUNCTION_HAVE_ANGLE_SETTING);
/**
* It support update firmware or not. It is always false for KN-550BT.
*/
Boolean selfUpdateFlg = obj.getBoolean(BpProfile.FUNCTION_HAVE_SELF_UPDATE);
} catch(JSONException e) {
e.printStackTrace();
}
}
}
}
Get KN-550BT display status
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.getStatusOfDisplay();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.ACTION_SHOW_CONFIG_BP.equals(action)) {
try {
JSONObject obj = new JSONObject(message);
Boolean isBackLightOn = obj.getBoolean(BpProfile.IS_BACKLIGHT_ON_BP);
Boolean isClockOn = obj.getBoolean(BpProfile.IS_CLOCK_ON_BP);
} catch(JSONException e) {
e.printStackTrace();
}
}
}
}
Set KN-550BT display status
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.getStatusOfDisplay();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.ACTION_SET_STATUS_DISPLAY_SUCCESS.equals(action)) {
Log.i("set display success");
}
}
}
Get KN-550BT time
info
Only Firmware 2.0.1 and above supprt this API
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.getTime();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.ACTION_GET_TIME.equals(action)) {
try {
JSONObject obj = new JSONObject(message);
String time = obj.getString("Time");
} catch(JSONException e) {
e.printStackTrace();
}
} else if (BpProfile.ACTION_ERROR_BP.equals(action)) {
try {
JSONObject obj = new JSONObject(message);
int errorId = obj.getInt(BpProfile.ERROR_NUM_BP);
String errorMessage = obj.getString(BpProfile.ERROR_DESCRIPTION_BP);
Log.e("", "the API is unsupported");
} catch(JSONException e) {
e.printStackTrace();
}
}
}
}
History data transfer finished
info
After history data transfer is finished, this API will help you to clear the history data. Only Firmware 2.0.1 and above supprt this API. other firmware KN-550BT can clear history data automatically.
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.transferFinished();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceNotify(String mac, String deviceType, String action, String message) {
if (BpProfile.ACTION_HISTORICAL_OVER_BP.equals(action)) {
Log.i("", "Data transfer is finished!");
} else if (BpProfile.ACTION_ERROR_BP.equals(action)) {
try {
JSONObject obj = new JSONObject(message);
int errorId = obj.getInt(BpProfile.ERROR_NUM_BP);
String errorMessage = obj.getString(BpProfile.ERROR_DESCRIPTION_BP);
Log.e("", "the API is unsupported");
} catch(JSONException e) {
e.printStackTrace();
}
}
}
}
Disconnect KN-550BT device
Bp550BTControl control = iHealthDevicesManager.getInstance().getBp550BTControl(mDeviceMac);
control.disconnect();
// Return value
private iHealthDevicesCallback miHealthDevicesCallback = new iHealthDevicesCallback() {
@Override
public void onDeviceConnectionStateChange(String mac, String deviceType, int status, int errorID, Map manufactorData) {
if (iHealthDevicesManager.DEVICE_STATE_DISCONNECTED == status) {
Log.i("The device is disconnected");
}
}
}