Part 1: Connecting BG95-M3 to T-Mobile’s or Twilio's Data-Only LTE Network

The Evolving Landscape of IoT Connectivity: Connecting BG95-M3 to T-Mobile’s or Twilio’s Data-Only Network
The Internet of Things (IoT) has been a game-changer, promising billions of connected devices transforming industries from healthcare to logistics. Predictions from major reporting agencies like Gartner once pointed to a future of 30 billion connected devices by 2025, a figure that helped fuel much of the excitement. However, as of 2024, we’ve just crossed 17 billion connected devices, leaving a considerable gap of 13 billion devices that need to come online in the next year to hit that target.
Why the Lag?
One major reason for this shortfall has been the cost of connectivity. In the early days of IoT, traditional networks like LTE, 3G, and 4G were prohibitively expensive for deploying large numbers of devices, especially in industrial and consumer-grade applications that required low-cost solutions. Expensive data plans made it difficult for IoT devices to “pop up everywhere” as initially predicted.
However, things are changing quickly. Today, we are witnessing the rise of low-cost LTE Cat-M1 and NB-IoT connectivity, along with flexible data plans from providers like Eseye, Twilio, and even T-Mobile. These solutions are starting to align with the original vision of IoT by offering cost-effective and scalable connectivity models.
Choosing the Right Connectivity for IoT Devices
When it comes to choosing the right connectivity provider for IoT devices, there is no one-size-fits-all solution. Different business models call for different plans:
- Eseye and Twilio offer pay-per-use models, which are ideal for devices that only need intermittent data usage. For example, if your device only connects occasionally (say, for periodic sensor readings), you’ll only pay for the data you use, making it a cost-efficient option.
- On the other hand, if your devices require a lot of data, like in video surveillance or data-heavy industrial applications, providers like T-Mobile offer more structured data plans, such as their 30GB data-only plan, which could provide a better value for heavy data users. The fixed pricing allows for predictable costs in scenarios where data usage might be high and continuous.
Connecting IoT Devices to T-Mobile or Twilio with the BG95-M3 Module
In this article, I’ll walk through how to connect the BG95-M3 Zero module, a popular LTE Cat-M1/NB-IoT module, to T-Mobile’s data-only network. The BG95-M3 is particularly well-suited for IoT applications, thanks to its low-power consumption, wide network compatibility, and support for multiple IoT standards.
Step-by-Step Guide
- Insert the T-Mobile or Twilio SIM Card
Begin by inserting a T-Mobile data-only SIM card into the BG95-M3 module. - Establish a Serial Connection
Use a terminal interface such as Putty or minicom to establish communication with the BG95-M3 module through a UART or USB interface. Once connected, send basic AT commands to check module status, signal strength, and network registration. - Please note: If you are new to AT commands, the terminal will be blank when starting serial communication. Type AT, and the terminal will respond with OK.
- Also just use the command part in the terminal which is AT+<command> for example AT+CPIN? is a command and +CPIN: READY is the response along with OK
# Check SIM cardstatus
AT+CPIN?
+CPIN: READY
OK
5. Don’t panic this is the response I got, as the device is not yet registered on the network, I’ll run these in the end again
# Check signal strength
AT+CSQ
ERROR
# Check network registration status
AT+CREG?
+CREG: 0,3
OK
6. Set T-Mobile OR Twilio APN (Access Point Name)
Configure the APN to ensure your device uses T-Mobile’s IoT network. The APN for T-Mobile’s IoT plans is generally iot.t-mobile.com
and APN for Twillio is super
. Use one of them based on your SIM. You can set this with the following AT commands:
Command : AT+CGDCONT=1,"IP","iot.t-mobile.com"
Response: OK
Command : AT+CGDCONT=1,"IP","super"
Response: OK
7. Configure Network Mode
Depending on whether you plan to use LTE Cat-M1 or NB-IoT, you’ll need to configure the module accordingly. I am using LTE so instructions are for that:
8. For LTE Cat-M1 mode:
AT+QCFG="nwscanmode",3,1
OK
AT+QCFG="iotopmode",0,1
OK
9. Attach to the Network
Use the following command to attach the BG95-M3 to the network:
AT+CGATT=1
OK
10. Activate Data Context
Activate the PDP context to enable data communication:
AT+QIACT=1
OK
11. Check IP Address
To verify if your device has obtained an IP address from the network, use:
AT+QIACT?
+QIACT: 1,1,1,"199.199.199.199"
OK
12. Test the Connectivity
Finally, test your connectivity by pinging a server (such as Google’s DNS):
AT+QPING=1,"8.8.8.8"
OK
+QPING: 0,"8.8.8.8",32,329,255
+QPING: 0,"8.8.8.8",32,53,255
+QPING: 0,"8.8.8.8",32,78,255
+QPING: 0,"8.8.8.8",32,86,255
+QPING: 0,4,4,0,53,329,136
If everything is set up correctly, your BG95-M3 module should now be connected to T-Mobile’s data-only network.
Ran the CSQ and CREG commands again and now as it is registered its working without errors
AT+CSQ
+CSQ: 18,99
OK
AT+CREG?
+CREG: 0,3
OK
One more thing:
Once you reboot the machine you have to run AT+QIACT=1 again to connect to the network. Then when you run AT+QIACT? you’ll get the IP address.
Conclusion
The path to 30 billion IoT devices by 2025 may seem ambitious, but with the rapid decline in connectivity costs and flexible data plans from providers like T-Mobile, Eseye, and Twilio, we’re inching closer to that reality. As illustrated by the BG95-M3 module, connecting IoT devices is becoming more accessible and scalable than ever before. Whether you’re choosing a pay-per-use model for light usage or opting for a fixed data plan for high-traffic devices, the options today provide the flexibility needed to drive the IoT revolution forward.
What’s next?
Next article I’ll talk about how to connect this to a Twillio super sim and then the series will continue to build applications using this awesome and economical connectivity.