Indy OEM Tool sample application

Updated: January 27, 2010


Description:

This document details the use of the sample OEM Tool
( oem_tool.exe ) program included with the Indy RFID SDK
source distribution.

The OEM Tool program allows the user to read, write, 
save and restore OEM Configuration Area within an Indy system.
The OEM Configuration Area and its contents are described in 
detail in the Indy_Firmware_Datasheet.  The OEM Tool program
is typically used for configuring Indy RFID Reader devices 
as part of the manufacturing process and potentially prior to 
device deployment.  The OEM Tool is also useful for saving a 
reader device's OEM Configuration data prior to updating the
firmware.


Source Code:

The source code for the OEM Tool sample can be found within the
SDK source distribution under the directory:

host/rfid_library/samples/oem_tool


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 OEM Tool program.  The
executable file will be named:

oem_tool.exe

It will be located in the directory:

host/rfid_library/samples/oem_tool


Using the OEM Tool program:

1) Command Line Arguments and Command Line Help

To print the OEM Tool command line help screen, just enter the 
executable name with no arguments, and the following 
help will be displayed.

oem_tool help:
--read
   Primary command.
   Read a single oem configuration are entry
   use: --read <address>
   Example: --read 0x1
   All args must be a 32bit hex values

--write
   Primary command.
   Write a single oem configuration area entry
   use: --write <address> <data>
   example: --write 0x1 0xA5A55A5A
   All args must be a 32bit hex values

--readrange
   Primary command.
   Read a range of oem configuration entries
   use: --readrange <address> <number_to_read> [--outputfile <textfile_path>]
   The optional --outputfile arg can be used to output the read entries
   to a formatted text file that can then be used with the --writerange command
   Example: --readrange 0x1 0x5
    In the example, 0x5 oem configuration entries would
    be read starting at oem address 0x1.
   All integer args must be a 32bit hex values

--writerange
   Primary command.
   Write a range of oem configuration entries
   use: --writerange <textfile_path>
   example: --writerange <./write_data.txt>
   

--testmode
   Command modifier.
   Causes the application to run in test mode and not actualy open the radio.
   This is used for developer unit testing of this app.
   

--listradios
   Primary command.
   List radios currently connected to the host system
   use: --listradios
   No arguments to this command
   

--radio
   Command modifier.
   Specifies which radio to connect to
   use: --radio <radio_number>
   example: --radio 2
     In the example, the second radio (as reported by
     the --listradios command) will be used
   The single integer arg must be a decimal value less than
   or equal to the highest radio_number reported by the
   listradios command


2) Text File Format

The text file format read by the --writerange option and written by the 
--outputfile option, constains simple line-based records with each 
record containing comma-separated fields.

The general format is as follows:

# comment_line
<record_type_value>,<record_field_1>,...,<record_field_n><EOL>
  
where 
  comment_line 
     If the first non-whitespace character of a line contains a #, it is 
     considered a comment line and is ignored by oem_tool. When oem_tool 
     creates a file, it sometimes generates informative comment lines 
     to ease human readability.
     
  record_type_value
     This is a record type indicator value and is used to distinguish 
     one record type from another.  single_entry is the only valid value 
     at this time. 
     
  record_field_x
     Each record type contains one or more record fields.  The 
     single_entry record type contains two record fields specified
     in hex format, the first field is the OEM Configuration address
     and the second field is the data for that address.
     
  EOL
     This is the end-of-line sequence. Its format varies depending on 
     the host operating system. On a Windows-based system, the EOL is 
     comprised of a carriage return and line feed. 
     
Example Record:
    single_entry,<oem_address_32bit_hex>,<oem_data_32bit_hex><EOL>

as in
    single_entry,0x0000008E,0xF00DD004    
  











