Indy Profile Update sample application

Updated: January 12, 2010


Description:

This document details the use of the sample Profile Update
( profile_update.exe ) program included with the Indy RFID SDK
source distribution.

The Profile Update program allows the user to load a new 'Link Profile'
into an Indy system.



Source Code:

The source code for the Profile Update sample can be found within the
SDK source distribution under the directory:

host/rfid_library/samples/profile_update

In addition to requiring  the SDK source for compilation,
the Profile Update sample must also have access to the directory:

host/rfid_library/samples/shared



Binary Code:

The SDK source distribution does not contain a sample binary and it
is up to the user to perform compilation of the code based on their
platform.  The easiest way to accomplish this is by following the
detailed installation and compile instructions provided in:

Indy_Host_Library_SDK_Getting_Started_Guide

A successful build of the SDK source distribution will result in an
executable being produced for the Profile Update program.  The
executable file will be named:

profile_update.exe

It will be located in the directory:

host/rfid_library/samples/profile_update



Using the Profile Update program:



1) Profile Description File Format

The Profile Update program utilizes a simplified XML style format that
allows the user to specify the MAC and Link Profile registers to store 
or modify when uploading a new Link Profile to the Indy system.

The XML file format for MAC register values is:

<mac>
     <reg>
        <loc>     [register location] </loc>
        <val>     [register value ]   </val>
        <comment> [ any text ]        </comment>
     </reg>
     ... additional register(s) information ...
</mac>

Note that it is not necessary to create a new <mac> ... </mac> block
for each new register location and value pair i.e. any number of
registers may be specified within a single MAC block.

The loc and val blocks may be given as decimal or hexadecimal values.
For the given numbers to be interpreted as hexadecimal they must be
( individually ) prefixed with either a 'x' or a '0x'.

Currently the MAC registers of interest when uploading a new Link
Profile are 0xB62 through 0xB77 inclusive.  


The XML file format for Link Profile register values is:

<xcvr>
     <reg>
        <loc>     [register location] </loc>
        <val>     [register value ]   </val>
        <comment> [ any text ]        </comment>
     </reg>
      ... additional register(s) information ...
</xcvr>

All formatting and other restrictions are identical to those found
under the MAC register section with the exception that the list of
potential registers of interest is not restricted.

A complete set of sample files named 
   rftc_profile_<num>_<device>.xml

(where <num> is the profile number (0-3) and <device> is either
r1000 or r2000 for the respective Indy Transceiver) are included with 
the sdk source distribution. These files are examples and represent 
the current default profiles 0-3.
 


2) Sample Application Command Line Parameters

There are four command line arguments accepted by the sample
application, two that are required and two that are optional.
If not arguments or any invalid arguments are provided, the usage
help is displayed.  Detailed descriptions of these arguments
are:



-s

The -s parameter indicates the serial number of the target radio for
the operation.  This parameter is optional and if not given the
application will target the first radio it discovers attached to the
host system.  If the -s parameter is specified, the application will
attempt to find a radio attached to the host system with a matching
serial number and use that as the operation target.

The program will exit if:

The -s parameter IS NOT specified and no radios are found to be
attached to the host.

The -s parameter IS specified and 1) no radios are found to be
attached to the host,  2) no radios are found attached to the host
with a serial number matching the one specified and finally 3) if
more than one radio is found with a serial number matching the one
specified.

-oem 

The -oem parameter indicates the input profile should be committed 
to OEMCFT storage.  The transceiver device version and stepping value 
are specified as VER.STEP argument to -oem, and are used to configure
the version and step information written to the corresponding OEMCFG 
profile header.  As noted below, the runtime link profiles are not 
modified when -oem is specified.


-p

The -p parameter is REQUIRED and specifies the Link Profile the user
wishes to update.  Valid values are in the range 0 through 5
inclusive.  After the profile is loaded, the specified profile is
selected.  Note that if -oem is specified the profile number is 
restricted to values 4-5 (which define the custom profiles) and as 
noted below must be subsequently selected after the system is reset.
If the -p parameter is not specified or the value given
is not within the allowed range, the program will exit immediately.

-f

The -f parameter is REQUIRED and specifies the XML file, as previously
described, containing the Link Profile information to upload to the
the target radio.

The -f parameter may fail for any number of reasons including ( but
not limited to ) the given file could not be located, incorrect file
permissions, incorrect file ( XML ) formatting found, invalid values
found within the file e.g. specifying a loc or val field using hex
characters a thru f without prefixing with x or 0x, and communication
failure with the target radio.



3) Additional Notes

If a radio has a Link Profile updated, the update will persist
ONLY while the radio remains powered up and NO reset operation is
performed, unless -oem is specified.  If a power cycle or MAC reset 
operation is performed, the update is lost and a new update must be 
performed.  

In contrast, if -oem is specified, the update is made only to the 
OEMCFG storage and is not reflected in the runtime link profiles.  In
this case, a power cycle or MAC reset is required for the new values
to be loaded from OEMCFG to the runtime link profiles, and the 
corresponding link profile must then be selected.

If the sample application fails during an update operation, it is
suggested that the user consider the target radio to be in an
indeterminant state and that a power cycle / reset operation be
performed before proceeding further.










