Digi ConnectCore 9M 2443 Quick start guide

Category
Operating systems
Type
Quick start guide
iDigi platform for Windows Embedded CE 6.0
Getting Started Guide
90002001_A
2
Digi International Inc. 2010. All Rights Reserved.
The Digi logo is a registered trademark of Digi International, Inc.
All other trademarks mentioned in this document are the property of their respective owners.
Information in this document is subject to change without notice and does not represent a
commitment on the part of Digi International.
Digi provides this document “as is,” without warranty of any kind, either expressed or implied,
including, but not limited to, the implied warranties of fitness or merchantability for a particular
purpose. Digi may make improvements and/or changes in this manual or in the product(s) and/or
the program(s) described in this manual at any time.
This product could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes may be incorporated in new editions of the
publication.
Digi International Inc.
11001 Bren Road East
Minnetonka, MN 55343 (USA)
+1 877 912-3444 or +1 952 912-3444
http://www.digiembedded.com
3
Contents
1. Introduction..................................................................................................................................... 6
1.1. What is iDigi platform? .................................................................................................................................. 6
1.2. What are the applications of iDigi? ................................................................................................................ 6
1.3. iDigi concepts................................................................................................................................................. 6
1.3.1. Cloud computing ........................................................................................................................................... 6
1.3.2. Protocols ....................................................................................................................................................... 7
1.3.3. Applications ................................................................................................................................................... 7
1.3.4. Web Services ................................................................................................................................................. 7
1.3.5. iDigi Manager Pro .......................................................................................................................................... 7
1.4. Conventions ................................................................................................................................................... 8
1.1. Abbreviations ................................................................................................................................................ 9
1.2. Supported Platforms ...................................................................................................................................... 9
1.3. Requirements ................................................................................................................................................ 9
1.3.1. Digi JumpStart kit version ............................................................................................................................. 9
1.3.2. Java language ................................................................................................................................................ 9
2. First steps in iDigi ....................................................................................................................... 10
2.1. Creating a new iDigi account ........................................................................................................................ 10
2.2. Create a project in Visual Studio .................................................................................................................. 10
2.3. Adding iDigi to your platform ...................................................................................................................... 10
2.3.1. Adding Catalog and registry entries in your project ................................................................................... 11
2.3.2. Adding ADDP to your project ...................................................................................................................... 12
2.3.2.1. Launch the image ................................................................................................................................ 12
2.3.2.2. Launching the application manually.................................................................................................... 12
2.4. Start the device ............................................................................................................................................ 12
2.4.1. Configuring the network interface .............................................................................................................. 12
2.4.2. Configuration file ......................................................................................................................................... 13
2.5. Register your device in iDigi Manager Pro.................................................................................................... 14
2.5.1. Manual registration ..................................................................................................................................... 15
2.5.2. Device ID ..................................................................................................................................................... 15
2.5.3. Check that your device is registered ........................................................................................................... 15
2.6. Registration of a Vendor ID .......................................................................................................................... 16
2.6.1. Device Type ................................................................................................................................................. 16
2.6.2. Firmware version ........................................................................................................................................ 16
2.6.3. Cached data in iDigi ..................................................................................................................................... 16
2.6.4. Register a new Vendor ID ............................................................................................................................ 17
2.6.5. Instructing devices to supply the Vendor ID ............................................................................................... 18
3. iDigi applications ........................................................................................................................ 19
3.1. Methods of communication ......................................................................................................................... 19
3.1.1. Remote Control ........................................................................................................................................... 19
3.1.2. Data storage ................................................................................................................................................ 19
3.2. Sample applications ..................................................................................................................................... 19
4. Remote control example .......................................................................................................... 20
4.1. Device application (iDigiManager) ............................................................................................................... 20
4.1.1. Building the application .............................................................................................................................. 20
4.1.2. Transferring the application to the device .................................................................................................. 20
4.1.3. Launching the application ........................................................................................................................... 21
4.1.4. Device properties ........................................................................................................................................ 22
4
4.1.5. File system management ........................................................................................................................... 23
4.1.6. Firmware update ........................................................................................................................................ 23
4.1.6.1. Firmware files and partitions ............................................................................................................. 24
4.1.7. Securing the connection ............................................................................................................................. 25
4.1.8. Validation of server SSL certificate ............................................................................................................. 26
4.2. Device application (iDigiLED) ....................................................................................................................... 27
4.2.1. Building the application .............................................................................................................................. 28
4.2.2. Transferring the application to the device ................................................................................................. 28
4.2.3. Launching the application .......................................................................................................................... 28
4.2.4. Testing the buttons and LEDs thread ......................................................................................................... 28
4.3. Client application (iDigiLedDEMO.jar) ......................................................................................................... 28
5. Data storage example ................................................................................................................ 31
5.1. Device application (iDigiStorage) ................................................................................................................. 31
5.1.1.1. Building the application ...................................................................................................................... 32
5.1.1.2. Transferring the application to the device ......................................................................................... 32
5.1.1.3. Launching the application .................................................................................................................. 32
5.1.1.4. Retrieving the data from iDigi ............................................................................................................ 33
5.2. Client application (iDigiTankDemo.jar) ........................................................................................................ 34
6. Application development ......................................................................................................... 36
6.1. iDigi API functions ....................................................................................................................................... 36
6.1.1. Functions for remote control ..................................................................................................................... 36
6.1.1.1. idigi_start ............................................................................................................................................ 36
6.1.1.2. idigi_register_usercmd ....................................................................................................................... 36
6.1.1.3. idigi_query_attribute ......................................................................................................................... 36
6.1.2. Functions for data storage ......................................................................................................................... 37
6.1.2.1. idigi_putfile ......................................................................................................................................... 37
6.2. The iDigiLED sample application in detail .................................................................................................... 37
6.2.1. Source tree ................................................................................................................................................. 37
6.2.2. RCI requests and replies ............................................................................................................................. 38
6.2.2.1. Commands .......................................................................................................................................... 38
6.2.3. Defining custom commands ....................................................................................................................... 39
6.2.4. Implementing the custom commands callbacks ........................................................................................ 39
6.2.4.1. Process callback .................................................................................................................................. 40
6.2.4.2. Response callback............................................................................................................................... 41
6.2.5. Custom commands descriptors and registration ....................................................................................... 42
6.2.5.1. Descriptor ........................................................................................................................................... 42
6.2.5.2. Descriptor errors ................................................................................................................................ 42
6.2.5.3. Registration ........................................................................................................................................ 43
6.2.6. Rest of code ................................................................................................................................................ 43
6.2.7. Connecting to iDigi ..................................................................................................................................... 44
6.2.8. Adding the libraries and header search folder to the source file ............................................................... 44
6.2.9. Building the application .............................................................................................................................. 44
6.2.10. Transferring the application to the device ................................................................................................. 44
6.2.11. Launching the application and checking the connection to iDigi ............................................................... 44
6.3. The iDigiLedDEMO client application in detail ............................................................................................. 45
6.4. The iDigiStorage sample application in detail .............................................................................................. 46
6.4.1. Source tree ................................................................................................................................................. 46
6.4.2. Definition of the application ...................................................................................................................... 46
6.4.3. Putting the file into iDigi ............................................................................................................................. 46
6.4.4. Adding the libraries and header search folder to the source file ............................................................... 47
6.4.5. Building the application .............................................................................................................................. 47
6.4.6. Transferring the application to the device ................................................................................................. 47
5
6.4.7. Launching the application ........................................................................................................................... 47
6.5. The iDigiTankDEMO client application in detail ........................................................................................... 48
7. iDigi Windows CE application development ..................................................................... 49
7.1. Modify iDigi Template project ..................................................................................................................... 49
7.2. Create a new iDigi Windows CE application project from scratch ................................................................ 52
8. iDigi Add-ins ................................................................................................................................. 54
8.1. iDigi account configuration .......................................................................................................................... 54
8.1.1. Creating an iDigi account ............................................................................................................................ 55
8.2. Digi Device Discovery ................................................................................................................................... 56
8.2.1. Digi Device Discovery toolbar...................................................................................................................... 57
8.2.1.1. Refresh view ........................................................................................................................................ 57
8.2.1.2. Restart device ...................................................................................................................................... 57
8.2.1.3. Configure Network settings................................................................................................................. 57
8.2.1.4. Register to iDigi Manager Pro ............................................................................................................. 58
8.3. Registering devices to iDigi Manager Pro ..................................................................................................... 58
8.3.1. Automatic device registration ..................................................................................................................... 58
8.3.2. Manual device registration ......................................................................................................................... 60
8.3.2.1. Device Identification ........................................................................................................................... 61
8.3.2.2. iDigi Account Settings .......................................................................................................................... 61
8.4. iDigi ME ....................................................................................................................................................... 62
9. Configuration file ........................................................................................................................ 63
9.1. Section DEVICE_CONFIG_GROUP ................................................................................................................. 63
9.2. Rest of sections ............................................................................................................................................ 63
10. Known issues and limitations ................................................................................................ 64
10.1. Connection to iDigi platform .................................................................................................................... 64
10.2. Network connection and interfaces ......................................................................................................... 64
10.2.1. Gateway IP .................................................................................................................................................. 64
10.2.2. DNS addresses ............................................................................................................................................. 64
10.3. LEDs on ConnectCore Wi-9M 2443 platform ............................................................................................ 64
10.4. Limitation on upload/download files ....................................................................................................... 64
10.5. Limitation on firmware update ................................................................................................................ 64
11. Reference documentation ....................................................................................................... 65
6
1. Introduction
1.1. What is iDigi platform?
iDigi is a platform that allows for application-to-device data interaction (messaging), application and
device data storage, and remote management of devices. Devices are associated with iDigi
through the Internet or other wide area network connections, which allow for communication
between the device, iDigi server, and the customer application. An important part of this
communication is the transfer of data from a device to iDigi. Users can write applications that run
on devices that pass data (messages) as well as send data to a temporary data cache on the iDigi
platform to be available for retrieval by iDigi Web Services clients.
iDigi platform solves some difficult problems for deployment of devices with a communications
interface, and allows the application developer to concentrate on their field of interest without
having to worry about network management, data storage and remote firmware updates.
All of this is available if there is an available connection to the Internet, at least part of the time but
preferably with permanent access. It works behind firewalls, or with direct Internet connections.
1.2. What are the applications of iDigi?
There are many real world applications where iDigi can be very beneficial. One such application is
in energy management where power utilities can provide remote access and management to
appliances in homes or businesses that put a heavy load on the energy grid. Other applications are
fleet management, where a fleet of vehicles can be monitored from a remote location or building
automation, where lighting can be controlled to save energy. Also, the monitoring and data
collection of a sensor network can be made easier with iDigi. In addition to handling data from your
devices, iDigi supports device management such as upgrading firmware and making configuration
changes.
1.3. iDigi concepts
1.3.1. Cloud computing
Cloud computing is Internet-based computing, whereby shared resources, software, and
information are provided to computers and other devices on demand, similar to the electricity grid.
7
The cloud is a metaphor for the Internet in cloud computing, based on how it is depicted in
computer network diagrams and as an abstraction for the complex infrastructure it conceals.
You can consider iDigi as a platform that lives in this cloud and allows your computers and
embedded devices to communicate with each other even when they are at different locations.
1.3.2. Protocols
iDigi works in combination with different communication protocols:
- ADDP: (Advanced Device Discovery Protocol) is a Digi proprietary network protocol that allows
for discovery of devices connected to an Ethernet LAN. The protocol also allows basic network
configuration of the device.
- EDP: (Easy Device Protocol) is a Digi proprietary network protocol for communicating with
iDigi.
- RCI: (Remote Command Interface) is a high level communication protocol written in XML. This
XML protocol is the one used for communications in the cloud between user-end applications,
iDigi to remotely command and communicate with the embedded device, and with the iDigi
server or with any client application that resides on the cloud.
1.3.3. Applications
When working on the cloud there are two distinct types of applications:
- Device applications: applications running on the embedded device, that send data to and
receive data from iDigi
- Client applications: applications that may run on any PC, or other device in the cloud, and use
iDigi Web Services to communicate with the device application running on the embedded
device
1.3.4. Web Services
Web services is a set of protocols and standards for data interchange between applications.
Different applications written in different programming languages and running in different hardware
architectures can use web services to interchange data over networks, such as the Internet.
1.3.5. iDigi Manager Pro
The iDigi Manager Pro service is a Digi web portal where users can register their devices for
remote management and firmware updates.
8
1.4. Conventions
This document uses these conventions, frames, and symbols to display information:
Convention
Use
Style
New terms and variables in commands, code, and other input.
Style
In examples, to show the contents of files, the output from commands.
In text, the C code.
Variables to be replaced with actual values are shown in italics.
Style
For menu items, dialogs, tabs, buttons, and other controls.
In examples, to show the text that should be entered literally.
$
A prompt that indicates the action is performed in the host computer.
\>
A prompt that indicates the action is performed in the target device.
Menu name > option
A menu followed by one or more options; for example, File > New.
This manual also uses these frames and symbols:
A warning that helps to solve or to avoid common mistakes or
problems.
A hint that contains useful information about a topic.
$ A host computer session.
Bold text indicates what must be input.
\> A target session.
\> Bold text indicates what must be input.
An excerpt of a file
Bold text indicate what must be input.
9
1.1. Abbreviations
ADDP
EDP
GPIO
HAL
HTTP
LAN
LED
MAC
OEM
RCI
SCI
SSL
UI
XML
1.2. Supported Platforms
This document applies to and mentions to the following supported platforms:
ConnectCore i.MX51 / Wi-i.MX51
ConnectCore 9M 2443 / Wi-9M 2443
ConnectCore 9P 9360
ConnectCore 9C / Wi-9C
Depending on the platform being used, the information in dialogs
and output messages may vary from that shown this manual.
1.3. Requirements
1.3.1. Digi JumpStart kit version
A Digi JumpStart kit, version 1.6 or later is required.
If you are working with version 1.6 please pay special attention to section 2.3.1 Adding Catalog
and registry entries in your project as well as registry entries in your project.
1.3.2. Java language
iDigi applications and iDigi Manager Pro web portal use Java language. It is important that your PC
has the latest version of Java installed and that the Internet browser has Java enabled.
10
2. First steps in iDigi
This section helps you get familiar with the iDigi platform and guides you through creating your iDigi
account as well as discovering and registering embedded devices to your iDigi account.
2.1. Creating a new iDigi account
To create a new iDigi account:
1. Open the iDigi web page developer.idigi.com in a browser.
2. Click on “Are you a new user?” and fill in the form to create a new iDigi account.
2.2. Create a project in Visual Studio
The iDigi integration assumes that you have already performed the following steps. These steps
are fairly general as they are highly dependent on the customer BSP and the Microsoft Windows®
CE version used:
You will need to have the following applications already installed:
Microsoft Windows® CE 6.0, and
a BSP corresponding with the hardware that will be used.
You will need to create and build a Windows Embedded CE 6.0 project. Please refer to the Digi
JumpStart for Windows Embedded CE 6.0 User’s Guide integrated in Visual Studio Help >
Contents for instructions about creating and building your project. After you have completely built
your Project, it’s time to work with iDigi.
2.3. Adding iDigi to your platform
The iDigi for Windows Embedded CE 6.0 product is presented as an executable. Execute the
Setup.exe file, then follow the installation steps. Once the installation is complete, you will find the
following:
- ADDP, iDigiManager, iDigiLED and iDigiStorage: are the device applications (This application
will be fully explained in 6. Application development), installed at:
%_WINCEROOT%\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS
- bin: contains the libraries ordered by platform, installed at:
%_WINCEROOT%\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\iDigi\bin
- ClientApps: contains the client applications, binaries and source files, installed at:
%ProgramFiles%\Digi\iDigi\ClientApps
- Doc: contains this document, installed at:
%ProgramFiles%\Digi\iDigi\Doc
- Libs: contains the header files necessary to work with iDigi applications.
%_WINCEROOT%\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\iDigi\LIBS
- iDigi.conf and iDigiCopy.exe: iDigi.conf is the configuration file used by iDigi to read/write
parameters and store them permanently. iDigiCopy.exe is the application that copies the
configuration file to the FlashDisk of the device (only for BSP version minor than 2.0), installed at:
%ProgramFiles%\Digi\iDigi\ConfigurationFile
- Templates: contains a template to develop iDigi applications, installed at:
%ProgramFiles%\Digi\iDigi\Templates
- iDigiSDK.pbcxml: catalog to select/unselect the iDigi applications, installed at:
%_WINCEROOT%\PUBLIC\COMMON\CATALOG
11
%ProgramFiles% is an environment variable of your system that provides the
path to your Program Files directory (usually C:\Program Files)
%_WINCEROOT% is an environment variable of your system that provides the
path to your Microsoft Windows® CE root directory (usually C:\WINCE600).
2.3.1. Adding Catalog and registry entries in your project
If you are using a BSP version 2.0 or earlier, you need to add these
entries by hand. If you are using BSP version 2.0 or later, manual
entry is not necessary, please move onto to the next step.
To be able to compile and add the iDigi applications into your image you need to modify the
platform.bib file and the platform.reg file.
Go to the flat release directory and open platform.bib and add the following lines:
; iDigi Support
IF IDIGI_ADDP
#include "$(_WINCEROOT)\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS\ADDP\ADDP.bib"
ENDIF IDIGI_ADDP
IF IDIGI_LED
#include "$(_WINCEROOT)\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS\iDigiLED\LED.bib"
ENDIF IDIGI_LED
IF IDIGI_STORAGE
#include "$(_WINCEROOT)\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS\iDigiStorage\iDigiStorage.bib"
ENDIF IDIGI_STORAGE
IF IDIGI_MANAGER
#include "$(_WINCEROOT)\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS\iDigiManager\iDigiManager.bib"
ENDIF IDIGI_MANAGER
; iDigiConfiguration file Support
iDigiCopy.exe "$(ProgramFiles)\Digi\iDigi\ConfigurationFile\iDigiCopy.exe" NK SH
iDigi.conf "$(ProgramFiles)\Digi\iDigi\ConfigurationFile\iDigi.conf" NK SH
Go to the flat release directory and open platform.reg and add the following lines:
; iDigi Support
IF IDIGI_ADDP
#include "$(_WINCEROOT)\PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS\ADDP\ADDP.reg"
ENDIF IDIGI_ADDP
; iDigiCopy application autolaunch
[HKEY_LOCAL_MACHINE\init]
"Launch95"="iDigiCopy.exe"
If you are running the iDigi support in a ConnectCore 9M /Wi-9M 2443, you must make the
following change, in the file %_WINCEROOT%\PLATFORM\CCX9M2443\SRC\Drivers\ccw9mWifi\airoha_pwr_cal.h
(v2.0) or %_WINCEROOT%\PLATFORM\CCX9M2443\SRC\Drivers\wifimac\ccw9mWifi\airoha_pwr_cal.h (v1.6) you
must comment the line whit the define #define SIGNAL_LED_WITH_ADC.
//#define SIGNAL_LED_WITH_ADC
_FLATRELEASEDIR is an environment variable of Visual Studio that provides
the path to your flat release directory, to know the value of this variable in Visual
Studio go to build > Open Release Directory in Build Window, and write set
_FLATRELEASEDIR.
12
2.3.2. Adding ADDP to your project
After installation, you need to integrate ADDP into your project.
In the catalog view go to Third Party\Digi\iDigi\Apps\Digi Discovery Protocol (ADDP) and select
the Digi Discovery Protocol (ADDP) item, doing this the ADDP application will be added to your
image and launched automatically:
In the solution explorer view within Visual Studio go to:
PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS, then right click in the ADDP folder and
select Build.
2.3.2.1. Launch the image
To create an image, go to build > Make Run-Time Image.
Please verify that ADDP.exe is inside your new image.
Run the Windows CE kernel you built in your device.
2.3.2.2. Launching the application manually
Occasionally the application may not launch correctly (for example missing configuration file 2.4.2).
To launch the ADDP application open a telnet console to your device and execute the ADDP
command as follows:
Welcome to the Windows CE Telnet Service on CCWi-i.MX51
Pocket CMD v 6.00
\> ADDP
If the application launches correctly the following messages will be displayed:
\> [ADDP]: Device Discovery launched
\> [ADDP]: Setup...OK
\> [ADDP]: Device Discovery running
2.4. Start the device
Update your device with the new image and start the device.
2.4.1. Configuring the network interface
To be able to remotely manage your device through the iDigi Manager Pro service and use the
iDigi Web Services, you need to configure the device so that it establishes a connection to iDigi
platform.
13
To do this, you may need to configure the IP address, netmask and gateway of your device’s
network interface, and the DNS addresses so that it can route packets to the Internet and resolve
names. All of these network settings can be permanently configured in the U-Boot console. Please
refer to the U-Boot Reference Manual for instructions about configuring the network parameters of
your target device.
To see if your device has access to the Internet, you can perform a ping to the Digi website:
> ping www.digi.com
PING www.digi.com (172.16.1.69): 56 data bytes
64 bytes from 172.16.1.69: seq=0 ttl=250 time=339.719 ms
64 bytes from 172.16.1.69: seq=1 ttl=250 time=349.424 ms
64 bytes from 172.16.1.69: seq=2 ttl=250 time=363.303 ms
64 bytes from 172.16.1.69: seq=3 ttl=250 time=343.482 ms
Note, the first time this is done it may take some seconds for the device to resolve the name before
the ping packets can be transmitted.
If you cannot ping any Internet address, check that you have a default route in your system:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.101.0.0 * 255.255.0.0 U 0 0 0 eth0
default mygateway 0.0.0.0 UG 0 0 0 eth0
2.4.2. Configuration file
The configuration file (iDigi.conf) is used to configure the different parameters of the iDigi Manager
Pro, and also is used to read/write/save the user configuration changes made through the WebUI.
After the installation is complete the configuration file is located in:
%ProgramFiles%\Digi\iDigi\ConfigurationFile
Initially, you do not need to modify this file. However, after building and loading an image into the
device, the configuration file is automatically copied onto the FlashDisk in your device. If the
configuration file fails to copy automatically it can be copied manually.
1. Open an explorer window and enter ftp://<your_ip>/FlashDisk/ into the address bar.
2. Copy the iDigi.conf file.
Since the configuration file is stored onto your FlashDisk it is permanently stored. You only need to
copy the configuration file the first time you start to work with iDigi.
14
2.5. Register your device in iDigi Manager Pro
To manage your device remotely via iDigi Manager Pro, you must first register it into your iDigi
account.
iDigi Manager Pro web portal uses JAVA language. It is important that your PC
has the latest version of JAVA installed and that the Internet browser has JAVA
enabled.
To register your device:
1. Open the iDigi Manager Pro web page http://developer.idigi.com in a browser.
2. Login with the username and password you created in Section 2.1. Creating a new iDigi
account.
3. In the Left navigation bar, select Management > Devices.
4. Initially, your account will not have any registered devices. To add a device, click on the
plus sign button in the Devices toolbar ( ). The Add Devices dialog box will appear and
display all the Digi devices discovered in your LAN through the ADDP protocol. (Click the
Refresh button if you do not see any devices listed).
5. Locate your Windows CE Embedded Device by its Device Type and MAC or IP address.
Select your device from the list and click OK to add it to your account. If the checkbox on
15
top is enabled, the device will be configured to connect to that iDigi server and the device
will reboot.
2.5.1. Manual registration
If your device does not appear in the list, you can add it manually:
1. Click on Add Manually in the Add Device dialog box.
2. On the combo box, select MAC Address and type the MAC address of your device’s
primary wired network interface.
3. Click Add to add it to the list.
4. Select your device entry from the list and click OK.
2.5.2. Device ID
The Device ID is a 16 octet number that uniquely identifies a device within iDigi Manager Pro. For
embedded devices, the Device ID is built using the MAC address of the primary wired Ethernet
interface of the device. In the example above, for a MAC: 01:02:03:04:05:06, the Device ID is
00000000-00000000-010203FF-FF040506 (for clarity, initial zeros on the left part will be hidden).
2.5.3. Check that your device is registered
If your device was successfully registered, it should appear in your Devices list. Initially it will
appear as Disconnected.
16
2.6. Registration of a Vendor ID
A Vendor ID is a unique identifier assigned by Digi to an OEM. To understand the need to request
a Vendor ID, the concepts of Device Type and Firmware Version must be introduced and some
background about how iDigi Manager Pro stores information must be given.
2.6.1. Device Type
The Device Type (shown as deviceType) is a string representing a particular kind of device.
Devices with the same device type should share a reasonably similar set of features.
This string can be supplied in the configuration file:
%ProgramFiles%\Digi\iDigi\ConfigurationFile, in section DEVICE_CONFIG_GROUP:
[DEVICE_CONFIG_GROUP
vendorId=
firmwareVersion=1.0.0.0
deviceType=My Device Type I
companyName=Digi International Inc.
deviceModel=
certificateStore=
]
If no value is given to deviceType the hardware platform name will be used by default.
2.6.2. Firmware version
The Firmware Version (shown as firmwareVersion) is a 32 bit value given as four decimals
separated by periods, which represents the version of the firmware running in your target.
The value can be supplied in the configuration file:
%ProgramFiles%\Digi\iDigi\ConfigurationFile, in section DEVICE_CONFIG_GROUP:
[DEVICE_CONFIG_GROUP
vendorId=
firmwareVersion=1.0.0.0
deviceType=
companyName=Digi International Inc.
deviceModel=
certificateStore=
]
2.6.3. Cached data in iDigi
For certain devices, connection to the Internet may be intermittent and/or expensive. For this
reason, data and descriptors (meta-data) are cached on iDigi Manager Pro instead of being
constantly polled and refreshed.
Data presented to you about your device in iDigi Manager Pro is normally data that was cached
sometime in the past and may not be the most up to date real data. Every section of iDigi Manager
Pro contains a Refresh button which can be pressed in order to force the query of current data.
A combination of device type and firmware version is used as a key to cache information such as
RCI descriptors, default values, and other information.
Currently, there is no process for acquiring a device type beyond simply choosing one and hoping
that it is available and does not collide. If a collision does occur, there is the possibility of odd
behavior. For instance, if someone connects a device to iDigi using the device type
“VendingMachine” the iDigi platform will attempt to acquire information from this device. This
information can be used for multiple purposes such as generating the management UI for the
device or determining if the device can support file uploads. This information is expensive to
acquire, so it is cached in the platform making it available for any other device that connects using
17
the same device type and firmware version. Additionally, some devices may not support being
queried for this information directly, so it can be loaded into the platform out of band to be available
for later use.
There is nothing stopping someone else from choosing a device that also has the device type
“iVendingMachine”. This device may be significantly different, but the platform will still think it can
apply its cached data to the device type. As a result, the device will have a broken UI, as it will
show management options and other features that may not be applicable to the device.
Vendor ID registration is a process that allows third parties to create their own device types without
having to worry about the type already existing, or someone coming in later and overwriting the
cached data for their type.
2.6.4. Register a new Vendor ID
Registering a Vendor ID (shown as vendorId) is optional. If you do not register a Vendor ID, a
common Vendor ID will be assigned allowing you to work normally. The only risk of not registering
a Vendor ID is that another iDigi user could choose the same device type and firmware version as
your device and the collision explained above could occur.
To avoid this from happening, request a new Vendor ID as explained in the following lines:
1. On iDigi Manager Pro, go to Administration > My Account and click the Register for
new vendor id button:
2. A unique Vendor ID number will be assigned to your iDigi account.
18
2.6.5. Instructing devices to supply the Vendor ID
Once a Vendor ID is assigned to your iDigi account, all registered devices must supply the Vendor
ID number when they connect to iDigi.
This can be done by filling the vendorId field in the configuration file with the Vendor ID that was
assigned to your account.
[DEVICE_CONFIG_GROUP
vendorId=0x0100001D
firmwareVersion=1.0.0.0
deviceType=
companyName=Digi International Inc.
deviceModel=
certificateStore=
]
If you do not supply one, the default Vendor ID will be used, but you will not be able to manage the
descriptors (meta-data) of your device.
19
3. iDigi applications
3.1. Methods of communication
iDigi's Data Service facilitates the sending of commands and data requests to remote devices.
Devices can also push data up to iDigi in the form of XML files that are cached temporarily in the
iDigi database. The uploaded files are kept in collections, which are similar to folders. The
organization of the collections reflects the hierarchical nature of a user's groups within iDigi. Clients
can access the data within these collections and then work with it; for example, by displaying it in a
graph on a webpage. Files and collections can also be accessed through the iDigi Manger Pro as
well as via iDigi Web Services.
By their methodology two communication methods can be distinguished:
- Remote control
- Data storage
3.1.1. Remote Control
iDigi Manager Pro exposes a web services interface that allows requests to be sent to devices
through the server. This can be done using the Server Command Interface (SCI). Among other
things, an SCI request can be used to wrap an RCI (Remote Command Interface) request. RCI
provides a way for users to send a request to a single device. RCI can be used to get and set
information about a device’s settings/state, reboot a device, update its firmware, etc. It can also be
used to send custom requests to a device.
An SCI request allows an RCI request to be sent to multiple devices at once.
3.1.2. Data storage
Applications on a device can easily send any data to the iDigi Manager Pro with a simple function
call, and the device and iDigi take care of the details. With this feature, a user can decide which
data to send to iDigi and how often to send it. The data that is sent by the device will usually be in
the form of an XML file that will be stored in iDigi.
3.2. Sample applications
Some sample applications are distributed with iDigi support, each representing one of the methods
described above. In the following chapters, applications will be presented and ran in order to
demonstrate how they work. Then, in another chapter, the source code used to understand the
iDigi API will be explained.
20
4. Remote control example
There are two applications that run on the embedded device for showing how to remotely control
an embedded device using iDigi: iDigiManager and iDigiLED.
iDigiManager is a very tiny application that controls the agent on the device that is responsible for
establishing the connection to iDigi Manager Pro, and allows for remote management of the device.
iDigiLED is an application based in iDigiManager, that adds custom user commands, to
demonstrate how to add custom functionality for remote management via Web Services. The
purpose of this application is to allow remote control and monitoring of the device’s hardware (user
LEDs on the development board) through the Internet.
This last example combines a device application itself (iDigiLED) written in C that runs on the
embedded device, and a client application (iDigiLedDemo) written in JAVA that runs on a desktop
PC.
Both applications (iDigiManager and iDigiLED) launch the client that
establishes the connection to iDigi, therefore they should not be
running at the same time.
4.1. Device application (iDigiManager)
This application runs on the embedded device and calls the iDigi start function which allows remote
control of the Device from within the iDigi Manager Pro user interface (http://developer.idigi.com).
4.1.1. Building the application
After installation you need build and add the application in your project.
In the catalog view go to Third Party/Digi/iDigi/Apps/Samples and select the iDigi Manager item.
This will add the iDigi Manager application to your image:
In the solution explorer view within Visual Studio, go to:
PLATFORM\COMMON\SRC\SOC\COMMON_DIGI\APPS, then right click in the iDigiManager
folder and select Build.
4.1.2. Transferring the application to the device
To create an image, go to build > Make Run-Time Image.
Please verify that iDigiManager.exe is inside your new image.
Run the Windows CE kernel you built in your device.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65

Digi ConnectCore 9M 2443 Quick start guide

Category
Operating systems
Type
Quick start guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI