By definition, connected devices need connectivity, and currently the mobile data network provides the broadest reach. Connected vehicles, logistics solutions, and security systems rely on 2G, 3G and 4G Internet access via embedded wireless modules, allowing them to reach cloud services from anywhere with cell coverage.

Jasper, in the news recently as Cisco announced its intent to acquire the company, created its Control Center platform to manage IoT devices on the mobile network. They partner with mobile network operators to deliver services tailored to the requirements of companies in any industry bringing connected products to market. The Control Center (CC) API gives applications access to the platform via the SOAP protocol, while a Push API notifies applications of events such as a device coming online, data consumption crossing a threshold, devices connecting more or less often than expected, and even the SIM card connecting from a different device than expected.

Force.com Toolkit for Jasper

The Force.com Toolkit for Jasper enables Force.com applications to call all of the functions of the CC API. Now, from Salesforce, you can:

  • Activate or deactivate network access for devices
  • Send and receive SMS to and from devices
  • Retrieve session data to diagnose issues

The toolkit also includes an endpoint to receive Control Center Push API notifications, by default creating a custom object record for each event. It’s straightforward to then define a process to, for example, create a Case when a device is close to its data limit.

This first iteration of the toolkit includes an example custom object, representing a device, and a corresponding Visualforce page. The custom object holds the unique SIM identifier or, more properly ‘integrated circuit card identifier’ (ICCID), for the device. When the page loads, its Apex controller extension calls a Jasper API to get details such as the device’s IMEI, IMSI and MSISDN, its SIM activation status etc, and retrieves recent SMS messages to and from the device. A related list of SIM State Changes is also shown.

The DeviceExtension Apex class shows how to use the toolkit to interact with CC. Here’s how we create an API client, and then retrieve device details and SMS messages:

As well as retrieving device details, you can modify SIM activation status via the dropdown list on the page. Again, the Apex controller extension shows you how it’s done:

SMS can be used to send messages to devices on the mobile data network. This is a very convenient channel for provisioning settings, sending control messages etc. The sample device page allows you to send an SMS to the device. Here’s the code – it’s very straightforward:

In this video, I’m using the toolkit with a prototype connected device built from an Arduino Uno, Seeed Studio GPRS Arduino Shield and Grove Shield. The Grove Shield has a temperature sensor and LED attached, giving the device some input and output capability. The Arduino connects to the mobile data network via the GPRS shield, and logs temperature readings to Force.com via Liquid, a demo Heroku app.

The Force.com Toolkit for Jasper allows you to integrate the Force.com platform with mobile devices connected on the Jasper Control Center platform through any Jasper partner operator with minimum effort. If you’re looking for mobile data connectivity, and Jasper sounds like it fits the bill, you can get a trial Control Center account with test SIMs from any of Jasper’s partner operators, and grab the toolkit source code from GitHub.

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS