DeviceManagement-enabled devices use XML to perform all configuration operations. Any item configurable with Honeywell Enterprise Settings can be set and retrieved with the DeviceManagement configuration APIs.
XML schema for the computer can be found by using Honeywell Enterprise Settings in the SmartSystems console as follows:
You can copy and paste the schema into an XML file, and change settings as appropriate to produce your own configuration file.
An example file (DeviceSettings.xml) is located in Device Management Resource Kit/Examples. The file provides example settings for most configuration items available on Intermec computers.
The xml schema definition files can be found in the \windows directory of a device. The master schema is named itcReaderDataModel.xml. It includes other xml files that define all the configuration items you see in the Intermec Settings tree.
The XML defining SmartSystems configuration items uses a simple but powerful definition to define individual fields in a basic form.
<Subsystem Name= "abc"> <Group Name="abcd"> <Field Name="abcdef"></Field> </Group> </Subsystem>
The <Subsystem> groups a set of configuration items (for example, Communications, DataCollection, SmartSystems information, and so on). A <Subsystem> may contain multiple <Group> elements.
The <Group> elements group logical fields together within a Subsystem. A <Group> element may contain individual <Field> elements or other <Group> elements.
The <Field> element defines an individual configurable item. The <Field> element "Type" attributes defines the type of data that is valid for the given configuration item. Valid types are:
The XML can be stored in a file and used in the ConfigFromFile method (ITCSSConfigFromFile for C++, or ITC SSConfigFromFile for the web API) to get or set the configuration items. The XML between the <DevInfo></DevInfo> tags can be used directly in the get and set methods, to get or set the configuration item.
Do not use the <DevInfo> tags if using the ITCSSGet and ITCSSSet methods. Use only the XML between the tags.
For example, the following XML schema applies to the Country field:
<?xml version="1.0" encoding="UTF-8" ?> <DevInfo Action="Set" Persist="true"> <Subsystem Name="SS_Client"> <Group Name="Location"> <Field Name="Country">USA</Field> </Group> </Subsystem> </DevInfo>
Use this XML in ITCSSSet:
<Subsystem Name="SS_Client"> <Group Name="Location"> <Field Name="Country">USA</Field> </Group> </Subsystem>
You can get and set one or more configuration items using the ITCSSGet and ITCSSSet methods.
In this example, the following XML gets or sets the beeper volume and the number of good read beeps in one call to ITCSSGet or ITCSSSet.
<Subsystem Name="Device Settings"> <Group Name="Beeper"> <Field Name="Volume">2</Field> <Field Name="Number of good read beeps">1</Field> </Group> </Subsystem>
When using ConfigFromFile, your configuration XML must be wrapped in a <DevInfo> tag, which specifies what action (get or set) you want performed on the XML.
In this example, the XML sets the Code 39 options for the default scanner. The Action attribute in the <DevInfo> tag specifies a set.
<?xml version="1.0" encoding="UTF-8"?> <DevInfo Action="Set"> <Subsystem Name="Data Collection"> <Group Name="Scanners" Instance="0"> <Group Name="Symbologies"> <Group Name="Code 39"> <Field Name="Enable Code 39">1</Field> <Group Name="Options"> <Field Name="Full ASCII Conversion">0</Field> <Field Name="Start/Stop transmission">0</Field> <Field Name="Start character">2</Field> <Field Name="Verify check digit">0</Field> <Field Name="Transmit check digit">0</Field> <Field Name="Reading range">0</Field> <Field Name="Reading tolerance">0</Field> <Field Name="Length mode">0</Field> <Field Name="Length 1">3</Field> <Field Name="User defined symbology ID">B1</Field> </Group> </Group> </Group> </Group> </Subsystem> </DevInfo>
The XML in the next example gets the same information. The returned XML contains the values of the fields specified in the same format as in the set example.
<?xml version="1.0" encoding="UTF-8"?> <DevInfo Action="Get"> <Subsystem Name="Data Collection"> <Group Name="Scanners" Instance="0"> <Group Name="Symbologies"> <Group Name="Code 39"> <Field Name="Enable Code 39"></Field> <Group Name="Options"> <Field Name="Full ASCII Conversion"></Field> <Field Name="Start/Stop transmission"></Field> <Field Name="Start character"></Field> <Field Name="Verify check digit"></Field> <Field Name="Transmit check digit"></Field> <Field Name="Reading range"></Field> <Field Name="Reading tolerance"></Field> <Field Name="Length mode"></Field> <Field Name="Length 1"></Field> <Field Name="User defined symbology ID"></Field> </Group> </Group> </Group> </Group> </Subsystem> </DevInfo>
You may get an error when trying to get/set configuration information. If an error occurs, you get an error code back from the API, and you need to parse the XML to determine which field is in error. The majority of errors are defined in smartsyserrors.h or in the ITCSSErrors.Net class.
In this example, the XML is sent to determine if Microsoft or Funk security is running on the device:
<Subsystem Name="Funk Security"> <Group Name="802.11 Radio"> <Field Name="ZeroConfig1"></Field> </Group> </Subsystem>
ITCSSGet returns an error:
<Subsystem Name="Funk Security"> <Group Name="802.11 Radio"> <Field Name="ZeroConfig1" Error=”822B0003”></Field> </Group> </Subsystem>
You need to check the second parameter in the call (the returned XML) to get the error. In this case the name of the <Field> tag is incorrect and should be "ZeroConfig".
Honeywell Mobility SDK for Windows: Device Management API Reference