Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

identiTAG Wireless Controller Manual

Model: IWC900-1-1-GB-XX

identiTAG 2012 © Issue 2 page 1/18


AMENDMENT
AMENDMENT RECORD
ISSUE DATE CHANGE NAME
1 2012/03/28 First Draft Release SL Cowley
2 2012/07/27 Remove Guarantee/Warranty Section, Reformat A Boutelje

identiTAG 2012 © Issue 2 page 2/18


TABLE OF CONTENTS
IMPORTANT NOTICE ......................................................................... Error! Bookmark not defined.
GUARANTEE / WARRANTY ................................................................ Error! Bookmark not defined.
AMENDMENT .................................................................................................................................. 2
INTRODUCTION .............................................................................................................................. 4
UNIT MODES .................................................................................................................................. 4
SOFTWARE AND HARDWARE TEST SETUP ................................................................................... 5
1 HARDWARE SETUP.............................................................................................................. 5
1.1 Interface Connections..................................................................................................... 5
2 SOFTWARE SETUP .............................................................................................................. 8
2.1 Screenshots ................................................................................................................... 8
2.2 Specific Interface Instructions ....................................................................................... 12
2.3 General Interface Instructions ....................................................................................... 14
3 SOFTWARE CODE EXCERPTS ........................................................................................... 15
3.1 General Excerpts .......................................................................................................... 15
3.2 Networking .................................................................................................................. 15

identiTAG 2012 © Issue 2 page 3/18


INTRODUCTION
The IWC (identiTAG Wireless Controller) collects information from both Nozzle and Vehicle Units via
RF (radio frequency). Depending on the configuration of these units, fueling authorizations may be
issued. The IWC will always output authorizations using a magnetic stripe compatible interface to a
Hectronic fuel computer. The user may opt for these authorizations to be additonally pushed to a
Host over a USB / RS-232 / RS-485 or Ethernet interface. Futhermore, these interfaces may be also
used to configure or firmware upgrade the IWC and its IWI (identiTAG Wireless Interface) plugin
module.

This document describes how to setup these various interfaces through the use of the supplied
"identiTAG IWC Interface" Windows application software as well as the basic operation of the unit.

UNIT MODES
The IWC operates in a multitude of output modes, most of which can be run concurrently over a
single communicate interface (USB/TCP etc.).

Tha various modes are described as follows:

• Learn Mode
o The IWC can keep a list of nozzles used for authentication purposes
o Nozzle Suppression Mode must be activated
• SPP Mode (Serial Protocol Packet)
o Authenticated Output (Only learnt nozzles are pushed when Suppression enabled)
o _01022002,01122867,0111122223330001000001,17040024_1684
• MMP Mode (Magstripe Mirroring Packet)
o Authenticated Output (Only learnt nozzles are pushed when Suppression enabled)
o card=01111 cust=2222333 veh=0001 rep=2 dataId=1002 000001122867
• RRP Mode (Raw RF Packet)
o The Raw packet is transmitted directly
o Unauthenticated Output
o E011223317010024 000000000000 000000000000 00039559 0000 73CC
• DP Mode (Diagnostic)
o Extra information is displayed in order to help diagnose potential issues
Timestamps
RSSI (estimated signal strength)
Nozzle and Vehicle Unit Count
Nozzle type
Failure reasons (authentication, CRC)
• Nozzle Suppression Mode
o Enables Authentication for SPP and MMP protocols (RRP remains unaffected)

identiTAG 2012 © Issue 2 page 4/18


SOFTWARE AND HARDWARE TEST SETUP
1 HARDWARE SETUP
This section describes the hardware requirements needed to communicate to the receiver via a
specific interface. The IWC contains a module called an IWI (identiTAG Wireless Interface) which
receives the RF information.

Figure 1 : IWC Interface Connections

1.1 Interface Connections


1.1.1 RS
RS--232 (DEFAULT)
1) The definitions for this header are listed in the following table:

DB9 Acronym Full Name Direction


#
3 TxD Transmit Data PC-to-Receiver
2 RxD Receive Data Receiver-to-PC
5 GND Signal Ground N/A

identiTAG 2012 © Issue 2 page 5/18


Once the RS-232 wiring has been completed, and the other end of this cable connected to the COM
port of a PC, one can test this link by simply going to "Start->All Programs->Accessories-
>Communications->Hyper Terminal" and configuring the connected COM port connection for
19200,8,N,1 with no flow control. On power-up of the IWC receiver, the Status LED will come ON
during the boot period, after which the IWC firmware will be started (indicated by the Status LED
flashing roughly every second). After 10 seconds of the IWC firmware running, the following text
message (unit specific) should be outputted:

Figure 3 : Hyperterminal Display

If no text is displayed after the 10 second wait period, disconnect power to the IWC unit and try
swapping the TxD and RxD pin connections of the RS-232 cable, and repeat the test procedure given
above.

Please ensure that the FIFO buffers for the COM port used have been disabled. This can be done by
going to “Start->Control Panel->System”. On the “Hardware” tab, click on the “Device Manager”
button. Under “Ports (COM & LPT)” double click on the desired COM port, and go to the “Port
Settings” tab. Click the “Advanced...” button, untick the “Use FIFO buffers” and press “OK”.

identiTAG 2012 © Issue 2 page 6/18


1.1.2 RS
RS--485
The RS-485 interface can be located on the IWC PCB, next to the power input.

The definitions for this header are listed in the following table:

Header Full Name Direction


A Inverting Data Bi-directional
B Non-inverting Data Bi-directional
ETH Earth

Please consult the “User/Installation Manual” for more information on the earth connection.

1.1.3 USB
The USB connection simply requires a “USB-to-mini B” cable (as shown below), which gets
connected from the PC's USB port to the mini-B USB connector location on the IWI PCB.

Figure 4 : USB-
USB- to-
to - mini B cable needed for USB communications

In addition, the hardware of the IWI (IWC) cannot support reception of RS-232 and USB data
simultaneously. As a result the USB selection needs to be turned ON using the DIP Switch, if any
commands are required to be sent to the unit. If only pushed (fueling) data is required over USB
and/or RS-232, this DIP can be ignored since all pushed data will be transmitted to both USB and
RS-232 interfaces simultaneously when the Host output is set correctly on the DIP Switch

1.1.4 ETHERNET
Like USB, all that is required to connect the receiver to the Ethernet is a cable, in this case a RJ-45
cable.

Figure 5 : Ethernet RJ-


RJ - 45 Cable
identiTAG 2012 © Issue 2 page 7/18
2 SOFTWARE SETUP
This section describes how to use the "identiTAG IWC Interface" Windows application test software to
configure/debug a particular type of communication interface.

Once the test software has been installed, run it by clicking on the “DHRtest.exe” file or through the
"Start->All Programs->identiTAG->IWC Test Interface” shortcut.

Note: The software may change without this document being updated. Most changes will be minor
and shouldn’t detriment the understanding of the software.

This section will be split into sub-sections described below

• Screenshots
o To be used as references for the instructions.
• Specific Interface Instructions
o The different communication mediums will require unique setups.
• General Interface Instructions
o These will be common features which aren’t reliant on any specific communication
medium.

2.1 Screenshots
Screenshots

Figure 6 : Configure/Status

identiTAG 2012 © Issue 2 page 8/18


Figure 7 : Comms

Figure 8 : Wireless Parameters

identiTAG 2012 © Issue 2 page 9/18


Figure 9 : Unit Parameters
Parameters

Figure 10:
10 : Network Parameters

identiTAG 2012 © Issue 2 page 10/18


Figure 11:
11 : Network Search

Figure 12:
12: Firmware Update

identiTAG 2012 © Issue 2 page 11/18


2.2 Specific Interface Instructions
2.2.1 RS
RS--232 (Default
(Default)
Default)
By default, this application will try and open COM1 (or the last working COM port). If a different COM
port was used, click on the “Comms” tab, and press the “Close COM1” button, as shown in Figure 7
COM Port Selection. A different COM port can be selected from the drop down list.

Note: This available port list is generated whenever you click on the drop down button. If there are any
issues with conflicting ports you may need to change the port in device manager and restart the
computer.

Select the COM port to which the IWC was connected on the PC, and press the “Open COMx”
button. If successful, the status box at the bottom right of the application will change from RED to
GREEN - indicating that the selected port was successfully opened.

2.2.2 RS
RS--485
RS-485 cannot be connected to a PC directly, however, devices do exist to convert/adapt RS-485 to
RS-232 (which beyond the scope of this document – but note that Impro Technologies can supply
such a device, if required). When such a device is used, the same procedure given in Section 2.2.1
can be followed to make use of RS-485 as a virtual COM interface within the test software.

Figure 13:
13 : RS-
RS- 485 to RS-
RS- 232 converter.

2.2.3 USB
The USB connection works similar to RS-232, except that the USB-to-mini B cable is required to be
connected from the PC to the IWC (via the IWI) prior to starting up the Windows test application
software. This is required because the IWI consists of an onboard USB-to-serial converter, which
Windows only detects and enumerates when plugged into the PC.

Please also note that even though the IWI can be powered through the USB, the IWC can only be
powered externally and therefore will not boot.

Please ensure that the DIP switch mention in section 2.3 is set to the ON position, otherwise the unit
will ignore all commands sent to it – even if the correct COM port is selected and opened within the
test application.

2.2.4 ETHERNET
There are two different types of setup for Ethernet: Dynamic IP address assignment and manual IP
address assignment, depending on the configuration of the customer network.

Essentially, the IP address of the IWC unit needs to be known at all times, in order to communicate to
it through the "identiTAG IWC Interface" Windows application software. If a DHCP server is used to
assign all the network parameters to the unit automatically, it is recommended that the IP address

identiTAG 2012 © Issue 2 page 12/18


assignment be fixed and reserved for that unit, based on its unique MAC address. Reserving IP
addresses on the DHCP server is beyond the scope of this document.

The MAC address of the unit can be worked out by looking at the supplied sticker (or read from
Hyper-terminal if the Host output protocol is set to RS-232 or USB, and the pushed boot data read
on power-up, as given in Figure 3). A command can also be sent to the unit to display the IP Address
(See the protocol document). An example of such a supplied sticker is shown in the picture below:

Figure 14:
14 : MAC address determination
determination from supplied sticker

If one takes the first fix address (FixAdd) and prepends 001A to this number, the 6-byte (12 digit) MAC
address of the unit will be determined, which in this instance will be 00:1A:6E:00:30:25.

The IP Address of the IWC must be entered


entered in the “Network Parameters” tab in the IWC IP
Address boxes.

2.2.4.1 Finding the IWC IP Address


If there is no access to the network settings and the IP address cannot be looked up there are 3
methods to try and detect the IP Address:

• Try and ‘ping’ the IWC unit


o In the “Network Search” tab (Figure 11) type in the unit serial number (S/N in Figure 14)
and click search.
o If the unit was found, the IP address will be displayed.
o Note:
Note You can use the normal windows command line (cmd.exe) to search for an
IWC. Using Figure 14 as an example: “Ping IWC0250196” where the numbers are the
last 7 digits of the serial number.
• Using an external Network Search Application
o The “identiTAG IWC Interface” Software uses an external application (SoftPerfect©
Network Scanner) to scan the network for all IP addresses and their relevant MAC
addresses with an IP range.
o Simply enter in the IP range and click search. This may take a few moments
depending on the range.
o All IP addresses will be listed and can then be filtered by MAC address.
• Using Serial/USB interface
o As mentioned in before, if serial or USB is used then it is possible to query the IWC for
its current IP address.

2.2.4.2 Fix the IP Address


The unit is factory defaulted to be setup from a DHCP server. Therefore, once the DHCP server has
been configured to reserve a fixed IP address to the IWC, the unit may simply be plugged onto IP
network via the standard RJ-45 Ethernet cable (given in section 2.4), and powered up.

identiTAG 2012 © Issue 2 page 13/18


If a fixed IP address is required to be assigned to the unit manually, communication to the unit is
required first via come other means (e.g. RS-485, RS-232 or USB). Once a communication link has
been established to the unit from a PC running the "identiTAG IWC Interface" Windows application, IP
network configuration commands can be sent to unit through the “Network Params” tab, as shown
below:

The first task is to disable DHCP. This can be done by clicking on “Get DHCP Settings”. The “Use
DHCP?” box will become ticked, and the “Timeout” value will become populated with 10 seconds.
Untick the “Use DHCP?” box and press the “Set DHCP Settings” button to disable DHCP. Note that
the “Get DHCP Settings” button still needs to be pressed, even if DHCP has already been disabled
from the unit, as this unlocks the “Send Current Network Parameters to Unit” button.

Next, the network parameters of the IP network need to be feed to the unit. Once all the settings have
been entered, simply press the “Send Current Network Parameters to Unit” button to configure the
unit with these new settings. An example of this is shown over the page.

Now the unit has a fixed address of 192.1.2.222, plug in the RJ-45 connector into the Ethernet
socket, and wait a few seconds (customer network dependent) for the network to realize the
existence of this new unit.

2.2.1 Configuring the IWC to communicate to a specific server/computer


The „Network Parameters“ tab (shown in Figure 10) allows the user to control all the networking
functionality. The Host Parameters control where the IWC will push the output protocol data (i.e. the
tag data). Using the What is my IP? Function and the Set Host Parameters, allows the user’s
computer to receive all the packets. To push packets to an external server the user must input that
server’s IP Address in the Host Paramaters‘ IP Address.

2.3 General Interface Instructions


2.3.1 Communicating with the IWC
Once you have connected one of the interfaces (USB/232/Ethernet) and setup the required
parameters you can begin ‚talking‘ to the unit. Simply select the corresponding Configuration Protocol
as shown in Figure 6.

Click on Get Date/Time to check whether the unit is responding. If the unit responds with the time
value then it is operational. If you are having issues please ensure that the hardware and software are
setup correctly in Section 1.1 and Sectoin 2.2.

2.3.2 Checking the Comms


The „Comms“ tab (shown in Figure 7) shows the communication to and from the IWC. The text is
color coded depending on how the information is being passed

Code Description Text Color


SS Send Serial or USB Red
RS Receive Serial or USB Blue
SU Send UDP Black
RU Receive UDP Green
ST Send TCP Purple
RT Receive TCP Orange

identiTAG 2012 © Issue 2 page 14/18


2.3.3 Updating the Firmware
The „Firmware Update“ tab (shown in Figure 12). To upload new firmware, a hex file is required.
Simply load the hex file into the application using the eclipses button ( ... ). Once the hex file has been
selected the unit can be updated. In order to speed up the uploading process the comms output is
disabled by default. If this data is needed then simply tick the Force Diagnostic Output Box.

3 SOFTWARE
SOFTWARE CODE EXCERPTS
All excerpts are from Visual Studio 2010 C#

3.1 General Excerpts


3.1.1 Set Relay
Relay
The following excerpt would set Relay 1 ON for 1 second using through the serial port.
SendSerialData is a custom send function. See Protocol Document for more information.

[C#]
message = "@";
message += Convert.ToByte(mBoxLAddr.Text).ToString("X").PadLeft(2, '0');
message += "64";

message += "01"; // mask


message += "01"; // mode
message += "0x000A"; // duration (x100ms)

CRCres = calc_CRC(0, (UInt16)0x8005);


message += Convert.ToString(CRCres, 16).PadLeft(4, '0').ToUpper() + "\r\n";

SendSerialData(message);

3.2 Networking
The following network examples are simply modifications from the examples provided by Microsoft on
their MSDN website. See System.Net.Sockets (http://msdn.microsoft.com/en-
us/library/sb27wehh.aspx) with particular notice to the TcpClient, TcpListener and UdpClient classes.

The ellipses are used to separate different sections of code. Most functions will use threads to in
order to efficiently use the data.

3.2.1 UDP

3.2.1.1 Send Commands to the IWC


The following example establishes a UdpClient connection using and IWC with IP address 192.1.3.5
and a command port of 10005. A Get Date/Time command is sent to the IWC. The Receive method
blocks execution until a message is received. Using the IPEndPoint passed to Receive, the identity of
the responding host is revealed.

[C#]
static UInt16 PORTcmd = 10005;
UdpClient udpClientCMD = new UdpClient(PORTcmd);
Thread rxUDPthread;

...

rxUDPthread = new Thread(new ThreadStart(UDPCommandCallBack));


rxUDPthread.IsBackground = true;
rxUDPthread.Start();
identiTAG 2012 © Issue 2 page 15/18
...

message = "@";
// Convert logical address into hex string
message += Convert.ToByte(logicalAddress).ToString("X").PadLeft(2, '0');
message += "10"; // 10 is the command for get date/time

// Calculate CRC and append


CRCres = calc_CRC(0, (UInt16)0x8005);
message += Convert.ToString(CRCres, 16).PadLeft(4, '0').ToUpper() + "\r\n";

IPAddress Addr = PAddress.Parse("192.1.3.5");

// Connect to the UDP Send Port


udpClientCMD.Connect(Addr, PORTcmd);

// Pack/Encode and send to the IWC


Byte[] sendBytes = Encoding.ASCII.GetBytes(message);
udpClientCMD.Send(sendBytes, sendBytes.Length);

...

public void UDPCommandCallBack ()


{
while (true)
{
IPEndPoint recvpt = new IPEndPoint(IPAddress.Any, PORTcmd);
byte[] data;

while (true)
{
data = udpClientCMD.Receive(ref recvpt);

ASCIIEncoding encoder = new ASCIIEncoding();


string recievedString = encoder.GetString(data, 0, data.Length);
}
}
}

3.2.1.2 Receive Data from the IWC


The following example demonstrates the Receive method. The Receive method blocks execution until it
receives a message. Using the IPEndPoint passed to Receive, the identity of the responding host is revealed.

[C#]
static UInt16 PORTdata = 10500;
UdpClient udpClientDATA = new UdpClient(PORTdata);
Thread UDPthread;

...

UDPthread = new Thread(new ThreadStart(UDPDataCallBack));


UDPthread.IsBackground = true;
UDPthread.Start();

...

public void UDPDataCallBack()


{
while (true)
{
//Identify the host
IPEndPoint recvpt = new IPEndPoint(IPAddress.Any, PORTdata);

identiTAG 2012 © Issue 2 page 16/18


byte[] data;

while (true)
{
data = udpClientDATA.Receive(ref recvpt);

//Retrieve the received data


ASCIIEncoding encoder = new ASCIIEncoding();
string recievedString = encoder.GetString(data, 0, data.Length);
}
}
}

3.2.2 TCP

3.2.2.1 Send and Receive


Due to the more complex nature of a TCP connection, multiple callback functions are required. For
more information on the necessity of these functions please see the MSDN examples.

[C#]
static UInt16 PORTdata = 10500;
TcpListener tcpListener = new TcpListener(IPAddress.Any, PORTdata);
Thread TCPthread;
...
// spawn a TCP listen thread
TCPthread = new Thread(new ThreadStart(ListenForClients));
TCPthread.IsBackground = true;
TCPthread.Start();
...
private void ListenForClients()
{
tcpListener.Start();

while (true)
{
//blocks until a client has connected to the server
TcpClient client = tcpListener.AcceptTcpClient();

//create a thread to handle communication with connected client


Thread clientThread = new Thread(new ParameterizedThreadStart(HandleClientComm2));
clientThread.Start(client);
}
}

...
TcpClient tcpClient = new TcpClient(remIP, PORTcmd);
NetworkStream stream = tcpClient.GetStream();

Byte[] sendBytes = Encoding.ASCII.GetBytes(message);


stream.Write(sendBytes, 0, sendBytes.Length);

// spawn a new receive thread for my TCP callback function


rxTCPthread = new Thread(new ParameterizedThreadStart(HandleClientComm));
rxTCPthread.Start(tcpClient);
...
private void HandleClientComm(object client)
{
TcpClient tcpClient = (TcpClient)client;
NetworkStream clientStream = tcpClient.GetStream();

while (true)
{

identiTAG 2012 © Issue 2 page 17/18


byte[] message = new byte[1024];
int bytesRead = 0;

//blocks until a client sends a message


bytesRead = clientStream.Read(message, 0, message.Length);

//message has successfully been received


ASCIIEncoding encoder = new ASCIIEncoding();
string str = encoder.GetString(message, 0, bytesRead);
tcpClient.Close();
this.BeginInvoke(new TCPDump(TCP_IN), new Object[] { str });
break;
}

while (true) ;
}
...
private void HandleClientComm2(object client)
{
TcpClient tcpClient = (TcpClient)client;
NetworkStream clientStream = tcpClient.GetStream();

string[] cIP = tcpClient.Client.RemoteEndPoint.ToString().Split(':');

while (true)
{
byte[] message = new byte[1024];
int bytesRead = 0;

//blocks until a client sends a message


bytesRead = clientStream.Read(message, 0, 1024);

//message has successfully been received


ASCIIEncoding encoder = new ASCIIEncoding();
string recievedString = encoder.GetString(message, 0, bytesRead);
}

tcpClient.Close();
}

identiTAG 2012 © Issue 2 page 18/18

You might also like