Getting Started with Super SIM and the Adafruit Feather FONA 32u4
Time to read: 3 minutes
Today, Twilio released Super SIM to public beta. Super SIM works all over the world and gives developers the ability to choose the networks that their devices connect to and monitor the data consumed by 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 Adafruit Feather FONA 32u4.
The Adafruit Feather FONA 32u4 is a cellular board from Adafruit based on the Feather ecosystem that uses the Simcom SIM800H modem. (You may remember it from this tutorial on building a mailbox notifier.) It can be programmed with 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.
What you’ll need
Hardware
- 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 Adafruit Feather FONA 32u4
- 1x Antenna
- 1x 3.7V LiPo Battery
- 1x USB-to-Micro-USB cable
Firmware
- The Arduino IDE
- A computer with USB ports and an internet connection
Software
- 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 FONA.
- Attach the antenna and battery to the FONA
Setting up your firmware
- Download the Arduino IDE
- Follow Adafruit’s instructions for setting up the Adafruit Feather FONA with the Arduino IDE
- Load the FONA Test sketch using Adafruit’s instructions
- Find the part of the sketch that talks about APNs. It should look like this:
Underneath this commented-out area, add the following:
This line lets the FONA know to use the Twilio Super SIM APN.
- Connect the Adafruit Feather FONA 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
- Open the Arduino serial monitor using
Tools > Serial Monitor
. Set the baud rate to115200
. The FONA should boot and connect. Play with the menu. You can typei
to see your signal strength, orC
to read your SIM’s CCID. - (Optional) Read and delete existing SMS messages by typing
r
to read andd
to delete. Type capitalR
to read all 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.
- Go to your Arduino serial monitor.
- After you send the Command, go to the serial monitor and type
R
to read all texts. You should have a new text from shortcode000
containing the name of your command. 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
- Find your Super SIM. They are listed by SID and nickname. Once you click on your SIM, you can select the Usage tab to view that SIM’s activity
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 Arduino MKR GSM 1400
- 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)
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.