Intermec Home

How to Buy | Partner Login


Developers Forum

Showing results for 
Search instead for 
Do you mean 
Reply
Moderator
AdamH
Posts: 32
Registered: ‎January 27 2009

Basic device configuration using XML

[ Edited ]

I've been getting a lot of requests for this type of answer.  The majority of this is already out there but this will put it in one spot. I'm getting ready to publish this as a formal answer on knowledge central and figured I would throw it to the community first.  This is the first in what I hope will be multiple answers covering basic configuration, automating install of settings at clean boot via _straightforwardness and finally advanced stuff like cellular provisioning files and the like.   Let me know what you think

 

 This document is also published in knowledge central Techncal Bulletin 13656

 

On the 70 series as well as most other Intermec handhelds running wm6.1 there are many great features available through the Smart Systems client. If you browse the contents of the Smartsystems directory on the device there is a folder \SmartSystems\SSConfigDir. This folder is where the magic happens in regards to XML processing. This folder is monitored by the Smart systems reference client that is running in the background at all times. When it finds a XML file in the \SScConfigDir it will processes it. Most commonly this will include working with the file systems, modifying the registry, rebooting the device or launching processes. The other big thing this does is allow you to modify almost any device setting with a settings.xml file. As you can imagine when you start combining a few of these items together such as configuring the device, copying some cab files to the \cabfiles folder to install at boot, and finally warm boot the device it looks pretty attractive.


We will not spend a great deal of time explaining what XML is however here is a link that explains it pretty well.

http://www.w3schools.com/xml/default.asp

There is a ton of literature out there on the web as well as developers on our forum at community.intermec.com that can do a lot more with this than I am covering here. A search on the forum should provide you with quite a bit of options as well as support from the com...

 

As we have discussed above, the functionality of the SSrefClient loaded on your device allows your device to process many different functions by simply placing a .xml file into the \SmartSystems\SSConfigDir directory on your Intermec handheld computer. Here we have provided some of the most popular device functions that are able to be executed via XML. Some of these examples, such as the warm boot and clean boot, are good to go by themselves and require no modifications. The majority of them will need to be edited to use them correctly in your environment.

 

Also - As a teaser into some of the functionality that users can gain from this I'll provide a few special examples from the brains in Intermec engineering. Create a settings.xml on the device without smart systems and launch pword.exe to display the contents of \SmartSytems\SSSubsystems\SSMessage.ini.

 

So look at the files, pieces them together and keep the thread rolling!

 

WarmBoot.xml
Device executes a warm boot.

 

CleanBoot.xml
Device executes a clean boot.

 

ICCULocalBackup.xml
This launches the iccu.exe executable and creates \myLocalSettings.xml on the root of the device which contains all of the current settings of the handheld. This file can then be altered and renamed to settings.xml.
Note that it takes around 40 seconds for this process to complete. At launch you will see the device show the windows pinwheel until it completes. When this finishes you will find all Intermec Settings stored in \myLocalSettings.xml on your device.
This file has the same limitations as a backup from Smart Systems. Specifically it does not capture all wireless network settings for security reasons. Users will still need to manually enter security keys such as the wep key or WPA passphrase OR they can set the key in the XML as described in

"Wireless_setup.xml"

 

Wireless_setup.xml
Configures device for a wireless network named "YourCustomerSSID" with a wep key of "YourWepKey001". If you look at this file all that was done was to remove the "Encrypt="binary.base64" from that specific line of the XML and put in our wep key. The same thing can be done with a WPA PreSharedKey. Users should note that the keys in these files are CLEAR TEXT and in no way encrypted which may or may not pose a security risk depending on your security policy.

 

FileCopy.xml
Creates a copy of the file \myLocalSettings.xml in \LabCopyFileExample.xml
Files can also be renamed when copying.

 

FileMove.xml
Moves \LabCopyFileExample.xml to \My Documents\LabCopyFileExample_move.xml
Files can also be renamed when moving.

 

FileDelete.xml
Deletes the file \My Documents\LabCopyFileExample_move.xml

 

RegSetValue.xml
Create HKEY_LOCAL_MACHINE\Software\Test and sets a TestItem1 REG_SZ and a TestItem2 DWORD of 500

 

RegDeleteValue.xml
Inside HKEY_LOCAL_MACHINE\Software\Test deletes the key TestItem1

 

RegDeleteKey.xml
Deletes HKEY_LOCAL_MACHINE\Software\Test

 

SSStartProcess.xml
This accesses the file system, starts \pword.exe and then displays the data contained in \SmartSystems\SSSubsystems\SSMessage.ini in Pocket word.

 

This should hopefully get you well on the way to configuring your device with a few simple xml edits.  

Adam Hoge
RFID engineering
Intermec
2forJL
Posts: 55
Registered: ‎January 15 2010

Re: Basic device configuration using XML

I would recommend elaborating a bit more about how the attribute Encrypt="binary.base64" is used by Smart Systems to project the values of certain fields.  Rather than glossing over the example xml which is storing protected field values in plain text.

 

Also, WEP encryption is no longer recommend for *any* infrastructure Wi-Fi connections (though it is sometimes the only alternative for Ad-Hoc Wi-Fi connections).  A WPA2-PSK example would be a better idea.

 

-JL

Moderator
AdamH
Posts: 32
Registered: ‎January 27 2009

Re: Basic device configuration using XML

[ Edited ]

I definetly agree with you on both levels.  Customers should not use WEP for wireless security as it has been compromised for many many years.  Also the keys in these files being stored on the device in clear text is not a great idea in the long term.  The data in that file is encrypted for a very good reason.  That being said these examples do sacrifice security in the interest of ease of deployment. It's a tradeoff.

 

 A more secure way to do this would be to dock the device using smartsystems, Backup the device settings onto the server and then go into the backup and alter the wireless security details.  Save that file and then export to SD card to a folder and the key is encrypted.

 

I've gone anead and crafted up a quick example of both where SSID is WPA2PSKExample and the WPA2psk key is thequickbrownfox.  They were created with smartsystems to get the encryption right (same encryption as the SSref client) and then I just edited out the encryption flag to get the clear text (unencrypted) version.

 

This more secure method took me only minutes to do using my smartsystems server and I would recommend users do the same in the interest of security. 

 

Adam Hoge
RFID engineering
Intermec SE
grahamdmg
Posts: 1
Registered: ‎November 9 2011
0

Re: Basic device configuration using XML

How would you setup multiple "startprocess" groups in one xml to process sequentially - example:  one xml to start autocab to install a cab file, wait for install completion, then run the installed executable?  Commands in attached xml appear to work, but the call to execute Launcher appears to happen before the Launcher cab file is installed.

Intermec Expert
hjgode
Posts: 2,266
Registered: ‎January 29 2009

Re: Basic device configuration using XML

Here is how to launch different executables in a sequence using an autoconfig.xml (Scan2Go) and a sstransfer.xml:

 

<?xml version="1.0"?>
<Devices>
    <Device Type="C" Family="*" Model="7*" Boot="Warm">

                <Files SrcDir="\Flash File Store\UserAutoInstall">
<!-- Keyboard remapping , see log at root -->
                        <File SrcName="" DestName="KeyMapImport.exe" DestDir="\Flash File Store\UserAutoInstall" Run="true"  WAIT="true" CmdLine="\Flash File Store\UserAutoInstall\ck70_largeAlpha.xml" />
                        <File SrcName="" DestName="KeyMapImport.exe" DestDir="\Flash File Store\UserAutoInstall" Run="true"  WAIT="true" CmdLine="\Flash File Store\UserAutoInstall\ck70_num.xml" />
                        <File SrcName="" DestName="KeyMapImport.exe" DestDir="\Flash File Store\UserAutoInstall" Run="true"  WAIT="true" CmdLine="\Flash File Store\UserAutoInstall\cn70_alpha.xml" />
                        <File SrcName="" DestName="KeyMapImport.exe" DestDir="\Flash File Store\UserAutoInstall" Run="true"  WAIT="true" CmdLine="\Flash File Store\UserAutoInstall\cn70_num.xml" />
                        <File SrcName="" DestName="KeyMapImport.exe" DestDir="\Flash File Store\UserAutoInstall" Run="true"  WAIT="true" CmdLine="\Flash File Store\UserAutoInstall\cn70e_alpha.xml" />
                        <File SrcName="" DestName="KeyMapImport.exe" DestDir="\Flash File Store\UserAutoInstall" Run="true"  WAIT="true" CmdLine="\Flash File Store\UserAutoInstall\cn70e_num.xml" />
                </Files>
    </Device>
</Devices>

<!-- ##################################### -->

<?xml version="1.0"?>
<AutoConfig> 
  <Files>
             <File 
                src="ftp://192.168.128.5/s2l/dpag/itcRebootDevice.exe" 
                Dest="\Flash File Store\UserAutoInstall\itcRebootDevice.exe"
                FileId="3.00"
                Run="\Flash File Store\UserAutoInstall\itcRebootDevice.exe" 
                WAIT="false" 
                CmdLine="" 
            />

  </Files>
</AutoConfig> 

Look at the WAIT attributes.

 

regards

 

jsoef

.....................Don't be lazy, give KUDOS........................
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Intermec SE
jsmith
Posts: 13
Registered: ‎February 4 2009
0

Re: Basic device configuration using XML

I noticed that on the CK3 the ICCULocalBackup.xml file will not work.  All it does is open Intermec Settings (just tried it)--- no output file.

Found this to be true when using a .lnk to run Iccu also:

       512#"\windows\iccu.exe" "/P\Windows\itcReaderDataModel.xml" /ip=127.0.0.1 "/B=\localsettings.xml"

 

Has anyone else tried this and found a workaround?

Some customers are opposed to using SmartSystems and having a utiltiy on the device to export the configuration is valuable.

 

Thanks

Intermec Expert
hjgode
Posts: 2,266
Registered: ‎January 29 2009

Re: Basic device configuration using XML

This may happen on the one or other device depending on the SSPB/IVA version. The arguments may vary and therefor I did a tool in the past to read out the arguments from registry and then launch the dump command. The tool was called ICCUdumpXml: see http://community.intermec.com/t5/General-Development-Developer/C-Class-demonstrating-the-use-of-the-...

 

regards

 

Josef

.....................Don't be lazy, give KUDOS........................
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Intermec SE
jsmith
Posts: 13
Registered: ‎February 4 2009
0

Re: Basic device configuration using XML

The sample xml to change a registry value was provided (example below).  It shows changing two fields in two different locations.  Each change also has a second line that gives the type. 

    If you wanted to make multiple entries in a single subfiled, do you have to create a group for each individual field that is being changed?

    Does each item also require a seperate line for the "Type"?

 

<?xml version="1.0" encoding="UTF-8"?>

<DevInfo Action="Set">

   <Subsystem Name="SS_Client">  

       <Group Name="Registry"  Instance="Software\Test">   

           <Field Name="TestItem1">This is a REG_SZ Item</Field>   

           <Field Name="Type">REG_SZ</Field>  

       </Group>  

       <Group Name="Registry"  Instance="Software\Test">   

           <Field Name="TestItem2">500</Field>   

           <Field Name="Type">REG_DWORD</Field>  

       </Group>

   </Subsystem>

</DevInfo>

 

Thanks

Contributor
dspahn
Posts: 10
Registered: ‎August 7 2012
0

Re: Basic device configuration using XML

I'm having a bit of a challenge. I have a sstransferagent.xml that copies CAB files of the SD card to the internal flash memory's Cabfiles folder, and I have an autocab.dat that lists them in the proper install order. The only problem is that the end user has to keep clicking the Install and OK buttons alternately to proceed through installation. I looked up wceload, but I'm not sure how to run it. What is the best way to run each CAB silently so there is no user intervention required?

Intermec
2forJL
Posts: 55
Registered: ‎January 15 2010

Re: Basic device configuration using XML

wceload will likely work. e.g the command line: 

"wceload /noui <cab to install>"

will select the default options instead of prompting.