In order to test the command handling, you need to send a do_command to the embedded device. These commands are usually sent by web or client applications; however, Digi provides a Web Services Console within the iDigi Device Cloud Portal that can be used for testing purposes, such as this one.
The iDigi ME button located in the main tool-bar will allow you to directly login to iDigi using your configured iDigi account:

|
If you are not able to see the iDigi ME icon in the main toolbar, you may need to reset your IDE's perspective. To do so go to Window > Reset perspective... and click OK. |
Once you are logged in to your account, navigate to the Web Services Console by selecting its tab.
Before generating a web services request you need to select the device or devices you will send the command to. To do so, click the SCI Targets button. A new window is displayed.
Click the Add Targets drop-down menu and select your device from the list, then click the Add button.
Click OK to return to the Web Services Console. From the Examples menu select the SCI > Run command on device option.
A query template will be automatically generated in the Web Services Console editor:
Locate the do_command request and change the target value from cli to myTarget. To do so, replace the following line:
|
<do_command target="cli"> |
With this one:
|
<do_command target="myTarget"> |
Now set Hello from iDigi! as command data. To do so replace the following line:
|
<cli>who</cli> |
With this one:
|
Hello from iDigi! |
The text you have written is the data of the do_command. You can also format it (in xml, for example) to implement your own communication protocol between iDigi and the application. The code should now be similar to this:
Send the query to iDigi by clicking the Send button. If you are asked for your iDigi credentials fill them in and click OK to complete the query transfer.

Now your embedded device should receive the do_command displaying its data (Hello from iDigi!) in a toast message which you configured previously in the application.
You can verify the answer sent by the embedded device within the Web Services Console. On the right side of the code editor you will see a list of Web Services Responses.
Double-click on the first response listed and you will see that the data of the do_command answer is the string you configured in the application, do_command received.
|
Congratulations!
You have finished the Getting Started Guide. You can learn more about the possibilities the iDigi Connector for Android offers in the next step.
|
Find out what to do next, access examples and documentation, etc. |
Prev. Step |
Home |
Next Step |