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.
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.
What you’ll need
- 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
- The Arduino IDE
- A computer with USB ports and an internet connection
- Your Twilio account
- Your editor, terminal, and language of choice for calling the Super SIM API
Assembling your hardware
- 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.
- Attach the antenna and battery to the MKR1400.
Setting up your firmware
- Download the Arduino IDE
- Go to
Tools > Boards Managerand search for the Arduino SAMD boards. Click install and wait for the installation to finish.
- Go to
Sketch > Libraries > Manage Libraries...Search for and install the MKRGSM library by Arduino.
- Restart the Arduino IDE.
- Go to
File > Examples > GSM > ReceiveSMS. This will load the example from the MKRGSM library for receiving SMS.
- Connect the MKR1400 to your computer using the USB-to-Micro-USB cable and select the correct board from
Tools > Board
- Select the correct port from the Arduino IDE using
Tools > Port
- 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.
- 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.
- Find your SIM’s SID. It can be found in your console, or queried via the API.
- 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
- 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:
- Go to Internet of Things > Super SIM > SIMs.
- 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:
- Learn how to test Super SIM with the Adafruit FONA
- Read the announcement blog
- Attend the Super SIM webinar on June 30th
- Subscribe to the Twilio Change Log for new feature notifications
- Check out the pricing and order SIMs to try
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)