com.morpho.morphosmart.sdk
Class MorphoDevice

java.lang.Object
  extended by com.morpho.morphosmart.sdk.MorphoDevice
All Implemented Interfaces:
java.lang.Cloneable

public class MorphoDevice
extends java.lang.Object
implements java.lang.Cloneable

Class communicating with the MorphoSmart™. This class performs operations related to a physical MorphoSmart™. The internal variable members are filled after a correct connection to the MorphoSmart™ (after a successful openUsbDevice call).


Field Summary
static int CONFIG_SENSOR_WIN_POSITION_TAG
           
static int CONFIG_UI_CONFIG_TAG
           
static int CONFIG_UI_RESET_TAG
           
protected  boolean cppMemOwn
           
 
Constructor Summary
MorphoDevice()
          Default constructor
MorphoDevice(MorphoDevice device)
          Copy constructor
 
Method Summary
 int cancelLiveAcquisition()
          This function cancels a finger acquisition.
 int capture(int timeout, int acquisitionThreshold, int advancedSecurityLevelsRequired, int fingerNumber, TemplateType templateType, TemplateFVPType templateFVPType, int maxSizeTemplate, EnrollmentType enrollType, LatentDetection latentDetection, Coder coderChoice, int detectModeChoice, CompressionAlgorithm compressAlgo, int compressRate, TemplateList templateList, int callbackCmd, java.util.Observer callback)
          This function captures live fingers and extracts their templates.
 int capture(int timeout, int acquisitionThreshold, int advancedSecurityLevelsRequired, int fingerNumber, TemplateType templateType, TemplateFVPType templateFVPType, int maxSizeTemplate, EnrollmentType enrollType, LatentDetection latentDetection, Coder coderChoice, int detectModeChoice, TemplateList templateList, int callbackCmd, java.util.Observer callback)
          Deprecated. kept for compatibility with release 6.6.6.1_Android_3.3, replaced by capture
 java.lang.Object clone()
           
 int closeDevice()
          This function closes the MorphoSmart™ communication link.
 byte[] comReceive(int timeOut)
          This function receives the information required to open a communication (RS232, USB or user communication)
 int comSend(int timeOut, byte[] data)
          This function sends the information required to open a communication (RS232, USB or user communication)
 int enableCS(boolean enable)
          MORPHO USE ONLY
 int enableDataEncryption(boolean enable, java.lang.String diversificationData)
          This method enables or disables the encryption of exported biometric data and sets the diversification data to be concatenated to image/template before encryption.
protected  void finalize()
          Destructor
 int getComType()
          This function returns the type of the connection to a specific MorphoSmart™ of a MorphoDevice object.
 byte[] getConfigParam(int parameterIdentifier)
          This function retrieves the value of a specified parameter of MorphoSmart™ device configuration.
 int getDatabase(int databaseIndex, MorphoDatabase morphoDatabase)
          This function returns a MorphoDatabase instance
 java.lang.String getFFDLogs()
          This function retrieves FFD logs.
 int getImage(int timeOut, int acquisitionThreshold, CompressionAlgorithm compressAlgo, int compressRate, int detectModeChoice, LatentDetection latentDetection, MorphoImage morphoImage, int callbackCmd, java.util.Observer callback)
          This function captures live fingers and extracts its image in full resolution.
 int getIntDescriptorBin(DescriptorID descriptorIdentifier)
          This function returns a descriptor in the form of an integer.
 int getInternalError()
          When the biometric terminal returns an internal error,the SDK returns MORPHOERR_INTERNAL.
 java.lang.String getKCV(int keyID)
          Deprecated. kept for compatibility with release 6.6.6.1_Android_3.3, replaced by getKCV
 byte[] getKCV(MorphoKCVID keyID, byte[] secretID)
          This function retrieves the KCV (key check value) of a key saved in the MorphoSmart™.
 java.lang.String getProductDescriptor()
          get the string that describes the product reference.
 int getSecuConfig(SecuConfig secuConfig)
          This function retrieves MorphoSmart™ configuration.
 int getSecurityLevel()
          This function returns the security level set with setSecurityLevel.
 java.lang.String getSensorDescriptor()
          get the string that describes the optical sensor.
 java.lang.String getSoftwareDescriptor()
          get the string that describes the software release.
 StrategyAcquisitionMode getStrategyAcquisitionMode()
          This function returns the Acquisition Mode set by setStrategyAcquisitionMode.
 java.lang.String getStringDescriptorBin(DescriptorID descriptorIdentifier)
          This function returns a descriptor in the form of a string.
 byte[] getUnlockSeed()
          This function requests the terminal to start the unlock process, and to return the value of the seed to be used for the next step of the unlock process.
 java.lang.String getUsbDeviceName(int index)
          initUsbDevicesNameEnum must be call before using this function.
 java.lang.String getUsbDevicePropertie(int index)
          initUsbDevicesNameEnum must be call before using this function.
 int initUsbDevicesNameEnum(java.lang.Integer nbUsbDevice)
          This function enumerates the number of connected USB MorphoSmart™ devices.
 boolean isCSEnabled()
          MORPHO USE ONLY
 boolean isDataEncryptionEnabled()
          This method indicates if exported biometric data encryption is activated and returns diversification data.
 int loadKs(byte[] key)
          This method loads a new symmetric key KS in the MorphoSmart™ using the unsecure mode: the new key is sent to device in plaintext.
 int loadMocKey(byte[] key_enc_Ciffered_by_KencTrans)
          This function loads a new Key in the MorphoSmart™, this key is used to ciffer the Template passed to the Smart Card in a Match on Card process It uses the compatible key load solution
 int loadMocKey(byte[] key_enc_Ciffered_by_Certificate, byte[] key_enc_Ciffered_by_Certificate_Signature, byte[] hostCertificate)
          This function loads a new Key in the MorphoSmart™, this key is used to ciffer the Template passed to the Smart Card in a Match on Card process It uses the secured key load solution
 int openUsbDevice(java.lang.String sensorName, int timeOut)
          This function opens the USB communication link and tests it with a basic exchange with the MorphoSmart™.
 int ping()
          This command ping the MorphoSmart™ to check if it is still in normal operation state.
 int rebootSoft(int timeOut, java.util.Observer callback)
          This function reboot the MorphoSmart™ software.
 int resumeConnection(int timeOut, java.util.Observer observer)
          This function reconnect the MorphoSmart™.
 int setConfigParam(int tag, byte[] paramValue)
          This function modifies the value of the specified parameter of the MorphoSmart™ device configuration.
 int setLoggingLevelOfGroup(int groupID, MorphoLogLevel morphoLogLevel)
          This function modify the logging level of a group (the modification is effective only in RAM memory and it is not reported in the configuration file).
 int setLoggingMode(MorphoLogMode morphoLogMode)
          This function modify the logging mode (the modification is effective only in RAM memory and it is not reported in the configuration file).
 void setMorphoDeviceNativePointerCPP(long morphoDevicePointerCPP)
          MORPHO USE ONLY
 int setSecurityLevel(SecurityLevel securityLevel)
          This function sets the security level for finger acquisition functions.
 int setStrategyAcquisitionMode(StrategyAcquisitionMode strategyAcquisitionMode)
          This function sets the Strategy Acquisition Mode : Five different modes are supported.
 int unlock(byte[] secretID, byte[] cipheredSeed)
          This function unlocks the MorphoSmart™.
 int unlock(java.lang.String secretID, java.lang.String cipheredSeed)
          Deprecated. kept for compatibility with release 6.6.6.1_Android_3.3, replaced by unlock
 int verify(int timeOut, int far, Coder coder, int detectModeChoice, int matchingStrategy, TemplateList templateList, int callbackCmd, java.util.Observer callback, ResultMatching resultMatching)
          This function captures a live finger and checks if it matches with the user referred to.
 int verifyMatch(int far, TemplateList templateListSearch, TemplateList templateListReference, java.lang.Integer matchingScore)
          This function checks if one template of the reference template list matches with the unique template of the search template list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_SENSOR_WIN_POSITION_TAG

public static final int CONFIG_SENSOR_WIN_POSITION_TAG
See Also:
Constant Field Values

CONFIG_UI_CONFIG_TAG

public static final int CONFIG_UI_CONFIG_TAG
See Also:
Constant Field Values

CONFIG_UI_RESET_TAG

public static final int CONFIG_UI_RESET_TAG
See Also:
Constant Field Values

cppMemOwn

protected boolean cppMemOwn
Constructor Detail

MorphoDevice

public MorphoDevice()
Default constructor


MorphoDevice

public MorphoDevice(MorphoDevice device)
Copy constructor

Parameters:
device - source Object
Method Detail

finalize

protected void finalize()
Destructor

Overrides:
finalize in class java.lang.Object

ping

public int ping()
This command ping the MorphoSmart™ to check if it is still in normal operation state. The MorphoSmart™ device answers to this command even during biometric command process (wait for finger placement phase). This command is useful to check if the MorphoSmart™ startup sequence (after a power up) is successfully finished.

Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_CONNECT Cannot connect to the MorphoSmart™. - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

setMorphoDeviceNativePointerCPP

public void setMorphoDeviceNativePointerCPP(long morphoDevicePointerCPP)
MORPHO USE ONLY


getDatabase

public int getDatabase(int databaseIndex,
                       MorphoDatabase morphoDatabase)
This function returns a MorphoDatabase instance

Parameters:
databaseIndex - MorphoDatabase index (first index is 0).
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_BADPARAMETER Index is higher than ( MORPHO_NB_DATABASE_MAX -1). - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

cancelLiveAcquisition

public int cancelLiveAcquisition()
This function cancels a finger acquisition.

Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

capture

public int capture(int timeout,
                   int acquisitionThreshold,
                   int advancedSecurityLevelsRequired,
                   int fingerNumber,
                   TemplateType templateType,
                   TemplateFVPType templateFVPType,
                   int maxSizeTemplate,
                   EnrollmentType enrollType,
                   LatentDetection latentDetection,
                   Coder coderChoice,
                   int detectModeChoice,
                   CompressionAlgorithm compressAlgo,
                   int compressRate,
                   TemplateList templateList,
                   int callbackCmd,
                   java.util.Observer callback)
This function captures live fingers and extracts their templates.
The number of fingers can be specified. The template is calculated after one or three fingerprint image acquisitions (the user has to put each finger 1 or 3 times on the sensor).
We strongly recommend getting 3 images for enrollment purpose, and 1 image for verification purpose. An enrollment based on 3 images will increase the system accuracy. To obtain the best accuracy, it is strongly recommended to use the fore, the thumb or the middle fingers.
Fingerprint quality and advanced security levels compatibility (MorphoSmart™ FINGER VP only) are only available if export of templates is activated. getFVPTemplate must be called to retrieve multimodal template. getTemplate must be called to retrieve fingerprint template.

Parameters:
timeout - Finger detection timeout in seconds. Its value must be between 0 and 0xFFFF. 0 corresponds to an infinite timeout.
acquisitionThreshold - Minimum value of fingerprint quality. This value can be 0 (strongly recommended) or any value between 20 and 100.
advancedSecurityLevelsRequired - This parameter is supported only by MorphoSmart™ FINGER VP. This parameter can be set to - 1 : to get multimodal templates compatible with advanced security levels (levels greater than standard) - 0 : to get information about the multimodal templates compatibility with advanced security levels. - 0xFF : neither be informed nor force multimodal templates compatibility with advanced security levels. - If enrollType is set to one (1), this value can only be set to 0xFF.
fingerNumber - The number of fingers to enroll. This function can enroll 1 or 2 fingers. Set this value to 1 to enroll 1 finger per user. Set this value to 2 to enroll 2 fingers per user.
templateType - Indicates the template acquisition format. The template format should be MORPHO_PK_COMP. The other template formats (MORPHO_PK_COMP_NORM, MORPHO_PK_MAT, MORPHO_PK_MAT_NORM, MORPHO_PK_ANSI_378, MORPHO_PK_MINEX_A, MORPHO_PK_ISO_FMR, MORPHO_PK_ISO_FMC_NS, MORPHO_PK_ISO_FMC_CS or MORPHO_PK_PKLITE (only available on MorphoSmart™ CBM-E3)) are also supported but Morpho recommends using them only for compatibility with existing systems or specific usage. On MorphoSmart™ FINGER VP, put MORPHO_NO_PK_FP.
templateFVPType - Indicates the multimodal template acquisition format. The template format should be MORPHO_PK_FVP.
maxSizeTemplate - Defines the format of the exported minutiae. - Set this value to 1 to export the minutiae with its default size. - For MORPHO_PK_COMP fingerprint template format only, this field can be set to a value from 170 (0xAA) to 255 (0xFF) to limit the size of the fingerprint template. If the fingerprint template size is higher than the required value, it is compressed to match the requirement before being included in the reply, otherwise the fingerprint template is included without modification. It means that the fingerprint template size is less or equal to the specified value. - For MORPHO_PK_ANSI_378, MORPHO_PK_ISO_FMC_CS, MORPHO_PK_ISO_FMC_NS and MORPHO_PK_ISO_FMR fingerprint template formats, this field can be set to a value from 2 (0x02) to 255 (0xFF) to limit the number of PK (minutiae) in the fingerprint template.
enrollType - Specifies the number of fingerprint image acquisitions. Allowed values are 0, 1 and 3. We strongly recommend setting this value to 0 (default value) or 3 for enrollment purpose to increase the system performances: in this case, the template is generated from a consolidation calculation of three consecutive acquisitions of the same fingerprint. It is also possible to set this value to 1 for verification purpose. In this case, it is not possible to save the record in the internal database: in this case, the template is generated from one single fingerprint acquisition. On MorphoSmart™ FINGER VP, the value 1 is deprecated.
latentDetection - - Set to a LATENT_DETECT_DISABLE value to disable the latent detection mechanism: the default settings - Set to a LATENT_DETECT_ENABLE value to enable the latent detection mechanism. This should be enabled when capturing the template for verification performed on the PC (i.e. when enrollType is set to 1).
coderChoice - contains the biometric coder to use (MORPHO_MSO_V9_CODER or MORPHO_MSO_V9_JUV_CODER). Morpho recommends using MORPHO_MSO_V9_CODER.
detectModeChoice - Value among of the following: - MORPHO_VERIF_DETECT_MODE : more permissive mode than default; MorphoSmart™ detects more easily finger presence, but might issue lower quality templates. - MORPHO_ENROLL_DETECT_MODE : strongest detection mode (default mode). - MORPHO_WAKEUP_LED_OFF : (only available on MorphoSmart™ MSO FFD) leds are turned off while waiting for a finger (impedance wakeup). - MORPHO_FORCE_FINGER_ON_TOP_DETECT_MODE : (not available on MorphoSmart™ CBM-V) force the finger to cover the top of the capture area to increase quality. - MORPHO_WAKEUP_LED_ON : (only available on MorphoSmart™ FINGER VP) leds are turned on while waiting for a finger.
compressAlgo - Compression algorithm to be used to compress the fingerprint image. Available algorithms are: - MORPHO_NO_COMPRESS - MORPHO_COMPRESS_V1 - MORPHO_COMPRESS_WSQ - Image export is activated with setActivateFullImageRetrieving.
compressRate - Compression rate used by the fingerprint image compression algorithm: - useless for MORPHO_NO_COMPRESS and MORPHO_COMPRESS_V1 algorithms (must be set to 0). - can vary between 2 and 256 for MORPHO_COMPRESS_WSQ algorithm, usual recommended value is 10.
callbackCmd - Binary mask with CallbackMask elements. This mask describes the asynchronous status events that will trig the callback function. Set this parameter to 0 if you do not want any asynchronous status to be received. For example MORPHO_CALLBACK_COMMAND_CMD | MORPHO_CALLBACK_IMAGE_CMD means we want to receive the command status (move finger more left, remove finger,...) and low-resolution images.
callback - Observer called on the reception of asynchronous status. null if not used.
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - MORPHOERR_TIMEOUT The finger detection timeout has expired. - MORPHOERR_MEMORY_PC Not enough memory on the PC. - MORPHOERR_SAME_FINGER User gave the same finger twice. - MORPHOERR_PROTOCOLE Communication protocol error. - MORPHOERR_INVALID_PK_FORMAT Invalid template format - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - MORPHOERR_FFD False Finger Detected - MORPHOERR_MOIST_FINGER The finger can be too moist or the scanner is wet. - MORPHOERR_LICENSE_MISSING A required license is missing (MorphoSmart™ FINGER VP only). - MORPHOERR_ADVANCED_SECURITY_LEVEL_MISMATCH Failed to make a multimodal template compatible with advanced security levels (MorphoSmart™ FINGER VP only). - MORPHOERR_BAD_FINAL_FINGER_PRINT_QUALITY Failed to capture the fingerprint with a quality greater than or equal to the specified threshold. - MORPHOERR_KEY_NOT_FOUND The specified key is missing, unable to encrypt biometrics data. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

capture

public int capture(int timeout,
                   int acquisitionThreshold,
                   int advancedSecurityLevelsRequired,
                   int fingerNumber,
                   TemplateType templateType,
                   TemplateFVPType templateFVPType,
                   int maxSizeTemplate,
                   EnrollmentType enrollType,
                   LatentDetection latentDetection,
                   Coder coderChoice,
                   int detectModeChoice,
                   TemplateList templateList,
                   int callbackCmd,
                   java.util.Observer callback)
Deprecated. kept for compatibility with release 6.6.6.1_Android_3.3, replaced by capture


closeDevice

public int closeDevice()
This function closes the MorphoSmart™ communication link.

Returns:
- MORPHO_OK The execution of the function was successful - MORPHOERR_CLOSE_COM Can not close the MorphoSmart™ communication link - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - MORPHOERR_USER User error - CLASS_NOT_INSTANTIATED Class Not Instantiated.

enableCS

public int enableCS(boolean enable)
MORPHO USE ONLY


enableDataEncryption

public int enableDataEncryption(boolean enable,
                                java.lang.String diversificationData)
This method enables or disables the encryption of exported biometric data and sets the diversification data to be concatenated to image/template before encryption.

Parameters:
enable - This variable is used to indicate the activation or deactivation encryption.
diversificationData - Diversification data to be concatenated to image/template before encryption.
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - MORPHOERR_INVALID_CLASS The class has been destroyed - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

resumeConnection

public int resumeConnection(int timeOut,
                            java.util.Observer observer)
This function reconnect the MorphoSmart™.

Parameters:
timeOut - Waiting time (in seconds) for re-enumeration of the sensor after the soft reboot. The minimum value is 30s. 0 corresponds to an infinite timeout.
callback - Observer called on the reception of connexion status. null if not used.
An example of implementation can be found in the MorphoSmart Sample.
Returns:
- MORPHO_OK The function was successful. - CLASS_NOT_INSTANTIATED Class Not Instantiated. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_RESUME_CONNEXION_ALREADY_STARTED An error occurred during the execution of the function.

getProductDescriptor

public java.lang.String getProductDescriptor()
get the string that describes the product reference.

Returns:
product descriptor

getSensorDescriptor

public java.lang.String getSensorDescriptor()
get the string that describes the optical sensor.

Returns:
sensor descriptor

getSoftwareDescriptor

public java.lang.String getSoftwareDescriptor()
get the string that describes the software release.

Returns:
software descriptor

openUsbDevice

public int openUsbDevice(java.lang.String sensorName,
                         int timeOut)
This function opens the USB communication link and tests it with a basic exchange with the MorphoSmart™.

Parameters:
sensorName - A string containing the name of the MSO ["product number"-"serial number"], returned by the getUsbDeviceName function.
timeOut - Timeout in millisecond.
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_CONNECT Cannot connect to the MorphoSmart™. - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - MORPHOERR_USB_DEVICE_NAME_UNKNOWN The specified USB device is not plugged - MORPHOERR_NO_SERVER The Morpho MorphoSmart Service Provider Usb Server is stopped or not installed. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

setConfigParam

public int setConfigParam(int tag,
                          byte[] paramValue)
This function modifies the value of the specified parameter of the MorphoSmart™ device configuration. The modification is ignored until the MorphoSmart™ device is restarted. A power off of the MorphoSmart™ device does not restore the default values: the modified values are saved.

Parameters:
tag - Parameter Identifier : - CONFIG_SENSOR_WIN_POSITION_TAG: Sensor Window Position (only available for MorphoSmart™ CBM). Accepted values are 0, 1, 2, 3, 4, 5, 6 or 7. - CONFIG_UI_CONFIG_TAG: UI Configuration (only available for MorphoSmart™ FINGER VP). - CONFIG_UI_RESET_TAG: UI Reset (only available for MorphoSmart™ FINGER VP).
paramValue - Parameter value
Returns:
- MORPHO_OK The function was successful. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

setSecurityLevel

public int setSecurityLevel(SecurityLevel securityLevel)
This function sets the security level for finger acquisition functions. This level can be retrieved at any moment with getSecurityLevel.

Parameters:
securityLevel - Possible values: - MorphoSmart™ MSO FFD: - FFD_SECURITY_LEVEL_LOW_HOST - FFD_SECURITY_LEVEL_MEDIUM_HOST - FFD_SECURITY_LEVEL_HIGH_HOST - MorphoSmart™ FINGER VP: - MULTIMODAL_SECURITY_STANDARD - MULTIMODAL_SECURITY_MEDIUM - MULTIMODAL_SECURITY_HIGH
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_INVALID_CLASS The class has been destroyed - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

getSecurityLevel

public int getSecurityLevel()
This function returns the security level set with setSecurityLevel.

Returns:
- MorphoSmart™ MSO 3x1 FFD: - FFD_SECURITY_LEVEL_LOW_HOST - FFD_SECURITY_LEVEL_MEDIUM_HOST - FFD_SECURITY_LEVEL_HIGH_HOST - MorphoSmart™ CBM-E2(since v13.01): - FFD_SECURITY_LEVEL_LOW_HOST - FFD_SECURITY_LEVEL_MEDIUM_HOST - FFD_SECURITY_LEVEL_HIGH_HOST - FFD_SECURITY_LEVEL_NONE_HOST - MorphoSmart™ FINGER VP: - MULTIMODAL_SECURITY_STANDARD - MULTIMODAL_SECURITY_MEDIUM - MULTIMODAL_SECURITY_HIGH - This function returns a negative value in the case of an error (ErrorCodes)

setLoggingMode

public int setLoggingMode(MorphoLogMode morphoLogMode)
This function modify the logging mode (the modification is effective only in RAM memory and it is not reported in the configuration file).

Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - MORPHOERR_UNAVAILABLE log unavailable

setLoggingLevelOfGroup

public int setLoggingLevelOfGroup(int groupID,
                                  MorphoLogLevel morphoLogLevel)
This function modify the logging level of a group (the modification is effective only in RAM memory and it is not reported in the configuration file).

Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - MORPHOERR_UNAVAILABLE log unavailable

setStrategyAcquisitionMode

public int setStrategyAcquisitionMode(StrategyAcquisitionMode strategyAcquisitionMode)
This function sets the Strategy Acquisition Mode : Five different modes are supported.

Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_BADPARAMETER One or more input parameters are out of range.

getStrategyAcquisitionMode

public StrategyAcquisitionMode getStrategyAcquisitionMode()
This function returns the Acquisition Mode set by setStrategyAcquisitionMode.

Returns:
- MORPHO_ACQ_EXPERT_MODE - MORPHO_ACQ_UNIVERSAL_FAST_MODE - MORPHO_ACQ_UNIVERSAL_ACCURATE_MODE - MORPHO_ACQ_FULL_MULTIMODAL_MODE - MORPHO_ACQ_ANTI_SPOOFING_MODE - null : An error occurred during the execution of the function.

getComType

public int getComType()
This function returns the type of the connection to a specific MorphoSmart™ of a MorphoDevice object. The returned value is COM_TYPE_NOT_SET at the creation of a MorphoDevice object, before the connection to the MorphoSmart™ or after the closing of the connection to the MorphoSmart™. If the connection failed, the returned value remains COM_TYPE_NOT_SET.

Returns:
Communication type - USB_COM_TYPE - RS232_COM_TYPE - USER_COM_TYPE - COM_TYPE_NOT_SET

getConfigParam

public byte[] getConfigParam(int parameterIdentifier)
This function retrieves the value of a specified parameter of MorphoSmart™ device configuration.

Parameters:
parameterIdentifier - Parameter Identifier : - CONFIG_SENSOR_WIN_POSITION_TAG: Sensor Window Position (only available for MorphoSmart™ CBM). - CONFIG_UI_CONFIG_TAG: UI Configuration (only available for MorphoSmart™ FINGER VP). - CONFIG_UI_RESET_TAG: UI Reset (only available for MorphoSmart™ FINGER VP).
Returns:
the value of the parameter

getStringDescriptorBin

public java.lang.String getStringDescriptorBin(DescriptorID descriptorIdentifier)
This function returns a descriptor in the form of a string.

Parameters:
descriptorIdentifier - Required descriptor. Available descriptors are: - BINDESC_VERSION - BINDESC_MAX_USER - BINDESC_MAX_DB - BINDESC_SOFT - BINDESC_FLASH_SIZE - BINDESC_PRODUCT_NAME - BINDESC_PID - BINDESC_SN - BINDESC_OEM_PID - BINDESC_OEM_SN - BINDESC_SENSOR_ID - BINDESC_SENSOR_SN - BINDESC_LICENSES - BINDESC_CUSTOM_DESCRIPTOR
Returns:
- String buffer that will contain the required descriptor. - This function returns a String buffer that will contain error code in the case of an error (ErrorCodes)

getIntDescriptorBin

public int getIntDescriptorBin(DescriptorID descriptorIdentifier)
This function returns a descriptor in the form of an integer.

Parameters:
descriptorIdentifier - Required descriptor. Available descriptors are: - BINDESC_MAX_USER - BINDESC_MAX_DB - BINDESC_FLASH_SIZE
Returns:
- Integer that will contain the required descriptor value. - This function returns a negative value in the case of an error (ErrorCodes)

getFFDLogs

public java.lang.String getFFDLogs()
This function retrieves FFD logs. Log data received from the terminal are formatted and concatenated into a output buffer separated by CR/LF. This output buffer is sized according to the number of received events.

Returns:
Concatenated log lines

getInternalError

public int getInternalError()
When the biometric terminal returns an internal error,the SDK returns MORPHOERR_INTERNAL. getInternalError retrieves this internal error. This internal error may help to diagnose internal problems and should be sent to Morpho for further analysis.

Returns:
Internal biometric terminal error.

getImage

public int getImage(int timeOut,
                    int acquisitionThreshold,
                    CompressionAlgorithm compressAlgo,
                    int compressRate,
                    int detectModeChoice,
                    LatentDetection latentDetection,
                    MorphoImage morphoImage,
                    int callbackCmd,
                    java.util.Observer callback)
This function captures live fingers and extracts its image in full resolution. To obtain the best accuracy, it is strongly recommended to use the fore, the thumb or the middle fingers. getImage is a fingerprints acquisition. This function performs the following process: - Lighting of the MorphoSmart™ sensor : the MorphoSmart™ terminal starts the reception of images which come from the MorphoSmart™ sensor, - Searching of a fingerprint within each received image, - Evaluation of the fingerprint quality until obtaining a sufficient quality, - False finger detection (if applicable, i.e. for MSOxx1), - Emission of the image that contains the sufficient fingerprint quality. - For a well use of this function, you had better to set the timeout in order that the user could position his finger: we recommend a timeout value between 15 and 60 seconds, a 30 seconds timeout would be ideal.

Parameters:
timeOut - Finger detection timeout in seconds. Its value must be between 0 and 0xFFFF. 0 corresponds to an infinite timeout.
acquisitionThreshold - Minimum value of fingerprint quality. This value can be 0 (strongly recommended) or any value between 20 and 100.
compressAlgo - Compression algorithm to be used to compress the fingerprint image. Available algorithms are: - MORPHO_NO_COMPRESS - MORPHO_COMPRESS_V1 - MORPHO_COMPRESS_WSQ
compressRate - Compression rate used by the fingerprint image compression algorithm: - useless for MORPHO_NO_COMPRESS and MORPHO_COMPRESS_V1 algorithms (must be set to 0). - can vary between 2 and 256 for MORPHO_COMPRESS_WSQ algorithm, usual recommended value is 10.
detectModeChoice - Value among of the following: - MORPHO_VERIF_DETECT_MODE : more permissive mode than default; MorphoSmart™ detects more easily finger presence, but might issue lower quality templates. - MORPHO_ENROLL_DETECT_MODE : strongest detection mode (default mode). - MORPHO_WAKEUP_LED_OFF : (only available on MorphoSmart™ MSO FFD) leds are turned off while waiting for a finger (impedance wakeup). - MORPHO_FORCE_FINGER_ON_TOP_DETECT_MODE : (not available on MorphoSmart™ CBM-V) force the finger to cover the top of the capture area to increase quality. - MORPHO_WAKEUP_LED_ON : (only available on MorphoSmart™ FINGER VP) leds are turned on while waiting for a finger.
latentDetection: - - Set to a LATENT_DETECT_DISABLE value to disable the latent detection mechanism: the default settings. - Set to a LATENT_DETECT_ENABLE value to enable the latent detection mechanism.
callbackCmd - Binary mask with CallbackMask elements
callback - Observer called on the reception of asynchronous status. null if not used.
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - MORPHOERR_TIMEOUT The finger detection timeout has expired. - MORPHOERR_MEMORY_PC Not enough memory on the PC. - MORPHOERR_PROTOCOLE Communication protocol error. - MORPHOERR_BAD_COMPRESSION Invalid compression type. - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - MORPHOERR_FFD False Finger Detected. - MORPHOERR_MOIST_FINGER The finger can be too moist or the scanner is wet. - MORPHOERR_LICENSE_MISSING A required license is missing (MorphoSmart™ FINGER VP only). - CLASS_NOT_INSTANTIATED Class Not Instantiated.

getSecuConfig

public int getSecuConfig(SecuConfig secuConfig)
This function retrieves MorphoSmart™ configuration.

Parameters:
secuConfig - Device security configuration.
Returns:
- MORPHO_OK The matching was successful. - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

getUnlockSeed

public byte[] getUnlockSeed()
This function requests the terminal to start the unlock process, and to return the value of the seed to be used for the next step of the unlock process. The unlocking process is detailed in the MorphoSmartHostSystemInterfaceSpecification.pdf document.

Returns:
string seed

getUsbDeviceName

public java.lang.String getUsbDeviceName(int index)
initUsbDevicesNameEnum must be call before using this function. This function returns a string containing the name of the MSO.

Parameters:
index - This index is between 0 and the number of connected device returned by the function initUsbDevicesNameEnum.
Returns:
String containing the name of the MSO ["product number"-"serial number"].

initUsbDevicesNameEnum

public int initUsbDevicesNameEnum(java.lang.Integer nbUsbDevice)
This function enumerates the number of connected USB MorphoSmart™ devices. It builds an internal list which is composed of USB MorphoSmart™ name and returns the number of plugged device. The MorphoSmart™ name is the product number concatenated with the serial number. To get the name of the device that are currently plugged to the PC, call the getUsbDeviceName function.

Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_INTERNAL USB errors - CLASS_NOT_INSTANTIATED Class Not Instantiated

getUsbDevicePropertie

public java.lang.String getUsbDevicePropertie(int index)
initUsbDevicesNameEnum must be call before using this function. This function return the type of the connected MorphoSmart™ device.

Parameters:
index - This index is between 0 and the number of connected device returned by the function initUsbDevicesNameEnum.
Returns:
String containing the type of the MSO (MSO100, MSO300...) and other information

isCSEnabled

public boolean isCSEnabled()
MORPHO USE ONLY


isDataEncryptionEnabled

public boolean isDataEncryptionEnabled()
This method indicates if exported biometric data encryption is activated and returns diversification data. Exported biometric data encryption is enabled/disabled with enableDataEncryption.

Returns:
- true Exported biometric data encryption is activated - false Exported biometric data encryption is not activated

rebootSoft

public int rebootSoft(int timeOut,
                      java.util.Observer callback)
This function reboot the MorphoSmart™ software.

Parameters:
timeOut - Waiting time (in seconds) for re-enumeration of the sensor after the soft reboot. The minimum value is 30s. 0 corresponds to an infinite timeout.
callback - Observer called on the reception of connexion status. null if not used.
An example of implementation can be found in the MorphoSmart Sample.
Returns:
- MORPHO_OK The function was successful. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_RESUME_CONNEXION_ALREADY_STARTED An error occurred during the execution of the function. - CLASS_NOT_INSTANTIATED Class Not Instantiated.

unlock

public int unlock(byte[] secretID,
                  byte[] cipheredSeed)
This function unlocks the MorphoSmart™. The host transmits the Seed retrieved by a prior call to the getUnlockSeed function, ciphered with the Secret corresponding to the SecretID that it owns. These two parameters are given by Morpho to the customer, upon his request.

Parameters:
secretID - Contains the Identification of the Secret used to cipher the seed.
cipheredSeed - Contains the ciphered seed by the Secret according to the SecretID.
Returns:
- MORPHO_OK The function was successful. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - CLASS_NOT_INSTANTIATED Class Not Instantiated

unlock

public int unlock(java.lang.String secretID,
                  java.lang.String cipheredSeed)
Deprecated. kept for compatibility with release 6.6.6.1_Android_3.3, replaced by unlock


verify

public int verify(int timeOut,
                  int far,
                  Coder coder,
                  int detectModeChoice,
                  int matchingStrategy,
                  TemplateList templateList,
                  int callbackCmd,
                  java.util.Observer callback,
                  ResultMatching resultMatching)
This function captures a live finger and checks if it matches with the user referred to. The maximum number of reference templates is 20.

Parameters:
timeOut - Finger detection timeout in seconds. Its value must be between 0 and 0xFFFF. 0 corresponds to an infinite timeout.
far - This parameter specifies how tight the matching threshold is. Morpho recommends MORPHO_FAR_5 (see paragraph FalseAcceptanceRate).
coder - contains the biometric coder to use (MORPHO_MSO_V9_CODER or MORPHO_MSO_V9_JUV_CODER). Morpho recommends using MORPHO_MSO_V9_CODER. Please refer to the MorphoSmartHostInterface document for details.
detectModeChoice - Value among of the following: - MORPHO_VERIF_DETECT_MODE : more permissive mode than default; MorphoSmart™ detects more easily finger presence, but might issue lower quality templates. - MORPHO_ENROLL_DETECT_MODE : strongest detection mode (default mode). - MORPHO_WAKEUP_LED_OFF : (only available on MorphoSmart™ MSO FFD) leds are turned off while waiting for a finger (impedance wakeup). - MORPHO_FORCE_FINGER_ON_TOP_DETECT_MODE : (not available on MorphoSmart™ CBM-V) force the finger to cover the top of the capture area to increase quality. - MORPHO_WAKEUP_LED_ON : (only available on MorphoSmart™ FINGER VP) leds are turned on while waiting for a finger.
matchingStrategy - Value among of the following: - MORPHO_STANDARD_MATCHING_STRATEGY: default strategy. - MORPHO_ADVANCED_MATCHING_STRATEGY: less FRR, but more processing time (not available on MorphoSmart™; FINGER VP).
templateList - List of candidate's templates to match. The number of templates must be less or equal to 20. The template format should be MORPHO_PK_COMP. The other template formats (MORPHO_PK_COMP_NORM, or MORPHO_PK_MAT, or MORPHO_PK_MAT_NORM, MORPHO_PK_ANSI_378, MORPHO_PK_MINEX_A, MORPHO_PK_ISO_FMR, MORPHO_PK_ISO_FMC_NS, MORPHO_PK_ISO_FMC_CS or MORPHO_PK_PKLITE (only available on MorphoSmart™ CBM-E3)) are also supported, but Morpho recommends using them only for compatibility with existing systems or specific usage. Only a secure MorphoSmart™ accept the X984 biometric token and verify the integrity.
callbackCmd - Binary mask with CallbackMask elements.
callback - User context called on the reception of asynchronous status. null if not used.
Returns:
- MORPHO_OK The matching was successful. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_BADPARAMETER The matching threshold value or timeout value is out of range or there is no biometric input data. - MORPHOERR_INVALID_TEMPLATE The reference template is not valid: bad identifier, corrupted minutiae. - MORPHOERR_TIMEOUT The finger detection timeout has expired. - MORPHOERR_NO_HIT The matching returned a No Hit. - MORPHOERR_CMDE_ABORTED Command is canceled. - MORPHOERR_NO_REGISTERED_TEMPLATE Template list is empty. - MORPHOERR_MIXED_TEMPLATE Template list contains templates with mixed formats. - MORPHOERR_MEMORY_PC Not enough memory on the PC. - MORPHOERR_PROTOCOLE Communication protocol error. - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - MORPHOERR_FFD False Finger Detected. - MORPHOERR_MOIST_FINGER The finger can be too moist or the scanner is wet. - MORPHOERR_FVP_MINUTIAE_SECURITY_MISMATCH Fingerprint template cannot be matched in high security level (MorphoSmart™ FINGER VP only). - MORPHOERR_LICENSE_MISSING A required license is missing (MorphoSmart™ FINGER VP only). - MORPHOERR_FVP_FINGER_MISPLACED_OR_WITHDRAWN Finger was misplaced or has been withdrawn from sensor during acquisition (MorphoSmart™ FINGER VP only). - MORPHOERR_FFD_FINGER_MISPLACED Finger was misplaced during acquisition (MorphoSmart™ MSO FFD only). - CLASS_NOT_INSTANTIATED Class Not Instantiated

verifyMatch

public int verifyMatch(int far,
                       TemplateList templateListSearch,
                       TemplateList templateListReference,
                       java.lang.Integer matchingScore)
This function checks if one template of the reference template list matches with the unique template of the search template list. The maximum number of reference templates is 20. The maximum number of search template is 1.

Parameters:
far - This parameter specifies how tight the matching threshold is. Morpho recommends MORPHO_FAR_5 (see paragraph FalseAcceptanceRate).
templateListSearch - Search template list. This list must include one unique template. The template format should be MORPHO_PK_COMP. The other template formats (MORPHO_PK_COMP_NORM, MORPHO_PK_MAT, MORPHO_PK_MAT_NORM, MORPHO_PK_ANSI_378, MORPHO_PK_MINEX_A, MORPHO_PK_ISO_FMR, MORPHO_PK_ISO_FMC_NS, MORPHO_PK_ISO_FMC_CS or MORPHO_PK_PKLITE (only available on MorphoSmart™ CBM-E3)) are also supported but Morpho recommends using them only for compatibility with existing systems or specific usage. Only secure MorphoSmart™ accepts the X984 biometric token and verify the integrity.
templateListReference - Reference templates list. The number of templates must be lower than 20. The template format should be MORPHO_PK_COMP. The other template formats (MORPHO_PK_COMP_NORM, MORPHO_PK_MAT, MORPHO_PK_MAT_NORM, MORPHO_PK_ANSI_378, MORPHO_PK_MINEX_A, MORPHO_PK_ISO_FMR, MORPHO_PK_ISO_FMC_NS, MORPHO_PK_ISO_FMC_CS or MORPHO_PK_PKLITE (only available on MorphoSmart™ CBM-E3)) are also supported but Morpho recommends using them only for compatibility with existing systems or specific usage. Only secure MorphoSmart™ accept the X984 biometric token and verify the integrity.
Returns:
- MORPHO_OK The function was successful. - MORPHOERR_INTERNAL An error occurred during the execution of the function. - MORPHOERR_BADPARAMETER The matching threshold value or timeout value is out of range or there is no biometric input data. - MORPHOERR_INVALID_TEMPLATE One template is not valid: bad identifier, corrupted minutiae. - MORPHOERR_NO_HIT There are no common fingers between the two users. - MORPHOERR_CMDE_ABORTED Command is canceled. - MORPHOERR_NO_REGISTERED_TEMPLATE At least one template list is empty. - MORPHOERR_MIXED_TEMPLATE Template list contains templates with mixed formats. - MORPHOERR_MEMORY_PC Not enough memory on the PC. - MORPHOERR_PROTOCOLE Communication protocol error. - MORPHOERR_LICENSE_MISSING A required license is missing (MorphoSmart™ FINGER VP only). - MORPHOERR_INVALID_PK_FORMAT Invalid template format - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated

getKCV

public byte[] getKCV(MorphoKCVID keyID,
                     byte[] secretID)
This function retrieves the KCV (key check value) of a key saved in the MorphoSmart™.

Parameters:
keyID - Identifier of the key: - ID_KENC - ID_KSECRET - ID_KS
secretID - Identifier of the locking secret when keyID = ID_KSECRET (set to null otherwise).
Returns:
KCV of the key

getKCV

public java.lang.String getKCV(int keyID)
Deprecated. kept for compatibility with release 6.6.6.1_Android_3.3, replaced by getKCV


comSend

public int comSend(int timeOut,
                   byte[] data)
This function sends the information required to open a communication (RS232, USB or user communication)

Parameters:
timeOut - set timeout
data - Buffer to send
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_BADPARAMETER One or more input parameters are out of range. - MORPHOERR_INTERNAL An internal error occurred during the execution of the function. - MORPHOERR_PROTOCOLE RS232 or USB error. - MORPHOERR_USER User error.

comReceive

public byte[] comReceive(int timeOut)
This function receives the information required to open a communication (RS232, USB or user communication)

Parameters:
timeOut - set timeout
Returns:
buffer

loadKs

public int loadKs(byte[] key)
This method loads a new symmetric key KS in the MorphoSmart™ using the unsecure mode: the new key is sent to device in plaintext. This mode is only available for standard devices (i.e. not secure).

Parameters:
key - New symmetric key KS in plaintext.
Returns:
- MORPHO_OK - MORPHOERR_BADPARAMETER - MORPHOERR_INVALID_CLASS - MORPHOERR_CORRUPTED_CLASS - CLASS_NOT_INSTANTIATED Class Not Instantiated

loadMocKey

public int loadMocKey(byte[] key_enc_Ciffered_by_Certificate,
                      byte[] key_enc_Ciffered_by_Certificate_Signature,
                      byte[] hostCertificate)
This function loads a new Key in the MorphoSmart™, this key is used to ciffer the Template passed to the Smart Card in a Match on Card process It uses the secured key load solution

Parameters:
key_enc_Ciffered_by_Certificate - Defines the Kenc Ciffered by the MSO Certificate.
key_enc_Ciffered_by_Certificate_Signature - Defines the Signature of the previous parameter, the Kenc Ciffered by the MSO Certificate.
hostCertificate - The host certificate encoded in DER format used for the signature.
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_INVALID_CLASS The class has been destroyed - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated

loadMocKey

public int loadMocKey(byte[] key_enc_Ciffered_by_KencTrans)
This function loads a new Key in the MorphoSmart™, this key is used to ciffer the Template passed to the Smart Card in a Match on Card process It uses the compatible key load solution

Parameters:
key_enc_Ciffered_by_KencTrans - the key Kenc ciffered by KencTrans used to ciffer the Template
Returns:
- MORPHO_OK The execution of the function was successful. - MORPHOERR_INVALID_CLASS The class has been destroyed - MORPHOERR_CORRUPTED_CLASS Class has been corrupted. - CLASS_NOT_INSTANTIATED Class Not Instantiated