How can I change the device status?
All the sample device types provided in WSO2 IoT Server are configured so that the device status is demarked as active as soon as you download the agent. That is because the device is considered to be registered with WSO2 IoT Server when the agent is downloaded. Having the status as active when you download a device is not mandatory and you can change it when writing the device plugin or APIs for your device.
For example, in RaspberryPi the device status is configured when writing the APIs in the
RaspberryPiServiceImpl.java file by defining
ACTIVE as the value for
What are the available device statuses?
WSO2 IoT Server supports device statuses so that you are able to manage the device lifecycle anyway you prefer using the following statuses.
The device status once a device instance is created.
Example: Downloading the virtual fire alarm device agent.
The device status once the agent starts to communicate with the device.
Example: When the virtual fire alarm is connected to WSO2 IoT Server for the first time, you can configure the plugin so that the device status changes from
|A device that is in the |
|IoTS is unable to reach the server therefore, the device status can be configured to be in the |
|A device that does not have an owner assigned to it.|
|A device that does not abide by a policy that was enforced on it can be suspended and hence be in the |
|If you want to stop the device from communicating with the server, the device status can be configured to be |
|The status of the device once it sends a request to be disenrolled from WSO2 IoT Server.|
|The status of the status once the device is disenrolled from WSO2 IoT Server.|
How can I disable authentication for MQTT clients?
You will want to reduce the number of steps for testing purposes and see if the communication works accordingly, in such cases or for any other use case you can disable authentication for MQTT clients by following the simple steps given below:
- Open the
broker.xmlfile that is in the
- Configure the following fields:
- Define the
- Define the
- Define the
Why do I need to use the iOS Agent?
The iOS Agent is required to perform the following operations. Therefore, if you need to use any of the following operations with WSO2 IoT Server, you need to build the iOS Agent.
- Report location details to the server.
- Perform the ring operation.
Perform notification operations by sending messages to the device.
Why do I get the APIMClientOAuthException error?
Are you getting the
APIMClientOAuthException error after using the change-ip script or after manually configuring the IP or hostname of WSO2 IoT Server? Let's look at why it happens and how you can overcome it.
Check if the IP you defined is referring to another hostname in the etc/hosts file. If yes, make sure to comment it out or remove it from the file. Now start the server again and you won't get the error. Sometimes, the VMs will have a server name or machine name, therefore, a host name entry for that server or machine name must be in the /etc/hosts file in order to start the server. In that case, make sure that you do not use the defined IP to resolve the machine host name.
Please note that the IP you defined cannot point to any hostname. If it is, then hostname verification failures will cause the above issue.