A Look at AT&T’s M2X Service for IoT

Article by Adam Scott
3 minutes 50 seconds read

Last week I joined around 200 students, tech professionals and members of the general public interested in the “Internet of Things”. Although Tech Square’s Garage has been open for just two weeks, this crowd doesn’t have a problem treating it as a second home. We settled in for a 3-hour lecture ranging from Texas Instruments Hardware to AT&T-driven IoT infrastructure. 

IoT can be useful for things such as tracking consumers through a brick-and-mortar store or for easing their daily lives through automation. IoT is quickly becoming more than a buzzword and soon with be found throughout every aspect of our lives.  

AT&T’s system starts with their M2X service which stands for “Machine-to-Machine”. The X represents a variety of services provided via AT&T and more generally on the web. So in a sense, M2X allows your machine to speak to AT&T.

Communicating with AT&T M2X.

A variety of API’s are available on the AT&T M2X Github account (https://github.com/attm2x) which can be used to communicate with the service using Java, NodeJS, C, JavaScript, Ruby, Android, iOS, Python, PHP, .NET, and the list goes on. Of course most hardware companies will be looking at using C or JavaScript and the hobbyist may opt for the Arduino library. And of course web developers have the gambit to choose from in this case – far too many to mention here.

 M2X Dashboard
M2X Dashboard

Once you have setup your device correctly, use the generate key to open a line of communication. In M2X you can track more than one property per device. Using AT&T designated streams, you can listen for multiple variables from a single device: pressure, speed, and light intensity for example. If listening for 3 variables, 3 streams are needed to track them simultaneously.

Now let’s say I have thousands of devices to contend with. Once you have a single device configured you are able to create what AT&T calls a distribution. This allows you to duplicate the properties you defined for one device across many devices by assigning each of them a unique serial number. Because this is a “Pro” feature I didn’t get to play with it. Devices can be grouped further by collections so that a specific hierarchy of device groupings can be targeted – for example, by physical area (building, room or floor).  

Automating an action.

Getting M2X to react to what it is being fed to it from your IoT devices is done by setting up triggers. Using one or more streams you can react to the values coming from your devices based on a defined boundary value (i.e. less than, greater, equal or not equal to). This “triggers” a POST to an endpoint on the web with a JSON object payload. AT&T hosts a service for the purpose named Flow.

And this is when the demonstration took a turn for the worse. Apparently AT&T Flow didn’t enjoy two hundred users spinning up a new account practically simultaneously. When the speaker explained how the service utilizes Docker (something we at Launch are intimately aware of) to generate a container for each individual account – I immediately realized this was not going to end well. Sure enough half the room including the instructor was plagued with timeout errors, logins being reset, and general instability while using the tool. That being said, the tool was quite easy to use when it worked.


AT&T Flow’s frontend is a hosted fork of an open source project called NodeRED (http://nodered.org/) with custom nodes built for AT&T Services. If you compose these nodes into a flow chart that begins with the trigger from your device, transforms and then combines with functions and other data sources; the results may output into a database, e-mail, IRC, push notifications, SMS messages, or into another the device. These mobile messaging services are highly tied to AT&T’s APIs including Blackflag, Smart City, and Jasper. Once published it provides you the endpoint that M2X requires for completion.

 Using Nodes to create a flow.
Using Nodes to create a flow.

Parting thoughts.

AT&T has definitely built a complete solution. Their tooling is definitely in its infancy, but so is much of the markets. I suspect that Amazon’s AWS IoT (https://aws.amazon.com/iot/) scales a bit smoother given their hosting infrastructure. However, I do think AT&T definitely has a place in the market for early adopters and the product is quite user friendly.