HsTcp2Com (Professional Edition) v2.0 User Manual



Contents

  Welcome to HsTcp2Com!
 
Creating New Links
 ▪ Editing Existing Links
  Removing Links
 
Port Configuration
  Activating / Deactivating
  Status and Statistics
  Diagnostics
  Advanced Configuration

 

About Hillstone Software

  How to buy
  Company Profile

 ▪ Contact Us

Welcome to HsTcp2Com (Professional Edition)

HsTcp2Com is a communications application for Windows which allows to forward / bridge data between serial ports (RS232, bluetooth, IrDA, USB) represented as COM ports and TCP/IP connections or UDP/IP links. In the simplest scenario it is an RS232 to TCP/IP converter. But HsTcp2Com can also be used to interconnect and bridge data as follows:

  • Any COM port to any other COM port (total 100 COM ports are currently supported)

  • COM port to TCP/IP (TCP client mode)

  • COM port to TCP/IP (TCP server mode)

  • COM port to UDP

  • TCP/IP client to UDP

  • TCP/IP server to UDP

  • TCP/IP server to TCP/IP client

  • UDP to UDP

Unlimited (subject to available memory) links each interconnecting 2 ports in any combination shown above are able to operate concurrently.

HsTcp2Com supports a number of data forwarding (packetization) options:

  • Forward instantly on data receive

  • Forward on buffer full

  • Forward on inter-character timeout

  • Forward on frame end character

HsTcp2Com supports a number of diagnostic and statistics functions:

  • Port status display

  • Port receive and transmit byte counters

  • Event log displayed on screen and saved to disk file

  • Data traffic trace in ASCII or HEX format displayed and saved to disk file

  • Data traffic echo function (port loopback)

  • Data traffic generation function (a specified buffer is sent periodically on a timer)

  • Send specified single buffer function

HsTcp2Com supports an option to automatically re-connect disconnected or failed ports.

Creating New Groups

Links in HsTcp2Com exist within a groups. To create a new group, Click "New" button under Groups list view, enter the group name in the dialog box that appears and click "Okay". The new group shall appear in the group list view. The new group created empty. You can now create new links within that group or move links into the group.

Editing Groups

You can rename an existing group by first selecting a group in the groups list view and then clicking "Edit" button below the group list view. Edit the name of the group in the dialog box that appears and click "Okay", the modified group name appears in the group list view.

Deleting Groups

You can delete a group by first selecting a group in the group list view and then clicking "Delete" button. If a group contains links, you will be asked to confirm your decision to delete a group. All links within a group shall be deleted together with the group.

Creating New Links

To create a new link click "New Link" button or via main menu: Tools -> New Link.  "Add New Link" dialog box will appear. An HsTcp2Com link consists of 2 ports (IP or serial) which will be interconnected. The configuration for these two ports is presented in the "Add New Link" dialog box.
You can give a link your string name in the edit box "Link Name". Put You can give a link your string name in the edit box "Link Name". Put an optional comment describing the link in the "Comment" edit box. Specify group name where this link should be added to by selecting the group name from the list of groups. If no groups exist, a new group is automatically created called "Default Group".


It is also possible to create a number of links automatically by specifying a template for first link. To auto create a number of links, fill out all the fields in the "New Link" dialog, specify number of links to auto create at the bottom left of the dialog and click "Auto Create" button. Links are named incrementally based on the name given to the first link. The name of the first link must end with 1, for example test1.
 

Editing Existing Links

To edit an existing link, select the required link in the "Configured Links" list in the main program screen and click "Edit Link" or via the main menu:  Tools -> Edit Link. You can also move a link from one group to another by editing the link, changing its group and saving the link

Removing Links

To remove an existing link, select the required link in the "Configured Links" list in the main program screen and click "Remove Link" or via the main menu: Tools -> Remove Link

Showing and Hiding the contents of a group in the group

Groups are shown in the groups list view. Each group has a tick box with it. Tick the box to show the links which are parts of the group in the links list view. Untick the box to hide the links which are part of this group in the links list view.

Sorting Links

It is currently possible to sort links within a selected group by Link name or by status columns. To perform sorting operation select first link in the required group and click the header of either the link name or the status column.

Port Configuration Options

Port configuration options presented in New Link and Edit Link dialog boxes are explained here:

  "Activate on Save" - check to apply port settings on clicking "Save" button. Port shall be disconnected and reconnected with the new settings. If these button is unchecked, some of the options will be saved but will not take effect until the port is manually disconnected and re-connected (with "Activate Port x", "Deactivate Port x" buttons.

  "Port Type" - select port type from the list "Serial/COM" or "TCP/UDP"

  "COM Port" - select COM port number from the list (from COM1 to COM32), applicable and displayed only if Port Type is "Serial/COM"

  "Baud Rate" - select COM port speed from the list (110 to 256000 baud), applicable and displayed only if Port Type is "Serial/COM"

  "Data Bits" - select COM port data bits from the list (5,6,7 or 8), applicable and displayed only if Port Type is "Serial/COM"

  "Parity" - select COM port parity from the list (even, mark, none, odd, space), applicable and displayed only if Port Type is "Serial/COM"

  "Stop Bits" - select COM port stop bits from the list (1, 1.5, 2), applicable and displayed only if Port Type is "Serial/COM"

  "IP Protocol Type" - select IP protocol from the list (TCP or UDP), applicable if port type is TCP/UDP

  "IP Protocol Type" - select IP protocol from the list (TCP or UDP), applicable if port type is TCP/UDP

  "Client or Server" - select client or server mode, applicable if port type is TCP/UDP and protocol is TCP.

  "IP Port Number" - TCP or UDP port number. The meaning of this parameter depends on the setting of the port type, IP Protocol and client / server mode. For Port type : Serial / COM this setting is not applicable. For port type TCP/UDP and IP protocol TCP: if client mode is selected, IP port Number is the remote port number to connect to. If the server mode is selected, IP port number is the port to listen incoming TCP connection. If IP protocol is UDP, the IP Port Number is used for both outgoing and incoming traffic.

  "Remote IP address or domain name" - remote IP address for client mode, applicable if port type is TCP/UDP and protocol

  "Forward instantly on data receive" - data received on this port will be immediately forwarded to another interconnected port on the same link

  "On Buffer Full, Buf Size" - if checked, the data received in this port shall be stored in a forwarding buffer until it becomes full. When the buffer is full the contents of the buffer is forwarded to interconnected port on the same link. Specify buffer size for the forwarding buffer

  "Interchar Timeout (ms)" - if checked, data received on this port will be forwarded to another interconnected port on the same link if inter-character timer specified in milliseconds has expired, in other words no characters have been received since the last character for the specified amount of time. This option can be used together with "On Buffer Full" option.

  "On frame end character" - if checked the data received on this port is continuously monitored for the frame end character selected from the list. If the frame end character not detected, the data is stored into the forwarding buffer. If forwarding buffer is full the buffer is sent to interconnected port. If the frame end character is detected, the content of the buffer accumulated so far is sent to interconnected port. This option can be used together with "On Buffer Full" and "Interchar Timeout" options.

  "Auto Re-connect in secs" - if checked, the port will periodically attempt to auto reconnect if it becomes disconnected. Specify time in seconds between auto-reconnect attempts.

  "Port Loopback (Echo Received Data)" - if checked, the data received on this port will be sent back out immediately.

  "Generate Traffic (Send Buffer)" - if checked, a data buffer will be sent out on this port periodically. Check "Hex" or "Ascii" radio button to select preferred entry format and then enter data to be sent in the data box. Enter traffic generation interval in milliseconds in the edit bo below.

Activating and Deactivating Ports

To manually activate or deactivate port, first select a link in the links list in the main program screen, then click "Activate Port x" or "Deactivate Port x" to perform the necessary action.

Status and Statistics

Link and port status are shown in the configured links list in the "Status" column and in the "Selected Link Stats" list box when a link is selected.

Diagnostics

  Sending Buffers Manually: To send a buffer over any configured port, first select a link and then click "Send Buffer". In the "Send Buffer" dialog box, select outgoing port from the list, select data format (Ascii or HEX), enter data in the edit box, if necessary click "Append CR" to add carriage return character 0x0d to the end of buffer and click "Send".

  Event Log: all important events are shown in the event log list view together with corresponding timestamps. If you check the checkbox "Log Events to File" the same events are also appended to the end of disk file named "event.log" in the program's working directory

  Data Trace: if enabled by checking checkbox "Enable Tracing", all incoming and outgoing data is logged in the trace window along with timestamp Port information, direction (receive or transmit) length of data and first several bytes of data in  ASCII or HEX format. ASCII or HEX format is selected with the corresponding check boxes "Hex" and "Ascii". The contents of the trace window can be cleared by clicking "Clear Trace" button. The trace is also saved to disk file "trace.log" if the checkbox "Log Trace to File" is checked.

Advanced Configuration

  Maximum number of links: The program is capable of loading and operating a large number of links. The total number of links possible is limited by configuration parameter max_links in file hstcp2com.ini. You must set this parameter to the maximum expected number of links you will use, before starting the application. Example: max_links=2000 sets maximum number of links to 2000.

  Configuration files: groups and links configuration are stored by the program in CSV format in two files groups.csv and links.csv. The configuration parameter of links and groups can be set from within the program at run time or manually by editing CSV files from Microsoft Excel and pertaining to the format expected by the program.

On bootup the program reads in these files and creates groups and links which are member of the groups.

  First line in each csv file is ignored, because it is assumed to be a header text for each column, designating the meaning of each colomn
  Files can be edited in excel and saved to as csv
  Parameter values (columns) must be separated by ',' (comma) character.
  Each line (row) must be terminated with CR LF pair (0x0d 0x0a), including the last row in the file
  Double quotes are not permitted, only ',' are accepted as separators
  String parameters, such as link name or comment are must not contain comma characters

Links.csv row has the following format (each column described below):

  1. group id - decimal group id (for example 0, 1 or 2), must be a valid group present in groups.csv file (explaned later)
  2. link name - link name string
  3. link comment - link comment string
  4. port 1 type - decimal code representing port type, 0=serial; 1=IP
  5. port 1 com port - decimal COM port number (zero based, i.e 0=COM1)
  6. port 1 baud rate - decimal COM port speed code (0=110, 1=300, 2=600, 3=1200, 4=2400, 5=4800, 6=9600, 7=14400, 8=19200; 9=38400;10=56000;11=57600;12=115200;13=128000;14=256000
  7. port 1 databits - decimal code - number of bits for COM port 0=5, 1=6, 2=7, 3=8
  8. port 1 parity - decimal code - parity for COM port - 0=even, 1=mark, 2=none, 3=odd, 4=space
  9. port 1 stop bits - decimal code - stop bits for COM port - 0=1, 1=1.5, 2=2
  10. port 1 use hardware flow control - 0=no, 1=res
  11. port 1 IP protocol - 0=TCP, 1=UDP
  12. port 1 role = 0=client, 1=server
  13. port 1 IP port = decimal IP port
  14. port 1 remote ip = remote IP address string or hostname
  15. port 1 remote ip = remote IP address string (currently this is the same as the above column)
  16. port 1 instant forward = 1=forward buffer instantly on receive, 0=no
  17. port 1 forward on buffer full = 1=yes, 0=no
  18. port 1 forward on timeout = 1=yes, 0=no
  19. port 1 forward on char = 1=yes, 0=no
  20. port 1 forwarding buffer size, decimal value
  21. port 1 inter-character timeout, decimal value
  22. port 1 frame ending character, decimal value of ascii character
  23. port 1 auto-reconnect = 1=yes, 0=no
  24. port 1 auto reconnect interval, decimal value
  25. port 1 activate on save = 1=yes, 0=no
  26. port 1 trace enabled = 1=yes, 0=no
  27. port 1 loopback enabled = 1=yes, 0=no
  28. port 1 generate traffic = 1=yes, 0=no
  29. port 1 is hex = hex or ascii buffer format for traffic generation 1=hex, 0=ascii
  30. port 1 traffic gen buffer = traffic generation string
  31. port 1 length of traffic generation buffer, decimal value
  32. port 1 traffic generation interval, decimal valu
  33. After that, same parameters for port 2 are repeated starting from port type

Groups.csv has the following format

  1. Name - group name, string
  2. state - 1=show links which are members of this group in links view, 0=hide links which are members of this group
  3. group id = decimal group id