Getting Started with Super SIM and the Arduino MKR GSM 1400

June 03, 2020
Written by

super sim arduino mkr gsm 1400

Today, Twilio released Super SIM into public beta. Super SIM works all over the world and gives developers the ability to choose the networks that their Super SIMs use and monitor the data coming in from each SIM. You can order your own Super SIM through the Twilio Console and try it out.

Super SIM is versatile and works with CAT-M1, LTE, and 2G/3G networks. I tested Super SIM with a few boards I had lying around the house, including the Arduino MKR GSM 1400.

Arduino MKR GSM 1400 pinout diagram with labels
Arduino MKR GSM 1400

The MKR GSM 1400 is an SAMD-based board from Arduino that uses the uBlox SARA-U201. It can be programmed using the Arduino IDE. Here’s how you use it with Super SIM and test that it is online with a Machine-to-Machine (M2M) command sent from the Super SIM API.

This guide requires a configured Super SIM. If you haven’t set up your Super SIM in the Twilio IoT Console, please do so now. This guide will show you how.

Your materials
  • Your Twilio account. If you sign up for a new account through this link, you’ll get an extra $10 in credit when you upgrade.
  • 1x Twilio Super SIM (Activated using this tutorial)
  • 1x Arduino MKR1400
  • 1x GSM Antenna
  • 1x 3.7V LiPo Battery
  • 1x USB-to-Micro-USB cable

Firmware

Software

  • Your Twilio account
  • Your editor, terminal, and language of choice for calling the Super SIM API

Assembling your hardware

Super SIM and MKR GSM 1400
  1. Remove the Twilio Super SIM from its card. Use the 3FF Micro SIM size (middle size). Put the SIM into the card slot on the bottom of the MKR1400.
  2. Attach the antenna and battery to the MKR1400.

Setting up your firmware

  1. Download the Arduino IDE
  2. Go to Tools > Boards Manager and search for the Arduino SAMD boards. Click install and wait for the installation to finish.
  3. Go to Sketch > Libraries > Manage Libraries… Search for and install the MKRGSM library by Arduino.
  4. Restart the Arduino IDE.
  5. Go to File > Examples > GSM > ReceiveSMS. This will load the example from the MKRGSM library for receiving SMS.
  6. Connect the MKR1400 to your computer using the USB-to-Micro-USB cable and select the correct board from Tools > Board
  7. Select the correct port from the Arduino IDE using Tools > Port
  8. Compile and upload the sketch. If you are having trouble uploading, try tapping the RESET button on your board twice to set it to “bootloader” mode.
  9. Open the Arduino serial monitor using Tools > Serial Monitor. Set the baud rate to 9600. The serial monitor should print “GSM Initialized” and “Waiting for messages”.

Sending an SMS Command to your device

Super SIM supports a simple API for sending SMS messages to IoT devices, without the need for regional phone numbers or anything like that. We call these messages Commands to avoid confusion with Twilio’s other products.

  1. Find your SIM’s SID. It can be found in your console, or queried via the API.
  2. Either by setting up your own server or by using Twilio Functions, send an SMS Command to your device using the Command resource of the Super SIM API
  3. When you send the command, you should see the results on your serial monitor. Congratulations, you have just sent an SMS Command from the internet to your device!

Checking your Super SIM usage

When you send commands to your Super SIM, it takes up data. Luckily, you can monitor your data usage through the Twilio console. Here’s how:

  1. Go to Internet of Things > Super SIM > SIMs.
  2. Click on the unique name or SID of the Super SIM fitted to the device and then on the Usage tab to view the Super SIM’s activity and thus that of the device it’s fitted into.

Making more stuff

Keep on building! Try setting up your device for scalable MQTT commands or HTTP requests. Check out these resources to start exploring Super SIM:

Christine Sunu is the Internet of Things Developer Community Engagement Manager at Twilio. She's currently working on IoT, ambient computing, and robots that pretend to be alive. Find Christine on Twitter (@christinesunu) or Github (cmsunu28)