VS - Virtual SIM Management
Manages the virtual SIM (vSIM) profile on the modem. Allows downloading, enabling, disabling, and deleting vSIM profiles, switching between virtual and physical SIM, and configuring APN and backup switching time independently. When a profile is installed with a backup time configured, the device automatically switches between virtual and physical SIM if connectivity is lost for the specified duration.
Qualifiers
Q: query (>QVSP<,>QVSS<,>QVSA<,>QVST<)S: set/action (>SVSP...<,>SVSS...<,>SVSA...<,>SVST...<)R: response (>RVSP...<,>RVSS...<,>RVSA...<,>RVST...<)
Commands
Profile Management
Download Profile
>SVSPx,[apn],[time]<
Downloads a vSIM profile for the specified APN. A profile must be deleted before a new one can be installed.
| Parameter | Description |
|---|---|
x | 1 = download and enable vSIM after download; 0 = download only (physical SIM stays active) |
apn | APN for the vSIM profile (max 64 characters) |
time | Backup switch time in seconds (minimum 5400 = 90 minutes) |
Delete Profile
>SVSPU<
Deletes the installed vSIM profile and resets all vSIM configuration. If vSIM is currently active, the device switches back to the physical SIM first and restarts the modem.
Query Profile Status
>QVSP<
Returns the current vSIM profile status.
| Response | Meaning |
|---|---|
>RVSPU< | No profile installed |
>RVSP0,[apn],[time]< | Profile installed, vSIM not active (physical SIM in use) |
>RVSP1,[apn],[time]< | Profile installed, vSIM active |
SIM Selection
Switch SIM
>SVSSx<
Switches between vSIM and physical SIM. The modem restarts automatically.
| Parameter | Description |
|---|---|
x | 1 = switch to vSIM; 0 = switch to physical SIM |
Returns an error if switching to vSIM (>SVSS1<) and no profile is installed.
Query SIM Selection
>QVSS<
Returns the currently active SIM.
| Response | Meaning |
|---|---|
>RVSS1< | vSIM active |
>RVSS0< | Physical SIM active |
APN Configuration
Set APN
>SVSA[apn]<
Updates the vSIM APN. A profile must be downloaded before the APN can be changed.
| Parameter | Description |
|---|---|
apn | New APN string (max 64 characters) |
Query APN
>QVSA<
Returns the configured vSIM APN.
| Response | Meaning |
|---|---|
>RVSA[apn]< | Current APN (empty if none set) |
Switching Time Configuration
Set Switching Time
>SVST[time]<
Sets the backup switching time.
| Parameter | Description |
|---|---|
time | Switching time in seconds (minimum 5400 = 90 minutes) |
Query Switching Time
>QVST<
Returns the configured backup switching time.
| Response | Meaning |
|---|---|
>RVST[time]< | Current switching time in seconds |
Examples
Download a vSIM Profile and Switch to vSIM
To download the vSIM profile, activate it immediately, use dct.vsim.com as the APN, and set the backup switching time to 7200 seconds (2 hours):
>SVSP1,dct.vsim.com,7200<
The download is asynchronous. The result is reported through MQTT diagnostics.
Download a Profile Without Switching to vSIM
To download the profile while continuing to use the physical SIM:
>SVSP0,dct.vsim.com,7200<
Check the Profile and Active SIM
Query the installed profile and the currently active SIM:
>QVSP<
>QVSS<
Example responses for an installed and active vSIM profile are:
>RVSP1,dct.vsim.com,7200<
>RVSS1<
Switch Between vSIM and Physical SIM
Switch to the vSIM:
>SVSS1<
Switch back to the physical SIM:
>SVSS0<
The modem restarts after either switch. Switching to vSIM requires an installed profile.
Configure the APN and Backup Time Separately
The APN and backup switching time can also be updated independently after a profile has been installed:
>SVSAdct.vsim.com<
>SVST7200<
Expected responses are:
>RVSAdct.vsim.com<
>RVST7200<
Delete the vSIM Profile
Delete the installed profile before installing a different one:
>SVSPU<
Connectivity Backup Mechanism
When a vSIM profile is installed and a backup switch time is configured, the device monitors network connectivity and automatically switches between the virtual and physical SIM:
- The device tracks cumulative time without an active data connection.
- When the elapsed disconnected time reaches the configured backup time, the device toggles the active SIM:
- If vSIM is active → switches to physical SIM
- If physical SIM is active → switches to vSIM
- Each switch triggers a modem restart and publishes a diagnostic message.
- The disconnection counter resets after each switch, giving the new SIM a full backup-time window to establish connectivity.
- The disconnection counter persists across device reboots.
Example
With a backup time of 7200 seconds (2 hours):
- Device boots with vSIM active, no data connection available
- After 2 hours without connectivity → switches to physical SIM, modem restarts
- If physical SIM also fails to connect after another hour → switches back to vSIM
Constraints
- A profile must be deleted (
>SVSPU<) before a new one can be installed. - Switching to vSIM (
>SVSS1<) requires a profile to be installed. - APN can only be changed (
>SVSA...<) after a profile has been downloaded. - Backup switch time minimum is 5400 seconds (90 minutes).
- APN maximum length is 64 characters.
- The download process is asynchronous; the result is reported via MQTT diagnostics.
Error Codes
| Code | Meaning |
|---|---|
| 0 | Operation successful |
| 3 | Incorrect parameter (invalid APN, time too low, format error) |
| 5 | Operation not allowed (profile already installed, or no profile for enable/APN change) |
| 6 | Exceeded length (APN too long) |
| 78 | Operation failed (AT command error) |
| 79 | Already in progress (OTA download running) |
Note: This feature is available in Antares 4.0.22 and later.