Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 5 of 38

Trakker Antares 2400 Family System Manual: Chapter 2 - Configuring and Managing the Terminals, pages 40 to 48

Pages 40 to 48 of 362, from Trakker Antares 2400 Family System Manual

The original document is the PDF (2.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec 2410, Intermec 2415, Intermec 2435 and Intermec 2475

Page 40

Chapter 2 - Configuring and Managing the Terminals

To set up the host computer • Verify that the host computer can communicate with the DCS 300. To set up the application • Prepare and write a host application that can communicate with the DCS 300 and send transactions to and receive transactions from the terminal in this format: transaction header

TMF field commands where: transaction header is a 96-byte field containing the message number, date and time, source application ID, destinations application ID, transaction ID, and other information. You must set the system message (SYS$MSG) flag to E in the transaction header. For help, see the DCS 300 User’s Manual.

TMF field is a 2-byte field containing one of these values:

commands

CG

Configuration Get request sent from the host application.

Cg

Configuration Get response sent from the terminal to the host.

CS

Configuration Set request sent from the host application.

Cs

Configuration Set response sent from the terminal to the host.

are the reader and configuration commands that you want to set on the terminal or the current value you want to retrieve from the terminal. To save configuration changes in flash memory, send the reader command .+1 as the last command. For a list of commands, see Chapter 5, “Reader Command Reference,” or Chapter 6, “Configuration Command Reference.”

To see examples of the host application transactions, see “Example 1” on page 22 and “Example 2” on page 22.

Configuring the Terminal in a TCP/IP Direct Connect Network You can use the host computer to configure an RF or Ethernet terminal in your TCP/IP network. To send and receive configuration data, you need to write a host application that can communicate with the terminal directly through an

20

Trakker Antares 2400 Family System Manual

Page 41

Chapter 2 - Configuring and Managing the Terminals access point or through the Ethernet network. You use the Terminal Message Format (TMF) protocol to send and receive transactions between the host application and the terminal. For more information about sending and receiving data, see “Transferring Files and Data in a TCP/IP Direct Connect Network” on page 24. Note: You can continue running an application on the terminal while configuring the terminal from the host. To set up the host computer • Verify that you can communicate with the terminal. To set up the application • Prepare and write a host application that can communicate with the terminal. Configuration commands must be sent to network port 6000 on the terminal. Message transactions to and receive transactions from the terminal on network port 6000 must conform to the following format: TMF field commands where: TMF field commands is a 2-byte field containing one of these values: CG

Configuration Get request sent from the host application.

Cg

Configuration Get response sent from the terminal to the host.

CS

Configuration Set request sent from the host application.

Cs

Configuration Set response sent from the terminal to the host.

are the reader and configuration commands that you want to set on the terminal or the current value you want to retrieve from the terminal. To save configuration changes in flash memory, send the reader command .+1 as the last command. For a list of commands, see Chapter 5, “Reader Command Reference,” or Chapter 6, “Configuration Command Reference.”

Trakker Antares 2400 Family System Manual

21

Page 42

Chapter 2 - Configuring and Managing the Terminals

Example 1 In the host application, you want to get the current values of two configuration commands from the terminal. Send this transaction from the host application: CG$+NABV

Note: The transaction header is not shown in this example. You do not need a transaction header for a host application in a TCP/IP network. where: CG is a TMF Configuration Get request.

$+ is the Change Configuration reader command.

NA is the Network Activate configuration command.

BV is the Beep Volume configuration command.

The terminal returns this transaction to the host application. Cg$+NA1BV4 where: Cg is a TMF Configuration Get response.

$+ is the Change Configuration reader command.

NA1 means the Network Activate configuration command is currently set to a value of 1, which means that the RF or Ethernet network is enabled.

BV4 means the Beep Volume configuration command is currently set to a value of 4, which is a very loud beep volume.

Example 2 In the host application, you want to set the value for two configuration commands on the terminal. Send this transaction from the host application: CS$+BV4KA1

Note: The transaction header is not shown in this example. You do not need a transaction header for a host application in a TCP/IP network. where:

22

CS is a TMF Configuration Set request.

$+ is the Change Configuration reader command.

Trakker Antares 2400 Family System Manual

Page 43

Chapter 2 - Configuring and Managing the Terminals

BV4 sets the Beep Volume configuration command to a value of 4, which is a very loud beep volume.

KA1 sets the Keypad Caps Lock configuration command to a value of 1, which enables the Keypad Caps Lock.

The terminal returns this transaction to the host application. Cs$+BV4KA1 where: Cs is a TMF Configuration Set response.

$+ is the Change Configuration reader command.

BV4 means the Beep Volume configuration command has been changed to a value of 4, which is a very loud beep volume.

KA1 means the Keypad Caps Lock configuration command has been changed to a value of 1, which enables the Keypad Caps Lock.

Configuring the Terminal With the Clone Application The clone application uses XMODEM-1K protocol to copy configuration parameters and applications from one terminal (server terminal) to another (client terminal). The server and client terminals must have the same: • hardware configuration. • version of firmware. • version of the clone application. Note: The clone application does not clone terminals with double-byte fonts or the 802.1x security option. The clone application copies all configuration parameters from the server terminal to the client terminal, except for: • terminal IP address. • security ID. You need to configure these parameters separately. The clone application also removes all existing files on the client terminal’s C drive and replaces them with the files on the server terminal’s C drive. For more information about upgrading firmware, see “Upgrading the Firmware” on page 31. For more information about downloading applications, see “How to Download Applications” on page 53.

Trakker Antares 2400 Family System Manual

23

Page 44

Chapter 2 - Configuring and Managing the Terminals

To clone configuration parameters and applications 1 Make sure the server terminal’s configuration is saved in flash memory by scanning this bar code: Save Configuration in Flash Memory

*.+1* *.+1*

2 Load all applications and files to clone on the server terminal’s C drive. 3 (RF terminals only) Disable the radio on both the server terminal and the client terminal. 4 Run the clone application on the server unit. a Choose Main Menu > System Menu > Clone Unit. b Select OK to continue. c Select Server.

5 Run the clone application on the client unit. a Choose Main Menu > System Menu > Clone Unit. b Select OK to continue. c Select Client.

6 Connect COM1 on the server terminal to COM1 on the client terminal using an RS-232 null modem cable. If you are cloning a 243X terminal, you can use the cloning cable accessory (P/N 216-909-001). The cloning process automatically begins once you connect the terminals. The client terminal lists the applications when cloning is complete. 7 On the server terminal, press d to exit. You can also configure another terminal by connecting it to the server terminal.

Transferring Files and Data in a TCP/IP Direct Connect Network In a TCP/IP direct connect network, you can use a host application to transfer files and send data between the terminal and host. To initiate file transfers from the host, you must write a host application that can communicate directly with an RF or Ethernet terminal. You use the file management reader commands such as Receive File and Transmit File to transfer files between the terminal and the host. For help, see Chapter 5, “Reader Command Reference.” To initiate file transfers from the terminal, you do not need to develop a host application as described in this section. You can use the Receive File and Transmit File reader commands within a terminal application or by scanning bar code labels. For help, see Chapter 5, “Reader Command Reference.” 24

Trakker Antares 2400 Family System Manual

Page 45

Chapter 2 - Configuring and Managing the Terminals

To use the built-in TFTP client on the RF or Ethernet terminal, the • TFTP (Trivial File Transfer Protocol) server must be running on the host. • TFTP server must be running on at least a Pentium processor or equivalent. • RF or Ethernet terminal must be communicating with the host that is running the TFTP server. • TFTP server or some other application on the host must be able to send the reader command on the network. Note: You can continue running an application, except TE, on the RF or Ethernet terminal while transferring files from the host. To transfer files or send configuration data from the host 1 Make sure the TFTP server is running on the host and the RF or Ethernet terminal is communicating with the host. 2 Start the host application that can send reader commands to the terminal. 3 Send the two-character TMF code, CS (Configuration Set request) followed by the reader or configuration command. For help with TMF, see “Configuring the Terminal in a TCP/IP Direct Connect Network” on page 20. For example, to send the application INVENTRY.BIN from drive C on the host to drive C on the terminal, enter this command: CS.%R,c:inventry.bin,c:inventry.bin

For command information, see Chapter 5, “Reader Command Reference,” or Chapter 6, “Configuration Command Reference.” CLIENT.CPP is the source for a sample application you can run on the host. You can use CLIENT.CPP to send reader commands to the RF or Ethernet terminal and receive the resulting messages. The source code for the sample utilities CLIENT.CPP and the include file UTILS.H is shown on the next pages. You can build the application using Microsoft Visual C++ version 4.0 or later and the Windows sockets library that is included with Microsoft Visual C++. You can also develop your own application to meet the needs of your host environment. You run the resulting application (CLIENT.EXE) from the DOS command line. The application expects NCM to be defined as the terminal IP address in the hosts file. Once running, the application prompts you to enter a reader command, which it then sends to the RF or Ethernet terminal. The application also displays any return messages. Reader commands are handled by the Trakker Antares operating system, so you can continue running an application while you use the CLIENT.EXE application to send commands. Trakker Antares 2400 Family System Manual

25

Page 46

Chapter 2 - Configuring and Managing the Terminals

To use the sample utility CLIENT.CPP 1 Make sure the TFTP server is running on the host and the RF or Ethernet terminal is communicating with the host. 2 In the hosts file on the host, add the terminal IP addresses and the target name, NCM. For example, to send files or data to the terminal with an IP address of 192.9.200.130, add this line to the hosts file: 192.9.200.130 ncm

3 Start the CLIENT.EXE application on the host. 4 When the “Enter Command” prompt appears on the host, enter the two-character TMF code, CS (Configuration Set request) followed by the reader or configuration command. For example, to send the application INVENTRY.BIN from drive C on the host to drive C on the terminal, enter this command: CS.%R,c:inventry.bin,c:inventry.bin

CLIENT.CPP Sample Application for a TCP/IP Direct Connect Network #include <windows.h> #include <stdio.h> #include "Utils.h" // our application uses a fixed port number const unsigned short SERVER_PORT = 6000; const unsigned short CLIENT_PORT = 6001; // we will default to the local host machine // unless argv[1] has a hostname const char SERVER_HOSTNAME[] = "ncm"; int main(int argc, char *argv[]) { // turn on the socket library for this process WSADATA wsad; int error = WSAStartup(MAKEWORD(1,1), &wsad); if (error != 0) ErrorMessage("WSAStartup", WSAGetLastError()); // create an unitialized connection-oriented socket SOCKET connection; connection = socket(PF_INET, SOCK_DGRAM, 0); if (connection == INVALID_SOCKET) ErrorMessage("socket", WSAGetLastError()); // lookup the IP address of the requested host HOSTENT *phostent = gethostbyname(argc == 2 ? argv[1] : SERVER_HOSTNAME); if (phostent == 0) ErrorMessage("gethostbyname", WSAGetLastError()); // define a SOCKADDR to contain the IP address of the // server and the port number of our application SOCKADDR_IN serverAddress; memset(&serverAddress, 0, sizeof(serverAddress)); serverAddress.sin_family = PF_INET;

26

Trakker Antares 2400 Family System Manual

Page 47

Chapter 2 - Configuring and Managing the Terminals serverAddress.sin_port = htons(SERVER_PORT); memcpy(&serverAddress.sin_addr, phostent->h_addr_list[0], phostent->h_length); // Bind a well known port of 6000 to the socket SOCKADDR_IN clientAddress; memset(&clientAddress, 0, sizeof(clientAddress)); clientAddress.sin_family = PF_INET; clientAddress.sin_port = htons(CLIENT_PORT); clientAddress.sin_addr.s_addr = htonl(INADDR_ANY); if(!(bind(connection, (LPSOCKADDR)&clientAddress, sizeof(clientAddress)) ==0)) { ErrorMessage("bind", WSAGetLastError()); } // attempt to connect to the server error = connect(connection, (const SOCKADDR *)&serverAddress, sizeof(serverAddress)); if (error != 0) ErrorMessage("connect", WSAGetLastError()); // check the local name for the socket SOCKADDR_IN localName; memset(&localName, 0, sizeof(localName)); int localNameLength = sizeof(localName); error = getsockname(connection, (LPSOCKADDR)&localName, &localNameLength); // run the user-interface char sz[1024]; char rz[1024]; BOOL bConnectionAlive = TRUE; printf("> "); int Scount, Rcount; int cbRecv, cbSend; Scount = Rcount = 0; int cbLen, rcLen; unsigned char *psend = (unsigned char *)sz; // continue while not EOF on the console and the connection is alive while (bConnectionAlive) { // send the string entered by the user printf("Enter Command:\n"); printf("> "); gets(sz); if(sz[0] != 'q') { cbLen = strlen(sz); cbSend = send(connection, (const char *)psend, cbLen, 0); if (cbSend < 0) { Scount++; printf("send failed %d\n", Scount); bConnectionAlive = FALSE; ErrorMessage("send", WSAGetLastError()); }

Trakker Antares 2400 Family System Manual

27

Page 48

Chapter 2 - Configuring and Managing the Terminals

Sleep(2000); // receive the converted string from the server memset(&rz, 0, sizeof(rz)); rcLen = sizeof(rz); cbRecv = recv(connection, rz, rcLen, 0); if (cbRecv < 0) { Rcount++; printf("receive failed %d\n", Rcount); ErrorMessage("receive", WSAGetLastError()); bConnectionAlive = FALSE; } // printf the converted string printf("response:%s\n",rz); printf("\n> "); Sleep(1000); } else bConnectionAlive = FALSE; } // release the resources held by the socket error = closesocket(connection); if (error != 0) ErrorMessage("closesocket", WSAGetLastError()); // release the resources held by the socket library error = WSACleanup(); if (error != 0) ErrorMessage("WSACleanup", WSAGetLastError()); return 0; }

UTILS.H Utility (Used by CLIENT.CPP) #include <windows.h> inline void ErrorMessage(LPCTSTR szFn, DWORD dwError = GetLastError()) { TCHAR szTitle[1024]; TCHAR szPrompt[1024]; BOOL bRet = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, dwError, 0, szPrompt, sizeof(szPrompt), 0); if (!bRet) lstrcpy(szPrompt, __TEXT("Unknown Error")); wsprintf(szTitle, __TEXT("%s failed with error code (0x%x)!"), szFn, dwError); int id = MessageBox(HWND_DESKTOP, szPrompt, szTitle, MB_ABORTRETRYIGNORE|MB_SETFOREGROUND); if (id != IDIGNORE) ExitProcess(0); }

28

Trakker Antares 2400 Family System Manual