Setting Up Cloud Connect for RFID
19
The response from the reader includes a session ID that must be used in further RM commands. The XML
below is a sample response from the reader.
<g1:reply xmlns:g1="urn:epcglobal:rm:xsd:1"
xmlns:g2="urn:epcglobal:xsd:1"
g2:creationDate="2010-02-10T10:10:10Z"
g2:schemaVersion="1">
<g1:id>99</g1:id>
<g1:resultCode>0</g1:resultCode>
<g3:readerDevice xmlns:g3="urn:motorfid:rm:xsd:1">
<g3:doLogin>
<g3:sessionID>sessionID </g3:sessionID>
</g3:doLogin>
</g3:readerDevice>
</g1:reply>
Exporting the Cloud Configuration
The cloud configuration can be exported using the following RM command. Replace the sessionID with the
session ID obtained in the previous command and save the file as export.xml.
<?xml version="1.0" encoding="UTF-8"?>
<rm:command epcglobal:creationDate="2001-12-17T09:30:47.0Z"
epcglobal:schemaVersion="0.0"
xsi:schemaLocation="urn:epcglobal:rm:xsd:1 ../../../schemas/RmCommand.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rm="urn:epcglobal:rm:xsd:1"
xmlns:epcglobal="urn:epcglobal:xsd:1"
xmlns:motorm="urn:motorfid:rm:xsd:1">
<rm:id>99</rm:id>
<rm:targetName>MyFX7500</rm:targetName>
<motorm:readerDevice>
<motorm:sessionID>SessionID</motorm:sessionID>
<motorm:exportCloudConfigFromReader></motorm:exportCloudConfigFromReader>
</motorm:readerDevice>
</rm:command>
To send the command to the reader, run the following command.
curl --location --request GET 'http://10.17.130.66/control' \
--header 'Content-Type: application/xml' \
--data-binary "@export.xml"
The response of the reader is an XML string with the JSON configuration data embedded in it
as shown below. Save the JSON config data in the response to a file called cloud.json.
<g1:reply xmlns:g1="urn:epcglobal:rm:xsd:1"
xmlns:g2="urn:epcglobal:xsd:1"
g2:creationDate="2010-02-10T10:10:10Z"
g2:schemaVersion="1">
<g1:id>99</g1:id>
<g1:resultCode>0</g1:resultCode>
<g3:readerDevice xmlns:g3="urn:motorfid:rm:xsd:1">
(continued on next page)