In this tutorial, you are enrolling your Android device also known as Bring Your Own Device (BYOD) with WSO2 IoT Server. WSO2 IoTS supports devices on Android version 4.2.x to 7.0 (Android Jelly Beans to Nougat). If you want to enroll a Corporate-Owned, Personally Enabled (COPE) device, you need to configure WSO2 IoT Server is the system service application and install the configured Android agent on the device.
The following subsections explain how you can work with the Android device type:
Before you begin
Android restricts third-party apps and less secure apps from being installed on the device. Therefore, you need to configure your device to disable this restriction as the WSO2 IoT Server device management agent application acts as a third-party application.
Start WSO2 IoT Server by starting the two profiles in the following order:
Start the core profile, which corresponds to the WSO2 Connected Device Management Framework (WSO2 CDMF) profile.
cd <IOTS_HOME>/bin ./iot-server.sh
The default port assigned for the core is 9443.
Start the analytics profile, which corresponds to the WSO2 Data Analytics Server profile.
./analytics.sh
The default port assigned for analytics is 9445.
Enroll an Android device
Follow the instructions given below to enroll an Android device:
Tap INSTALL to start installing the Android agent.
- Tap OPEN, once the WSO2 Android Agent is successfully installed.
You need to agree by clicking CONTINUE to share the device details listed in the following screen with WSO2 IoT Server when enrolling your Android device.
If you click EXIT, you are not able to register your device with WSO2 IoT Server.
Tap Skip and go to Enrollment to proceed with the default Android enrollment process.
If you want to set up the work profile and enable data containerization, click Setup Work-Profile . You will see the below screen only if your device is on the Lollipop OS version or above. Else, move to the next step.
Enter the server address based on your environment, in the text box provided. A confirmation message will appear.
- Developer Environment - Enter the server IP as your server address.
Example: 10.10.10.123:8280 Deployment Environment - Enter the domain as your server address.
The Android Agent app's default port is 8280. If you are using any other port, the server address should state the new port in the following format:
www.abc.com
:<PORT>
For example, if the port is 8289 the server IP is as follows:www.abc.com:8289
- Developer Environment - Enter the server IP as your server address.
- Enter your details and tap Register. A confirmation message will appear.
Organization - Enter the organization name only if the server is hosted with multi-tenant support or enter the default carbon.super, which is the default organization name on a non-multi-tenant environment.
Username - Enter your WSO2 IoT Server username.
Password - Enter your WSO2 IoT Server password.
- Read the tenant policy agreement, and tap Agree to accept the agreement.
Tap ACTIVATE to enable the WSO2 agent administrator on your device. A confirmation message will appear after enabling the device admin.
Tap ALLOW to allow the WSO2 Android agent to make and manage phone calls, access photos, media and files, and access the device location respectively.
You will get this message only if your Android OS is Marshmallow (6.0) or above.
Example:
Allow WSO2 IoT Server to disable the do not disturb setting when it is enabled. This is required because having the do Not Disturb setting enabled will affect the ring, and mute operations. This settings is only shown for Android Nougat and above.
Tap OK.
- Enable WSO2 Device Management for the Do Not Disturb setting.
- Click Allow.
Set a PIN code of your choice with a minimum of 4 digits. The PIN code will be used to secure your personal data. Thereby, the IoT server will not be able to carry out critical operations on your personal data without using this PIN.
Example: If the device management admin needs to wipe your device or remove data from the device, he/she can not directly wipe it without the PIN code. You have to provide the PIN code to get your device wiped or you can log into the device management console and wipe your device by entering the PIN code. A confirmation message will appear.You will be prompted to provide a PIN code only if your device is a BYOD device.
You have now successfully registered your Android device. Tap Device Information to get device specific information, and tap Unregister if you wish to unregister your device from WSO2 IoT Server.
Try it out
You can view device details and carry out operations on your device, after successfully enrolling it with WSO2 IoTS. Let's take a look at how you can do it:
Navigate to the Device Management page to view all the created devices.
Click the view icon on the Android device you enrolled.
Example:
You will be directed to the device details page where you can view the device information and try out operations on a device.
Example: