Configure device using RM Interface

This page guides users to configure the reader using Reader Management Interface.

Important

This guide uses Postman Tool for sending API calls to reader.

Generate Endpoint Configuration for TCPIP nonsecure mode

  1. Create TCPIP Endpoint JSON object .

Edit Example TCPIP endpoint JSON object shown below.

{
    "name": "TCPIP_TEST",
    "description": "TCPIP_TEST",
    "type": "TCPIP-SERVER",
    "configuration": {
        "tcpipport": "8081",
        "additionalConfig":{
            "batching" : {
            "maxPayloadSizePerReport": 0,
            "reportingInterval": 0
            },
            "retention": {
                "maxEventRetentionTimeInMin": 500,
                "maxNumEvents": 150000,
                "throttle": 500
            }
        }
      }
} 
  1. Edit configuration details like tcpipport with desired settings.

Import Certificates and Generate Endpoint Configuration for TCPIP secure mode

  1. Import TCPIP client certificates into reader.

  • Method-1: Using SCP.

    • Copy generated certificates and CA certificate into reader. (copy to desired folder inside /apps/).

  • Method-2: Using reader certificate webpage.

    • Create PFX file from certificate.

    • Import Certificates into reader using certificate page.

  • Method-3: pass certificates contents along with Endpoint Config.

  1. Create TCPIP Endpoint JSON object (when using Method-1 or Method-2 for importing certificates).

Edit Example TCPIP endpoint JSON object shown below.

{
    "name": "TCPIP_TEST",
    "description": "TCPIP_TEST",
    "type": "TCPIP-SERVER",
    "configuration": {
        "tcpipport": "8081",
        "enableSecurity": true,
        "security": {
            "certificates": {
                "CACertificatePath": "/apps/mycert.pem",
                "installedCertificateName": "Server",
                "installedCertificateType": "server",
                "certAlgorithm": "RS256",
                "certFormat": "PEM"
            },
            "useLocalCerts": true,
            "verifyServerCertificate": true
        },
        "additionalConfig":{
            "batching" : {
            "maxPayloadSizePerReport": 0,
            "reportingInterval": 0
            },
            "retention": {
                "maxEventRetentionTimeInMin": 500,
                "maxNumEvents": 150000,
                "throttle": 500
            }
        }
      }
    } 
  1. Edit configuration details with desired settings.

  1. Create TCPIP Endpoint JSON object without local certificates (when using Method-3 for importing certificates).

Edit Example TCPIP endpoint JSON object shown below.

{
    "name": "TCPIP_TEST",
    "description": "TCPIP_TEST",
    "type": "TCPIP-SERVER",
    "configuration": {
        "tcpipport": "8081",
        "enableSecurity": true,
        "security": {
            "certificates": {
                "certificateContent": "{certificateContent}",
                "certAlgorithm": "RS256",
                "certFormat": "PEM",
                "privateKeyContent": "{privateKeyContent}",
                "CACertificateContent": "{CACertificateContent}"
            },
            "useLocalCerts": false,
            "verifyServerCertificate": true
        },
        "additionalConfig":{
            "batching" : {
            "maxPayloadSizePerReport": 0,
            "reportingInterval": 0
            },
            "retention": {
                "maxEventRetentionTimeInMin": 500,
                "maxNumEvents": 150000,
                "throttle": 500
            }
        }
      }
    } 
  1. Edit endpoint details with desired settings.

  2. For secure connection it is required to provide certificate content

    • replace {certificateContent}, {privateKeyContent} and {CACertificateContent} with Public Certificate, Private Key and Root CA certificate content.

In certificate content replace newline \\n character with \\r\\n characters as shown below for proper JSON object.

Import Configuration into Reader

  1. Download and import postman collections Cloud Connect Enhanced UI.postman_collection.json and Cloud Connect - RM-commands.postman_collection.json.

  2. Create an environment variables protocol (http/https) and reader-ip (10.17.231.7).

  3. Execute Login API.

    Important

    change username and password field in the body with readers username and password configured.

../../_images/MQTT_12.png
  1. Goto ADD endpoint (TCPIP) API and replace the JSON object between <motorm:data> </motorm:data> with the TCPIP Endpoint JSON object created above.

    ../../_images/TCPIP_addendpoint_RM.png
    • The response 200 OK indicate the endpoint got added successfully.

    • Status other than 200 indicate error and response contain the failure reason and check reader syslog to get more info on error.

  2. Create Endpoint Mapping for the TCPIP endpoint.

    • Goto UPDATE endpoint mapping API and edit the data interface with the name used in TCPIP endpoint JSON object. Edit the control, event, and management interfaces to the desired endpoint.Enable local rest for the control and management interfaces by setting the enableLocalRest field to true.

    Important

    Reader is configured with TCPIP endpoint for data interface and local rest for management and control interfaces.

    ../../_images/TCPIP_updateendpoint_RM.png
    • The response 200 OK indicate the endpoint got added successfully.

    • Status other than 200 indicate error and response contain the failure reason and check reader syslog to get more info on error.

Connect to Cloud

  1. Goto isEnrolledToCloud and check if reader is enrolled for IoT connect or not.

../../_images/MQTT_42.png
  1. If device is not enrolled currently, Send EnrollToCloud API.

../../_images/MQTT_52.png
  1. If device is already enrolled, Send disconnectFromCloud API and connectToCloud API.

disconnectFromCloud API:

../../_images/MQTT_62.png

connectToCloud API:

../../_images/MQTT_72.png

Verify Cloud Connection

  1. Check Cloud Connection Status using isConnectedToCloud API.

../../_images/MQTT_82.png