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
Import AWS device certificates downloaded 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
PFXfile from certificate.Import Certificates into reader using certificate page.
Method-3: pass certificates contents along with
Endpoint Config.
Create HTTP Endpoint JSON object (when used
Method-1orMethod-2for importing certificates).
Edit Example HTTP endpoint JOSN object shown below.
{ "type": "HTTP-POST", "name": "webhook", "description": "http server", "configuration": { "url": "https://webhook.site/59886004-4fd7-42cf-8323-6c4db2e3d6f0", "security": { "verifyPeer": false, "verifyHost": false, "authenticationType": "NONE", "useLocalCerts": true, "authenticationOptions": { "certificates": { "CACertificatePath": "/readerconfig/ssl/server.ca", "certAlgorithm": "RS256", "certFormat": "PEM", "certificatePath": "/readerconfig/ssl/server.crt", "privateKeyPath": "/readerconfig/ssl/server.key" }, "CACertificateFileLocation": "/readerconfig/ssl/server.ca", "verifyServerCertificate": true } } } }
Edit configuration details with HTTP Server settings.
For secure server it is required to provide security settings.
Edit
CACertificatePath,certificatePathandprivateKeyPathwith certificate path details
Create HTTP Endpoint JSON object without local certificates (when used
Method-3for importing certificates).
Edit Example HTTP endpoint JOSN object shown below.
{ "type": "HTTP-POST", "name": "webhook", "description": "http server", "configuration": { "url": "https://webhook.site/59886004-4fd7-42cf-8323-6c4db2e3d6f0", "security": { "verifyPeer": false, "verifyHost": false, "authenticationType": "NONE", "useLocalCerts": false, "authenticationOptions": { "certificates": { "certificateContent": "{certificateContent}", "certAlgorithm": "RS256", "certFormat": "PEM", "privateKeyContent": "{privateKeyContent}", "CACertificateContent": "{CACertificateContent}" }, "CACertificateFileLocation": "/readerconfig/ssl/server.ca", "verifyServerCertificate": true } } } }
Edit endpoint details with HTTP Server settings.
For secure server it is required to provide security settings.
replace
{certificateContent},{privateKeyContent}and{CACertificateContent}with Public Certificate, Private Key and Root CA certificate content.In certificate content replace newline
\\ncharacter with\\r\\ncharacters as shown below for proper JSON object.
Import Configuration into Reader
Download and import postman collections
Cloud Connect Enhanced UI.postman_collection.jsonandCloud Connect - RM-commands.postman_collection.json.Create an environment variables
protocol(http/https) andreader-ip(10.17.231.7).Execute
LoginAPI.Important
change
usernameandpasswordfield in the body with readers username and password configured.
Goto
ADD endpoint (HTTP-POST) APIand replace the JSON object between<motorm:data> </motorm:data>with the HTTP Endpoint JSON object created in Import Certificates and Generate Endpoint Configuration.
The response
200 OKindicate the endpoint got added successfully.Status other than
200indicate error and response contain the failure reason and checkreader syslogto get more info on error.
Create Endpoint Mapping for HTTP POST Server.
Goto
UPDATE endpoint mapping APIand edit control, data, event, and management endpoints to the name used in MQTT endpoint JSON object.
Important
Reader is configured to HTTP endpoint for tag data and management events interface and local rest for management and control interfaces.
The response
200 OKindicate the endpoint got added successfully.Status other than
200indicate error and response contain the failure reason and check reader syslog to get more info on error.
Connect to Cloud
Goto
isEnrolledToCloudand check if reader is enrolled for IoT connect or not.
If device is not enrolled currently, Send
EnrollToCloud API.
If device is already enrolled, Send
disconnectFromCloud APIandconnectToCloud API.
disconnectFromCloud API:
connectToCloud API:
Verify Cloud Connection
Check Cloud Connection Status using
isConnectedToCloud API.