module.ping
The module.ping command is used to instruct the module to ping a specific host. The module can be identified by thingKey, ESN, ICCID, IMEI, IMSI, MEID, or MSISDN. Only one of these identifying fields is required.
TR50 Request
{
"cmd": {
"command": "module.ping",
"params": {
"thingKey": "mything",
"mode": "tr50",
"host": "www.example.com"
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
Thing Identifier Parameters | Yes | Identifies the thing to which the module call is to be directed. See Thing Identifier Parameters table below for supported parameters. | |
mode | String | The mode to send the command ('tr50' or 'sms'). | |
host | String | Yes | The host to ping. |
Thing Identifier Parameters
Name | Type | Description |
---|---|---|
thingKey | String | Key of the thing |
thingId | String | Id of the thing |
esn | String | Esn of the thing |
iccid | String | Iccid of the thing |
imei | String | Imei of the thing |
imsi | String | Imsi of the thing |
meid | String | Meid of the thing |
msisdn | String | Msisdn of the thing |
TR50 Response
If the command is sent successfully a success message is returned and an array containing the ping responses. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true,
"params": {
"responses": [
"num": 1,
"ip": "192.168.0.1",
"ttl": 1,
"latency": 1
],
...
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
num | Integer | The ordinal representing the response element. |
ip | String | The IP address of the host pinged. |
ttl | Integer | Time to live. |
latency | Integer | The latency in the response. |