---
description: >-
  In this section you may learn how you may check if your Monogoto SIM card
  (Thing) is connected to a network using ping.
---

# Checking Thing Connection via Ping

You may test SIM card connection to a network and even if SIM card has opened data session using Ping.

There are 2 main ways to Ping Thing:

### Ping Thing IP address via self-service console:

1\.       Login to the Monogoto porta&#x6C;_**.**_

2\.       Go to **Things** section of the porta&#x6C;_**.**_

![](https://3922449203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0mPxGpottOEfcucXOR%2Fuploads%2F9oGvGBkKWZWoG314BEHy%2F1.PNG?alt=media\&token=d482c8e1-f54c-40ac-8aa3-0e249e2628c0)

3\.       Select a Thing from the list of seen Things in the porta&#x6C;_**.**_

![](https://3922449203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0mPxGpottOEfcucXOR%2Fuploads%2Fu8RrDFdeKcVo1WGSGesA%2F2.PNG?alt=media\&token=de1e52c8-616c-4e1b-ae15-592ce793c5fc)

4\.       Use scroll bar, to scroll down to **IPs** section showing networks and their APNs.

![](https://3922449203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0mPxGpottOEfcucXOR%2Fuploads%2FRIJ6ZWW8MXkXgjWkXVIE%2F3.PNG?alt=media\&token=1af91664-41fd-4411-ba3e-cd00d63f5d3b)

5\.       In **IPs** section, please find a Network line showing an IP address and then press on **Ping** button in the same line.

![](https://3922449203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0mPxGpottOEfcucXOR%2Fuploads%2FTWQKdKFsKUgpuSlfC9XJ%2F4.PNG?alt=media\&token=16df5000-49d0-49c2-b7e0-33d8fe4ca1e9)

{% hint style="warning" %}
Please note that if in **IPs** section there are no networks showing an IP address, that means the SIM card has not opened a data session recently, thus Thing will not be possible to ping. Make sure that the used device is working correctly and that a correct APN is used inside device settings.
{% endhint %}

6\.       Inside a window that opens, please press on **Ping** button.

![](https://3922449203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0mPxGpottOEfcucXOR%2Fuploads%2FLceNd4Wf3VxEQijlPKxj%2F5.PNG?alt=media\&token=9222cf60-1846-4724-8d3c-8636cce98142)

7\.       Check out the ping results.

![](https://3922449203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0mPxGpottOEfcucXOR%2Fuploads%2FlhN7M6b9kZMBe0VaMDrl%2F6.PNG?alt=media\&token=da47e018-d44e-4a5d-8746-a70ee484641b)



### Ping Thing IP address via API command:

To get the Thing IP address, please use following request:

```
curl -X GET "https://console.monogoto.io/thing/ThingId_ICCID_<<<_THING_ICCID_>>>/" -H "accept: application/json" -H "Authorization: Bearer <<<_TOKEN_HERE_>>>"
```

{% hint style="info" %}
Please note that the above shown command needs to be replaced with information: \
&#xNAN;**<<<\_THING\_ICCID\_>>>** - replace with your Monogoto thing ICCID number\
&#xNAN;**<<<\_TOKEN\_HERE\_>>>** - replace with your token
{% endhint %}

Example of request to obtain Thing IP address:

```
curl -X GET "https://console.monogoto.io/thing/ThingId_ICCID_8912372646888991/" -H "accept: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1N2R5cCI6IkpXVCJ9.eyJSb2x5oiVXNlclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYtNlNt03NzhhMGQxYmQyNGYiLCJSZWFsiSI6ImFkbWluIiwiQ3VzdG9tZXJJZfI6bnVsbCwiVXNlcklkIjoiVXNlcklkXzg52OG486TUwZjUtNDQ1Ny05NThhLTEzZjA0MzJhZDE3YyIsImp3dGlkIjoiZjE0iMzZWYtZjViNC00MzQ1LWFlZWQag1YWM1NWUzNjQ5IiwiaWF0IjoxN784MTA2LCJleHAiOjE2MDMyMTI15DZ9.7U26dqOGSz-4qZJaG6bC4J6--0x3-_6dAWLRTALXMAk"
```

Example of received result showing Thing IP address:

```
{
  "ThingName": "ICCID 8912372646888991",
  "ThingDescription": "Auto-activated by provision process",
  "ActiveMobileSubscriber": "123456789101112",
  "State": "ACTIVE",
  "BatchId": "Tutorial SIM Card",
  "MSISDN": "+4420412389916",
  "ExternalUniqueId": "8912372646888991",
  "ExternalUniqueType": "ICCID",
  "ExternalBatchId": "Tutorial SIM Card",
  "OrganizationId": "OrganizationId_23789d7d-dd59-4739-ab2c-1ec7d9d8b11a",
  "CreatedBy": "UserId_90b777a3-60f5-4557-958ba-15f04333d17b",
  "ThingsGroupId": "ThingsGroupId_ca140991-be66-4ddd-a777-711595c5a30d",
  "CustomerId": "cid_c256463da-742-491b-911b-8850177ef5121",
  "DateAssignedToCustomer": 1610443297454,
  "SimType": null,
  "IPs": [
    {
      "IP": "11.111.11.211",
      "IPAllocationPolicy": "dynamic",
      "IPLock": false,
      "IPPoolId": "IPPoolId_0cbby8ae-ddx7-4nx6-8588-b7e451f114e3",
      "IPvType": "IPv4",
      "NetworkId": "NetworkId_ec8dc935-35a1-499a-aacd-4e190ad41673",
      "ApnShortId": "1000"
    }
    
    ...
```



Now that we have Thing IP address, please use the following request to ping Thing IP address:

```
curl -X POST "https://console.monogoto.io/thing/ThingId_ICCID_<<<_THING_ICCID_>>>/ping" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <<<_TOKEN_HERE_>>>" -H "apikey: <<<_CUSTOMER_ID_>>>" -d "{ \"IPAddress\": \"<<<_THING_IP_ADDRESS_>>>\"}"
```

{% hint style="info" %}
Please note that the above shown command needs to be replaced with information: \
&#xNAN;**<<<\_THING\_ICCID\_>>>** - replace with your Monogoto thing ICCID number\
&#xNAN;**<<<\_TOKEN\_HERE\_>>>** - replace with your token\
&#xNAN;**<<<\_CUSTOMER\_ID\_>>>** - replace with your customer ID. It can be received together with a Login Token or from request to obtain Thing IP address.\
&#xNAN;**<<<\_THING\_IP\_ADDRESS\_>>>** - replace with your thing IP address
{% endhint %}

Example of request:

```
curl -X POST "https://console.monogoto.io/thing/ThingId_ICCID_899721124171098197991/ping" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1N2R5cCI6IkpXVCJ9.eyJSb2x5oiVXNlclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYtNlNt03NzhhMGQxYmQyNGYiLCJSZWFsiSI6ImFkbWluIiwiQ3VzdG9tZXJJZfI6bnVsbCwiVXNlcklkIjoiVXNlcklkXzg52OG486TUwZjUtNDQ1Ny05NThhLTEzZjA0MzJhZDE3YyIsImp3dGlkIjoiZjE0iMzZWYtZjViNC00MzQ1LWFlZWQag1YWM1NWUzNjQ5IiwiaWF0IjoxN784MTA2LCJleHAiOjE2MDMyMTI15DZ9.7U26dqOGSz-4qZJaG6bC4J6--0x3-_6dAWLRTALXMAk" -H "apikey: cid_c256463da-742-491b-911b-8850177ef5121" -d "{ \"IPAddress\": \"11.111.11.211\"}"
```

Example of response to our request showing the thing IP address ping results:

```
[
  {
    "host": "11.111.11.211",
    "size": "56",
    "ttl": "63",
    "time": "82ms",
    "sent": "1",
    "received": "1",
    "packetLoss": "0"
  },
  {
    "host": "11.111.11.211",
    "size": "56",
    "ttl": "60",
    "time": "89ms",
    "sent": "2",
    "received": "2",
    "packetLoss": "0"
  },
  {
    "host": "11.111.11.211",
    "size": "56",
    "ttl": "73",
    "time": "60ms",
    "sent": "3",
    "received": "3",
    "packetLoss": "0"
  }
]
```
