Configure device using RM Interface

This page guides user to configure reader using Reader Management Interface.

Important

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

Import Certificates and Generate Endpoint Configuration

  1. Import device Server certificates in the reader web console.

  2. Create Web Socket Endpoint JSON object

Edit Example MQTT endpoint JSON object shown below.

{
    "name": "WS",
    "description": "WS Test",
    "type": "WEBSOCKET",
    "configuration":
    {
        "endpoint":
        {
            "protocol": "ws"
        },
        "additional":
        {
            "batching":
            {
                "maxPayloadSizePerReport": 0,
                "reportingInterval": 0
            },
            "retention":
            {
                "maxEventRetentionTimeInMin": 50,
                "maxNumEvents": 150000,
                "throttle": 500
            }
        },
        "security":{
        	"verifyServerCertificate": false,
        	"verifyServerHostName": false
        }
    }
}
  1. Edit protocol based on the desired connection required.

    • ws: for unsecure Websocket connection.

    • wss: for secure Websocket connection.

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/WS_1.png
  1. Goto ADD endpoint (WS) API and replace the JSON object between <motorm:data> </motorm:data> with the MQTT Endpoint JSON object created in Import Certificates and Generate Endpoint Configuration.

    ../../_images/WS_2.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 WS.

    • Goto UPDATE endpoint mapping API and edit control, data, event, and management endpoints to the name used in MQTT endpoint JSON object.

    Important

    Reader is configured to MQTT endpoint for all the interfaces.

    ../../_images/ws_ep_mapping.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/WS_4.png
  1. If device is not enrolled currently, Send EnrollToCloud API.

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

disconnectFromCloud API:

../../_images/WS_6.png

connectToCloud API:

../../_images/WS_7.png

Verify Cloud Connection

  1. Check Cloud Connection Status using isConnectedToCloud API.

../../_images/WS_8.png