Card Reader Configuration

This command allows integration software to configure a card reader. The integration software can only send this command to CWS installed on the local machine. If the command is successfully executed, the card reader will be rebooted.

This command works for UPP card readers. Examples of UPP card readers are Lane/3000, Lane/5000, Self/4000.

The card reader can be configured to USB or to IP. IP includes several options including: DHCP or STATIC, TLS_12 or NONE.

Code Samples

CWS

Request

Example Configuration to IP and BootProtocol is STATIC
{
    "requestId":"-1590004978",
    "targetType":"cardReader",
    "method":"startConnectionConfigurationOnCardReader",
    "parameters":
    {
        "connectionTypeStr" : "IP",         
        "inetBootProtocolStr" : "STATIC",
        "inetAddress": {
            "csdkServerMode":false,
            "encryptionScheme":"TLS_12",
            "host":"192.168.10.100",
            "port":49152
        },
        "inetStaticSettings" : {
            "address" : "192.168.86.94",
            "dns1" : "",
            "dns2" : "",
            "gateway" : "",
            "netMask" : ""
        }
     }
}
Example Configuration to USB
{
    "requestId":"-1590004978",
    "targetType":"cardReader",
    "method":"startConnectionConfigurationOnCardReader",
    "parameters":
    {
        "connectionTypeStr" : "USB"       
    }
}

Response

{
    "requestId":"-1590004978",
    "statusDetails":"REQUEST_ACCEPTED",
    "data":
    {
        "cardReaderCommand":
        {
            "id":"-1590004978",
            "completed":false,
            "eventQueue":[]
        }
    }
}

Status Update

If the complete flag in response is false, client should send in status update request periodically. The following is an example of the request.

{
    "requestId":"-462232597",
    "targetType":"cardReader",
    "method":"getCommandStatusOnCardReader",
    "parameters":
    {
        "id": "-1590004978"
    }
}

Response for Status Update

If the command is successfully executed, field completed* is set to true and statusDetails is set to REQUEST_ACCEPTED,

{
    "requestId":"-1779158281",
    "statusDetails":"REQUEST_ACCEPTED",
    "data":{
        "cardReaderCommand":{
            "id":"-1590004978",
            "completed":true,
            "eventQueue":[
                 {"timeStamp":"1646785974991","statusDetails":"CARD_READER_CONFIGURATION_UPDATE_STARTED"},
                 {"timeStamp":"1646785975135","statusDetails":"CONFIGURATION_UPDATE_FILE_DEPLOYED"},
                 {"timeStamp":"1646785975163","statusDetails":"CARD_READER_CONFIGURATION_UPDATE_COMPLETED"},
                 {"timeStamp":"1646785975163","statusDetails":"CONFIGURE_CARD_READER_CONNECTION_SUCCEEDED"}
            ]
        }
    }
}

Otherwise, statusDetails will be set to different error codes, listed below:

Error CodeMeaning
CARD_READER_CONFIGURATION_UPDATE_INVALID_HOSTEither the host parameter in InetAddress is missing or the host parameter value is invalid
CARD_READER_CONFIGURATION_UPDATE_INVALID_DNS1When BootProtocol is STATIC and DNS1 is invalid.
CARD_READER_CONFIGURATION_UPDATE_INVALID_DNS2When BootProtocol is STATIC and DNS2 is invalid.
CARD_READER_CONFIGURATION_UPDATE_INVALID_GATEWAYWhen BootProtocol is STATIC and GATEWAY is invalid.
CARD_READER_CONFIGURATION_UPDATE_INVALID_IPADDRESSWhen BootProtocol is STATIC and IPADDRESS is invalid.
CARD_READER_CONFIGURATION_UPDATE_INVALID_NETMASKWhen BootProtocol is STATIC and NETMASK is invalid.
CARD_READER_CONFIGURATION_UPDATE_INVALID_PORTEither the port parameter InetAddress is missing or the port parameter value is invalid.
CARD_READER_CONFIGURATION_UPDATE_NOT_SUPPORTEDConfiguration update is not supported.
UNKNOWN_ERRORUnspecified error occurred during the operation.

C#

Example Configuration to IP and BootProtocol is STATIC

CardReaderConnection args = new CardReaderConnection();
args.connectionTypeStr = "IP";
args.inetBootProtocolStr = "STATIC";  // can specify DHCP or STATIC if STATIC must also provide InetStaticSettings
 
args.inetAddress = new InetAddress( "192.168.10.100",        // host
                                    49152,                   // port
                                    EncryptionScheme.TLS_12, // encryption scheme or string "TLS_12"
                                    false);                  // csdk is client therefore reader will be server
 
args.inetStaticSettings = new InetStaticSettings("192.168.10.101", // the desired static IP address
                                                 null,             // net mask - optional if specified will be updated on card reader
                                                 null,             // gateway - optional if specified will be updated on card reader
                                                 null,             // DNS 1 - optional if specified will be updated on card reader
                                                 null);            // DNS 2 - optional if specified will be updated on card reader
 
m_CWS.StartConfigureCardReaderConnection(args, MyNotifyCWSEvent, MyConfigureCardReaderConnectionComplete);

Example Configuration to USB

CardReaderConnection args = new CardReaderConnection();
args.connectionTypeStr = "USB";
m_CWS.StartConfigureCardReaderConnection(args, MyNotifyCWSEvent, MyConfigureCardReaderConnectionComplete);