Multi-Hackers


Multi-Tech's All Star Hacking Team!

ATT Developer Summit Hackathon

MultiTech mDot

The MultiConnect® mDot™ offers significantly longer range and improved radio performance compared to traditional wireless solutions—resulting in greater transmission range and reduced capital expense. By leveraging LoRa™ technology, mDot simplifies local connectivity for Internet of Things (IoT) applications for the North American and European markets. By eliminating common deployment complexities, remote device connectivity is now simple and easy to deploy. With support for multiple interfaces, just about any thing can now be connected with MultiTech’s mDot technology.MultiTech mDot

Each mDot will be assigned a unique 1-byte identifier, the Conduit Gateway will prepend this id onto stream-names of data sent to the M2X cloud. An alias can be assigned, then the Gateway will prepend that value instead. The alias must be unique between all mDots and teams.

The baud rate for the serial link to the mDot in slave mode is 9600.

AT Commands

  • RESET - Reset the mDot CPU
  • ATSEND <string> - Send the provided string data to the radio
  • ATRECV - Show the last 10 received packets

Conduit M2X Commands

The Conduit Gateways provide a link to the AT&T's M2X cloud through the following commands. Using ATSEND we can send stream data to the Cloud, configure M2X account info for an mDot, or subscribe to a trigger.

  • Set feed-id - attach a M2X blueprint feed-id/device-id to the mDot-id to send stream data to
    • Both feed-id and m2x-key must be set, otherwise data will be sent to default M2X account
    • ATSEND feed-id:[new feed-id]
    • ex. ATSEND feed-id:fd7ddad4853749f2b4a86d5b70a6af0d
  • Set m2x-key - attach an M2X blueprint api key to the mDot-id to send stream data to
    • Both feed-id and m2x-key must be set, otherwise data will be sent to the default M2X account
    • ATSEND m2x-key:[new m2x-key]
    • ex. ATSEND m2x-key:39ddc135fa09721edd9aa8f141b2a9c0
  • Set alias for mDot
    • The mDot alias will be prepended to stream names instead of the preconfigiured mDot id.
    • An alias must be more than two characters.
    • Alias can only contain letters, numbers, undescores, and dashes — no spaces or special characters are allowed.
    • ATSEND alias:[new alias]
    • ex. ATSEND alias:first_floor_mdot
  • Remove a setting
    • The associated feed-id, m2x-key, or alias can be removed by sending the command with delete as the value
    • ex. ATSEND alias:delete
  • Display mDot config from server
    • ATSEND config:
    • mDot config should arrive in message queue
    • {"config":{"feed-id":"d236...","m2x-key":"848a...","alias":"outside"}}
  • Subscribe to a trigger stream
    • ATSEND subscribe:[stream name]
    • ex. ATSEND subscribe:2e-temperature
  • Unsubscribe from a trigger stream
    • ATSEND unsubscribe:[stream-name]
    • ex. ATSEND unsubscribe:2e-temperature
  • Display mDot subscriptions
    • ATSEND subs:
    • mDot subscriptions should arrive in message queue
    • {"subs":["2e-temperature", "outside-temp", ...]}
  • Update stream
    • Sends data to a specified stream on M2X
    • mDot-id or alias will be prepended to stream name
    • Sending numerical values will create the M2X stream in the cloud on the fly.
    • If you want to post non-numerical data the stream must first be created in the cloud, however triggers can only be used with numerical data.
    • ATSEND [stream-name]:[stream-data]
    • ex. ATSEND temp:72

M2X Triggers

The MultiTech Conduit Gateways can also send messages back down to the mDots. M2X triggers can be used to alert mDots that a stream value has reached a certain threshold.

See AT&T M2X trigger documentation

Configure the trigger to use the following callback url: http://54.174.33.191:3000/ This will forward the trigger message down to mDots that have subscribed to the trigger stream. Trigger messages can be retrieved with the ATRECV command.

The following JSON object is an example M2X trigger post:

{
    "stream":"e2-test_trigger",
    "condition":"<",
    "threshold":1.0,
    "value":0.9,
    "timestamp":"2014-12-08T15:54:41.187Z",
    "device_id":"fd7ddad4853749f2b4a86d5b70a6af0d",
    "trigger":"TEST2"
}

The JSON data will be compressed into the following format (device_id has been removed):

{
    "s":"e2-test_trigger",
    "c":"<",
    "t":1.0,
    "v":0.9,
    "time":"2014-12-08T15:54:41.187Z",
    "n":"TEST2"
}

The stream property will be used to as the stream-name to publish the message to.

To override the trigger stream-name use the callback url: http://54.174.33.191:3000/[trigger-stream-name] Be sure to provide a unique stream-name to avoid name collisions with other teams. Perhaps add your team name or some random value to the stream-name.

MultiTech M2X Account info

By default and in the case of invalid configuration, all mDot's will report to MultiTech's M2X account. The following id/key can be used to see if your mDot is reporting to our account.

Device ID: 0b21ef4ed65b89531266282394fbbb75

API Key: e20dc6e028e71c9e16169cd5bc4a53f1

Example:

  • Get list of streams

curl --insecure -H "X-M2X-KEY: e20dc6e028e71c9e16169cd5bc4a53f1" "https://api-m2x.att.com/v1/feeds/0b21ef4ed65b89531266282394fbbb75/streams"
  • Get one stream

curl --insecure -H "X-M2X-KEY: e20dc6e028e71c9e16169cd5bc4a53f1" "https://api-m2x.att.com/v1/feeds/0b21ef4ed65b89531266282394fbbb75/streams/[stream-name]"

Code Samples

[Repository '/teams/MultiTech/code/mDot_hackathon_slave_m2x_example/' not found]

[Repository '/teams/MultiTech/code/mdot-hackathon-library-example/' not found]

[Repository '/teams/MultiTech/code/mdot-hackathon-nucleo-example/' not found]

[Repository '/teams/MultiTech/code/MTS_LoRaMac/' not found]

Dev Boards

FRDM-K64F

FRDM-K64F

Use these pin names to configure Serial class

Serial mdot(D1, D0);

Nucleo F401RE

ST-Nucleo-F401RE

Use these pin names to configure Serial class

Serial mdot(PA_9, PA_10);

Wire the following pins to get serial communication to work with the XBee Sparkfun shield:

  • TX -> 8
  • RX -> 2

/media/uploads/jreiss/img_20141231_131547.jpg

Links

Platform

mDot Platform Page (mbed beta)

UDK/mDot Development

Quick Start Guide

Binaries

mDot AT Command Firmware

mDot AT Command Firwmare MD5

FAQ


All wikipages