How to connect to the AT&T M2X
service from a BeagleBone Black


Because BeagleBone Black normally runs a slightly modified version of Linux, you can use either the M2X Ruby client or the M2X Python client. However, in both cases, some initial BeagleBone specific setup work is needed.

NOTE: The following steps are tested on a BeagleBone Black board running the Angstorm Distribution of Linux. If you are using other boards, the following steps may be subject to modification. If you are installing Ubuntu or Debian on your BeagleBone Black board, it's likely that you can skip most of the setup work outlined below.

Getting Started

  1. 1 Obtain your Master Key from the Master Keys tab of your Account Settings screen.
  2. 2 Create your first Device and copy its Device ID.
  3. 3 Review the M2X API Documentation.

Common Setup

First, you'll need to update the Angstorm package repository:

$ opkg update

The CA certificates in the Angstorm Distribution have some known problems. You may encounter errors when using curl, git or other commands connecting to https resources. To fix this, you can install this package:

$ opkg install ca-certificates

To make sure curl works correctly, you can use this command:

$ export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

Notice you need to either type this command each time you connect to the board using ssh, or put this line in the ~./bashrc file.

Ruby Setup

To install Ruby, you can use the following command:

$ opkg install ruby

Notice opkg update is needed before running this command. The default version of Ruby installed here is 1.9.3p194, which is supported by the M2X Ruby client. To install a newer version, you will have to manually compile it from the source code.

To install the m2x gem, you can use the following command:

$ gem install m2x

Next, refer to the M2X Ruby client for detailed information.

Python Setup

To install Python, you can use the following command:

$ opkg install python-distutils
$ opkg install python-compile

Whether you want to use easy_install or pip, you need to install setuptools first. You can use the following command to install setuptools:

$ curl

If you are okay with easy_install, you can use the following command to install m2x package now:

$ easy_install m2x

However, if you love pip, there's one more package you need to install:

$ opkg install python-xmlrpc

And then you can install pip:

$ curl > 

Now you can install m2x using pip:

$ pip install m2x

After you are up and running, please refer to the M2X Python client for more information.