The Emulator can be used to emulate a device (to test your mobile app), a mobile app (to test your device), or both (to see the end-to-end flow between the device, the Cirrent cloud, and the mobile app). The emulator has three parts - a device emulator (looks like a monitor), a mobile app emulator (looks like an iPhone), and a scrolling display of API calls made by the emulators to the Cirrent cloud.
To emulate a device, you check the box "Emulate Connected Product" and enter a valid device id and secret. Click on 'Validate' to confirm that the device id and secret are correct. Then just click on the red circle (the power button) on the lower right hand corner of the monitor. You will see Cirrent API events displayed as the device emulator uploads its location and Wi-Fi scan, uploads logs, and gets an updated configuration, just like the real device. Then the device emulator will start polling to get private network credentials. Now you can use your ZipKey-enabled mobile app or the mobile app emulator to pass private network credentials to the device. When the device emulator receives the private network credentials, it will send a status saying it is JOINING the private network, then move over to that network, and upload a status saying it JOINED the network (if the credentials were valid) or FAILED to join the network (if the credentials were invalid).
If you want to run the device emulator again, just tap the power button on the monitor to turn it off and on again.
Mobile App Emulator
To emulate the mobile app, you check the box "Emulate App" and tap on "Add a device". You will need to enable location services in your browser, as that is how the Cirrent cloud can determine your location, to find nearby discoverable devices.The App emulator will call the Cirrent cloud to find nearby devices. Your device (or the device emulator) should appear as an available device on the app emulator screen. Select the device. You'll now be presented with a list of networks that the device can see. Choose a network, enter the credentials and hit 'connect'. The credentials will be sent to the Cirrent cloud, where they can be retrieved by the device. If you are using the device emulator, it will present you with two networks,
demo-home-network. The pre-shared-key for Personal-Network is
password. If you enter a valid pre-shared key, the device should join the private network. If you enter an invalid pre-shared key, the device will report back that it FAILED to join the private network.
Emulating Broadband Provider integration
Some broadband providers support a richer integration with Cirrent, where the network credentials can be retrieved from the provider, instead of being entered by the end user. To emulate this flow, check the box "App is on demo-home-network". Now, when you start the emulator and select your device, you'll get an option to "Connect automatically with CableCo". Choose this option, and the emulator will emulate the flow where the credentials are retrieved from the broadband provider and passed to the device. Alternatively, select "Connect manually" to pick the network for your device to join. Note that if you are testing this flow with a real device, you'll need to set up a test network called
demo-home-network as described here.