aRelay Application
Last Modified: 2009-07-01
find:

basket

Acroname Robotics  
 

Contents

Overview

The aRelay application provides a utility to bridge serial based devices to a TCP/IP socket service.  The aRelay application is a command line tool developed with the intention of lightweight and portable across a wide range of operating systems. 

Proper usage requires a serial based device connected directly to the computer that is running the aRelay application.  The computer that is connected to the serial device must also have the ability to participate in a network.  Network port, serial communication setup information can be supplied to the aRelay application either as command line parameters or by using an optional configuration file.  The following diagram illustrates a generalized setup when using the aRelay. 

Diagram of a typical aRelay configuration.
aRelay application topology overview.

General Usage

The aRelay application is a command line executable utility.  It requires the shared Acroname aUtil and aIO libraries.  When the application launches, it queries the system hosts file to determine the IP address. 

Settings are used to describe to the aRelay application what serial port device information to use as well as which local IP port to open up for remote connections to take place.  Each setting value can be passed in either through the command line as additional input parameters or by settings stored in a "relay.config" file.  Using a configuration file is useful when a particular configuration is commonly used. 

Launching the application from a command line is identical across operating systems.  The following example demonstrates aRelay running on a Linux machine using the application default settings.  From a command line prompt, type:

[user@computer aBinary]$ aRelay relay resetting socket 192.168.1.122:8000

A number of settings are available to define how to connect to serial devices and what communication ports need to be available. 

  • port - IP address port for remote systems to connect to. 
  • portname - serial port name that a device is connected to. 
  • baudrate - serial port communication data rate

Command line parameters can override both the factory defaults as well as settings stored in a configuration file.  For example, to specify to the aRelay to use a IP socket port of 8009, talk to a serial device at tty.usbserial, one would type the following:

[user@computer aBinary]$ aRelay -port 8009 -portname tty.usbserial relay resetting socket 192.168.1.122:8009

Configuration File

A "relay.config" configuration file may be used to define what settings should be used when using the aRelay application.  The configuration file is located in the aBinary folder where the aRelay application is located.  This is approach can simplify or eliminate necessary command line arguments when launching the application.  For example, to specify to the aRelay to use a IP socket port of 8009, talk to a serial device at tty.usbserial, one would edit the "relay.config" file as:

################################################### # FILENAME: relay.config ################################################### port = 8009 portname = tty.usbserial

Launching aRelay application from the command line can be simplified down to:

[user@computer aBinary]$ aRelay relay resetting socket 192.168.1.122:8009

Revision History:

  • 2009-06-26: Added information about using a configuration file.
  • 2009-06-26: Initial Post

Software
Resources

 
 
voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350, privacy
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.