How does Moki communicate with Android devices?
Moki communicates with your Android devices in two ways, Google Cloud Messaging, and Heartbeats. Google Cloud Messaging, commonly called GCM, allows us to send an app, profile or other action directly to the device and have it act on that action immediately. Not all devices are enabled for GCM because GCM operates through the Google Play Store. If your device doesn’t have the Google Play Store on it then it doesn’t have GCM. Not to worry though, that’s why we have Heartbeats. A device will heartbeat, or check-in, with Moki on a one-hour time interval and pick up any actions that you have sent to the device since it the last check-in. Once the device receives the action it will report back what it did with the action. The status of any actions you send are reported in the device’s Action History.
What is needed for Moki to communicate with devices?
The lifeblood of any mobile device rollout is the connectivity of the device. In order for Moki to communicate with the device there are ports that should be open constantly. It is also recommended that you get a dedicated network for the devices to connect to so that they can have maximum bandwidth and accessibility.
The following domains need to be allowed, (open port requirements):
RULE | HOSTNAME | PORT | PURPOSE | ADDITIONAL NOTES |
1 | app.moki.com | 443 | HTTPS | |
2 | *moki-marbles.appspot.com | 443 | HTTPS | |
3 | mokirouter.appspot.com | 443 | HTTPS | |
4 | commondatastorage.googleapis.com | 443 | HTTPS | |
5 | storage.googleapis.com | 443 | HTTPS | |
6 | gcm.googleapis.com | 5228-5230 | Device notifications | |
7 | *.pushy.me | 443 | Device notifications and actions | Necessary for Agent versions using Pushy communication |
8 | *.pushy.io | 443 | Device notifications and actions | Necessary for Agent versions using Pushy communication |
How to check that these are working
Open the device’s browser and go to http://ipfingerprints.com/portscan.php and replace the IP with HOSTNAME from above. Enter the port you want to test as the Start AND End Port. If they are open then you will see the words Open in green next to the port number. Example, if you try to test rule 4, go to http://ipfingerprints.com/portscan.php and use Commondatastorage.googleapis.com for the IP and 80 as the Start port and 80 for the End port and hit Scan. Then retest with 443 as the Start port and 443 as the End port. You will see a green Open next to the ports if they are both successful.
How frequently does Moki communicate with device?
Moki sends a small ping to the device every hour to receive any updated information. This information is about 2-3 kb in size for the most part.