When you have ported the CA to your Linux platform, you are ready to start testing it. You can run CA using the following command
sudo ./wcm_agent -c wcm_agent.conf > /dev/null 2>&1 &
To check the status of wcm, run the following command by changing the LD_LIBRARY_PATH to match your WCM directory
sudo LD_LIBRARY_PATH=/etc/wcm ./wcm_cli status (If CA is installed in /etc/wcm)
Is the CA process running?
The first check is to make sure that the CA process is running. If the CA is not running, take a look at the log file
wcm_log in the
log subdirectory. If you don't know where the log file is written, look at the
wcm_agent.conf file which specifies where the volatile and persistent storage is, and whether the log file is written to volatile or persistent storage. While you are testing, you should set the log type to persistent so it will be preserved across reboots.
Has the CA connected to a ZipKey network?
If the CA is able to connect to a ZipKey network, it will upload its log files to the Cirrent cloud, so you will be able to use the Cirrent log explorer to see what is going on. If the CA is unable to connect to a ZipKey network, you'll need to look at the log files on the device to determine the cause.
Check if the CA has any internet connection by using the following command:
sudo wcm_cli status
This will show if it is connected to any network. There are likely to be two main reasons why it has not connected:
- It did not detect a nearby ZipKey network. Take a look at the
zipkey.conffile which lists all the ZipKey networks that the CA will join. Make sure that the test ZipKey network you have deployed matches one of these networks. If you need to change the ZipKey network list, you will need to update it from the Cirrent cloud, as the CA will download a new ZipKey network list when it connects to the Cirrent cloud, overwriting any local changes to the file.
- It detected a nearby ZipKey network but was unable to join it. The
wcm_logfile should show why it failed. Make sure that the secret you provisioned on the test ZipKey network matches exactly the secret that is provisioned in the
zipkey.conffile (it is case-sensitive).
Can the app find the device?
When the CA has connected to a ZipKey network, it will upload its status including the Wi-Fi scan and start polling the Cirrent cloud for any actions to perform (such as joining a private network). The mobile app (or app emulator) uploads its location to the Cirrent cloud and the Cirrent cloud will find nearby devices. If your device shows up, you're ready to move it over to your private network. If the app cannot find your device, there may be a couple of different reasons:
- The app did not upload its location. Location services needs to be turned on in the emulator or in your app for the Cirrent cloud to be able to find nearby devices.
- The account on the app does not match the account on the device. Make sure to do all your testing from one account, as the Cirrent cloud will only match devices to apps within the same account.
- The device is already bound to a user account. After each test run, you need to make sure to reset the device state (by deleting it from the mobile app). Otherwise the device is considered bound, and won't show up in the list of nearby devices. If you are unable to delete the device from the app, you can reset it from the Explorer. You may have set the device into demo mode, so it forgets all private networks whenever it is rebooted, but the Cirrent cloud state needs to be reset too, by deleting the device from the app, or resetting it from the Explorer.
- You are testing with the emulator and the device type is not a Demo Device Type. For security reasons, the emulator can only find Demo devices. Check the Demo Device Type flag in the Management Center, then reboot your device, and the emulator should be able to find your device.
Did the CA join the private network?
When the app finds the nearby device, you can enter private network credentials, which will be uploaded to the Cirrent cloud. The CA will poll the cloud checking for actions to perform. When it receives the private network credentials it will disassociate from the ZipKey network and join the private network. There might be a few reasons why it might fail to join the private network:
- It did not get the private network credentials. The CA only checks frequently for private network credentials when it is first powered up. If it has been on for a long time, it only checks very infrequently. Turn it off and on again, and it should get the private network credentials right away.
- It could not find the private network in its scan list. The CA provides the scan list to the app so this is unlikely, unless you are in an environment with a lot of networks and the signal strength of the private network is quite weak. Try picking a stronger network, or move the device closer to the private network router.
- The private network credentials were incorrect. Check the pre-shared key that you entered in the app (it is case-sensitive).
- The CA couldn't get a valid IP address. Look at the log file to see if there are any DHCP errors. If so, try picking a more reliable private network.
- The CA couldn't reach the internet on the private network. The CA must be able to reach
dev.cirrentsystems.comon the private network, to verify connectivity. Make sure the router is allowing internet access on the private network.
Congratulations. If you've made it this far, and the CA has joined the private network, your CA is working as designed. You can now test some of the other functions, such as SoftAP (for when the device is not in range of a ZipKey network).