M2MXML TM Version 1.0.1 SpecificationTable of Contents
1. About This DocumentRevision HistoryReleases of this document will be versioned using the following scheme: major.minor.revision with the following definitions: major: A large change to the protocol, possibly breaking backwards compatibility. minor: A small change to the protocol, preserving backward compatibility. revision: Changes made to the document only, no changes to the actual protocol.
This document has the following release history:
2. M2MXML TM Protocol OverviewThe M2MXML TM protocol is an XML based messaging protocol designed for Machine-To-Machine (M2M) communications. Messages are represented as small XML documents using the UTF-8 encoding of the unicode character set. This is a strict superset of ASCII, and in general, M2MXML messages are pure ASCII. For the purposes of this protocol, the world is modeled as containing telemetry devices and transducers. Devices themselves are uniquely identified by a unique alphanumeric identifier, the suggested form for this identifer is a 128-bit UUID represented by 32 hexadecimal characters. A device may have one or more transducers (sensors or actuators) that are identified with an alphanumeric address that is unique within the device. Transducer addresses are arbitrary strings with a maximum length of 128 characters and may contain any valid unicode characters. However, single quotes, double quotes, and less than symbols nees to be escaped as "'" , """ and "<" respectively. Messages may contain an optional address attribute. If specified; this indicates that the message is intended to apply to a transducer. If not specified, the message applies to the telemetry device. Messages may also contain a sequence number attribute that can be used to match queries to responses. These sequence numbers should be reasonably unique and are required in a response if they are present in the request or query. The following table lists the valid XML elements and associated attributes.
3. Element Details3.1 Root ElementThe root element is the <M2MXML> element. This message contains a 'td' attribute which is the unique identifier of the telemetry device sending the message. The 'td' attribute is frequently optional for messages being sent to the server from a device. This is the case when the communications medium already uniquely identifies the sender of data. For example, If an SMS message is sent by a device, the MIN of the device is included in the SMS overhead and will uniquely identify the device to the server, allowing it to add the 'td' attribute to the message upon arrival. Also, this attribute will frequently not be present in a message sent to a device since point to point modes of communication are generally used and a device only receives messages intended for it.This element also contains a version attribute. This is the version of M2MXML in use or the for major.minor, "1.0" for example.
3.2 ResponsesCommands normally result in one or more responses from the destination entity and/or routing entities. The responses must each contain a response code from the table below, and may optionally contain a text message that may be very specific to the device and condition.
3.3 CommandsThe following table is a list of predefined command names. Devices can implement additional commands, but may not overload these names. Commands may have any number of arguments which are sent as nested Property elements.
3.4 Percept TypesData from a sensor or related to an actuator are reported as percepts. Data from a percept can have one of the data types described in the table below. The format of the value attribute depends on the percept type and is also described in the table.
3.5 Percept Entry TypesPercepts also specify an attribute related to the type of entry, generally what triggered the percept to be reported. Entry types are specified in the following table.
3.6 TimeStamp FormatThe format for timestamps is YYYYMMDDhhmmss where seconds are optional. The time zone should always be UTC.3.7 Exception CodesExceptions reference an exception code that is defined according to the following table.
3.8 Sequence Number formatSequence numbers are positive decimal integers ranging from 0 to 65,535.4. Examples4.1 Basic percept, scheduled report, originating telemetry device specified explicitly<M2MXML ver="1.0" td="A3EAB3000C4F4323BED38BD659878DAB"> 4.2 Percept RequestRequest<M2MXML ver="1.0"> Response: <M2MXML ver="1.0"> 4.3 Location Percept<M2MXML ver="1.0"> 4.4 Configuration Request and ResponseRequest:<M2MXML ver="1.0">
Response: <M2MXML ver="1.0"> 4.5 Configuration Request and Response, multiple parametersRequest:<M2MXML ver="1.0">
Response: <M2MXML ver="1.0"> 4.6 Actuator turn on commandRequest:<M2MXML ver="1.0"> Response: <M2MXML ver="1.0"> 4.7 Actuator pulse on commandRequest:<M2MXML ver="1.0"> Response: <M2MXML ver="1.0"> 4.8 Device Reboot commandRequest:<M2MXML ver="1.0"> Response: <M2MXML ver="1.0"> 4.9 Configuration Query for actuator propertiesRequest:<M2MXML ver="1.0">
Response: <M2MXML ver="1.0"> |