Yes, you can verify if packets are being successfully transmitted by checking your data usage and available network logs, or by capturing and inspecting network traffic using Soracom Peek or Soracom Junction.
Before capturing packets, check if Soracom has recorded data usage for your device. If Soracom has not recorded any data usage, there may be an issue with the local network operator, such as poor signal or a temporary local outage, which is preventing the IP packets from reaching Soracom. If usage is recorded but data isn't reaching your server, there may be an issue with your server's firewall or network routing.
Checking Network Logs and Data Usage
While direct carrier network logs are not exposed, Soracom provides several tools and logs to help you trace network connectivity and data sessions:
- Data Usage History: Soracom keeps track of the amount of uplink and downlink traffic in the SIM's data usage history. Because this refers to the cellular portion of the data connection, checking the data usage can help identify if an issue is occurring before or after the cellular connection. If a device creates a data session but no data is sent or received, it could indicate a device-side issue like poor signal.
- Session Details: When a device successfully establishes a data connection, Soracom updates the subscriber status to Online and records a data session log in the SIM's Session details.
-
Error Logs: You can check the Error Logs in the User Console for network registration issues. For example, errors like
unable to deliver short message: absent subscriber smindicate that the device has not registered to a network. - Napter Audit Logs: If you are using Soracom Napter, you can view connection logs directly from the Napter audit logs screen in the User Console, or by using the Soracom CLI and API.
Using Soracom Peek
You can use the Soracom Peek service to capture traffic as it passes through Soracom. This allows you to inspect the network traffic between cellular and IP networks to understand whether a problem occurred on the device, the cellular network, or your server.
Capturing packets helps identify if traffic is blocked due to firewall or routing settings, troubleshoot abnormal device behavior, debug your network architecture, identify the source of high data usage, and improve security by checking for packets sent to unrecognized servers.
Peek provides two methods for packet capture:
- SIM Packet Capture: Captures all IP traffic where the source or destination address matches your IoT SIM. You can initiate this directly from the SIM Management section of the User Console or via the POST /sims/{sim_id}/packet_capture_sessions API.
- VPG Packet Capture: Captures all IP traffic passing through a Virtual Private Gateway (VPG). This allows you to capture traffic coming from or going to multiple SIMs.
To capture packets, your device must be connected to a network and the subscriber status must appear as Online. If capturing in a VPG, the IoT SIM must belong to that VPG.
Using Soracom Junction
If your devices are connected to a VPG, you can use Soracom Junction for advanced packet handling. You can configure Junction to mirror packets or redirect packets to an AWS EC2 instance.
Once configured, you can connect to your EC2 instance via SSH and run tcpdump to view the incoming packets and verify that your traffic is routing correctly.
Advanced Troubleshooting with AT Commands
When troubleshooting cellular connectivity issues, interacting directly with the modem can help you understand how it is configured and verify its connection status to the carrier network. If you are able to directly access your modem's serial interface, you can use AT commands to check the connection:
-
AT+CGATT?- Checks whether the modem is attached to the packet domain. A value of1means the modem is attached. -
AT+CGACT?- Checks whether a PDP context is activated (1= activated). -
AT+CGPADDR=1- Displays the IP address assigned to the modem. If the modem has been assigned an IP address, the data connection is established and the device should be able to send and receive data.
While every modem has a serial interface, not every device provides a way to access it. If you are unsure whether your device allows direct access to the modem's serial interface, contact the device manufacturer.