Checking Thing Connection via Ping

In this section you may learn how you may check if your Monogoto SIM card (Thing) is connected to a network using 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 portal.

2. Go to Things section of the portal.

3. Select a Thing from the list of seen Things in the portal.

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

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

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.

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

7. Check out the ping results.

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_>>>"

Please note that the above shown command needs to be replaced with information: <<<_THING_ICCID_>>> - replace with your Monogoto thing ICCID number <<<_TOKEN_HERE_>>> - replace with your token

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_>>>\"}"

Please note that the above shown command needs to be replaced with information: <<<_THING_ICCID_>>> - replace with your Monogoto thing ICCID number <<<_TOKEN_HERE_>>> - replace with your token <<<_CUSTOMER_ID_>>> - replace with your customer ID. It can be received together with a Login Token or from request to obtain Thing IP address. <<<_THING_IP_ADDRESS_>>> - replace with your thing IP address

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"
  }
]

Last updated