# Cellular Gateway Dual-SIM Support

Each Verkada cellular gateway has two SIM slots with an automatic failover mechanism.

## How dual SIM functionality works

By default, the GC31 comes with 2 SIM slots:

* Slot 1 (Primary by default)
* Slot 2 (Secondary by default)

Every GC31 comes with a Verkada data SIM inserted in **Slot 2**. This SIM card is used for the optional [Verkada data plan](https://help.verkada.com/connectivity/cellular-data-options/verkada-data-plan).

Customers bringing their own data plan can insert their SIM card into **Slot 1,** which will act as the primary SIM, while keeping the Verkada SIM in **Slot 2**. In the event that the customer-provided SIM fails, the GC31 will fall back to the Verkada SIM, which helps ensure the gateway is always reachable.

Customers can also insert their own SIM cards in both slots, and choose which one is the primary. Regardless of configuration, the GC31 behaves according to the following state machine.

## SIM failover

The GC31 has a state machine that constantly monitors the SIM activity on the LTE modem, as follows:

![](https://1814166542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAGnzScvko5PkG7YBy3i%2Fuploads%2Fgit-blob-cc8dcfc01082ea53e58df2e26cfc290f8f5a8200%2F74da46b9c514e7bc393eaf12ca7b97f87767eee7.png?alt=media)

{% stepper %}
{% step %}

#### **Start**—The state machine is triggered when the device boots.

{% endstep %}

{% step %}

#### **Primary (monitor)**—The general purpose input/output (GPIO) pin on the LTE modem detects when a SIM has been inserted into the primary slot.

* The GC31 attempts to connect via the primary SIM and pings a backend server every few seconds.
* If a number of those pings fail consecutively, the state machine triggers the failover to the secondary.
  {% endstep %}

{% step %}

#### **Primary (fail)**—Trigger occurs if the primary SIM fails to ping the server multiple times. The device fails over to the secondary SIM.

{% endstep %}

{% step %}

#### **Auto retry** — The device will automatically switch to the primary SIM 15 minutes after losing connection. If that fails, it will retry after 30 minutes, then again after 1 hour. It will continue retrying hourly for 24 hours, then once every 24 hours until it reconnects.

{% endstep %}

{% step %}

#### **Manual retry** — Once the secondary SIM is active, the user needs to manually switch back to the primary SIM if they wish to connect through the primary.

{% endstep %}

{% step %}

#### **Secondary (fail)**—Trigger occurs if a secondary SIM fails to ping the server multiple times. The state machine reverts back to the Start phase.

{% endstep %}
{% endstepper %}

{% hint style="success" %}
**Need more help?** Contact [Verkada Support](https://app.gitbook.com/s/NRq5qDDjsYNxwNzF1bcB/need-help/contact-verkada-support).
{% endhint %}
