メニュー

Expand
ページを評価:

Programmable Wireless: How to Set a Device’s APN

To configure your wireless IoT device to use a Programmable Wireless SIM or Narrowband SIM requires only a few small configuration settings. You will need to configure the device into which you have fitted your SIM with the identity of the server through which it will transfer data. This is the SIM’s configured Access Point Name (APN).

The APN for the Programmable Wireless SIM is

wireless.twilio.com

No authentication is required for this APN — please leave any username and password entries blank.

The APN for the Narrowband SIM, provided in partnership with T-Mobile USA, is:

iot.nb

No authentication is required for this APN — please leave any username and password entries blank.

The Narrowband IoT SIM will not connect outside of the US.

If you know how to configure the APN on your device, go ahead and make the change now. If not, here are some guides to help you:

That’s generally all you need to do to configure your device, but depending on the device you are using, you may also need to enter TCP and UDP network timer settings.

How do I set the APN with AT Commands?

Refer to your device’s user manual to learn how to use AT commands then issue the following command to your device’s cellular modem:

Broadband IoT

AT+CGDCONT=1,"IP","wireless.twilio.com"

Narrowband IoT (NB-IoT)

AT+CGDCONT=1,"IP","iot.nb"

Setting the APN with AT commands via SMS

If you’re using a device that allows sending AT commands via SMS, you can use our Commands API resource to send a machine-to-machine SMS to the SIM. You can use a command line tool such as curl or the Twilio CLI to transmit an API request which contains the AT command shown above.

Many devices do not support setting the APN via SMS. Refer to your device’s user manual to see if this action is permitted and how to format the message.

How do I set the APN on my iOS device?

The iOS UI changes in subtle ways with almost every release, so you may find the following guidance, for iOS 15, doesn’t entirely match the UI on your device. However, it should help you find the setting you need.

  • If your phone’s language setting is English (US/Canada), then go to Settings > Cellular > Cellular Data Network.
  • If your phone’s language setting is English (UK), then go to Settings > Mobile Data > Mobile Data Network.
  • For other languages, use the appropriate menu path.
  • Tap APN and enter wireless.twilio.com under Cellular or Mobile Data, and LTE.
  • Leave the Username and Password fields blank.

You can find more information on setting the APN on an iPhone or iPad on this Apple support page.

How do I set the APN on my Android device?

Depending on which version of the Android OS is running on your phone, you set the APN by doing the following:

  1. Go to Settings > More networks > Mobile networks > Access point names.
  2. Tap the menu or + icon to edit an access point.
  3. Enter wireless.twilio.com under APN.
  4. Tap your new Twilio APN to set it as your active APN.

Verify you’re connected to the network

You will know your APN is correctly set if you can send and receive data. Open your favorite web browser and navigate to www.twilio.com/wireless. You’re all set if you can load the web page. If the page doesn’t load, review the instructions above for setting the APN.

For more information about using the Programmable Wireless API’s Command resource, please see the API documentation.

TCP and UDP network timers

When configuring your device, you may be asked to enter any or all of the following timeout settings. Please use the recommended values.

Timer Name Recommended Value
概要
Firewall TCP Timer 1800 seconds For mobile-originated communications, this is the amount of time before the network firewalls terminate Transmission Control Protocol (TCP) connections due to inactivity.
Firewall UDP Timer 30 秒 For mobile-originated communications, this is the amount of time before network firewalls terminate User Datagram Protocol (UDP) connections due to inactivity.
Firewall ICMP Timer 10 seconds This is the amount of time before network firewalls terminate Internet Control Message Protocol (ICMP) due to inactivity.
NAT TCP Timer 300 seconds This is the amount of time before the Network Address Translation (NAT) router releases the address translation for TCP packets due to inactivity.
NAT UDP Timer 60 seconds The amount of time before the NAT router releases the address translation for UDP packets due to inactivity.

The Twilio Commands phone number

Machine-to-machine SMS Commands sent from Twilio to your SIM will arrive from the reserved phone number 2936.

Commands sent from your SIM to Twilio must be sent to the same number.

ページを評価:

ヘルプが必要ですか?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

フィードバックくださりありがとうございます!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

ステップ1

Get link

Get a free personal referral link here

ステップ2:

Give $10

Your user signs up and upgrade using link

ステップ3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more