Changes between Initial Version and Version 1 of reftek2ew

03/20/12 00:04:12 (9 years ago)



  • reftek2ew

    v1 v1  
     3= [wiki:Earthworm Earthworm] Module: reftek2ew = 
     4'''Contributed by: ''' 
     6== Function == 
     7A Reftek data feeding program 
     9== Details == 
     10Module reftek2ew was developed and provided by Refraction Technologies, Inc. The module translates data from the Reftek data server, RTP, into Earthworm trace data format and writes Earthworm trace messages to an Earthworm shared memory ring. 
     12Refraction Technologies, Inc. has provided the source code for both the Solaris and Windows 2000 versions. Along with this module, there are several other programs provided by Reftek which are required to run reftek2ew. Those can be found in the utils subdirectory in the reftek2ew source directory: 
     15 * rtpd - rtp server daemon program used to boot up Reftek boxes and control communication with them 
     16 * rtpc - rtp client program used for Reftek control 
     18utils/winnt: (among other things) 
     19 * rtpudpsvc.exe - rtp server 
     20 * fsc.exe - Field Setup Controller 
     21 * nci.exe - Network Control Interface 
     25Lucky Vidmar Fri Jan 29 11:49:21 MST 1999 
     29This file contains instructions for configuring RefTek data loggers 
     30(e.g. model 72A with serial card RT422) to deliver data into a Solaris 
     31or NT machine and convert it into Earthworm packets. The instructions 
     32contained here are the result of trial-and-error, complemented with a 
     33hefty dose of tech support from RefTek. Consulting ALL of the available 
     34RefTek documentation is strongly recommended. 
     36Communication between a RefTek data logger (Data Acquisition System - 
     37DAS) and the server machine is done via the RefTek Protocol (RTP).  RTP 
     38is designed to provide full-duplex, packet-oriented transport over UDP. 
     39RTP is implemented as a client-server process with a DAS with a RT422 
     40serial card as the client, and the RTPD application as the server. RTPD 
     41is available for NT and Solaris - see instructions below for installing 
     42RPTD on each platform. 
     44RefTek recommends that RTP is implemented through a router, for example 
     45a Cisco 2509, such that the set up will consist of two class C networks 
     46(one on each side of the router).  The client DAS is on one network and 
     47will connect to the router through an asynch serial interface using 
     48PPP. The server is on the other network and the router takes care of 
     49routing the traffic between the two networks. 
     53        SERVER 
     54         RTPD 
     56          | 
     57          | 
     58          | network 
     59      ------------------------------------------- 
     60                                      | 
     61                                      | 
     62                                      | 
     63                                 -------------------------- 
     64                                 |                        | 
     65                                 |    CISCO 2509          | 
     66                                 |                        | 
     67                                 -------------------------- 
     68                                   |                   | 
     69                                 Async1             Async2 
     71                                   |                   | 
     72                                   |      PPP          | 
     73                                   |      LINK         | 
     74                                   |                   | 
     76                                   |                   | 
     77                              ------------        ------------ 
     78                              |          |        |          |      
     79                              | DAS#7853 |        | DAS#7854 |      
     80                              |          |        |          |      
     81                              ------------        ------------ 
     84The Cisco router configuration for the setup shown above is as 
     87hostname RefTekRouter 
     90username das#7853 password 0 das#7853 
     91username das#7854 password 0 das#7854 
     93interface Ethernet0 
     94 ip address 
     96interface Serial0 
     97 no ip address 
     98 shutdown 
     100interface Serial1 
     101 no ip address 
     102 shutdown 
     104interface Async1 
     105interface Async1 
     106 ip address 
     107 ip helper-address 
     108 encapsulation ppp 
     109 async mode interactive 
     110 peer default ip address 
     111 no cdp enable 
     112 ppp authentication pap callin 
     114interface Async2 
     115interface Async2 
     116 ip address 
     117 ip helper-address 
     118 encapsulation ppp 
     119 async mode interactive 
     120 peer default ip address 
     121 no cdp enable 
     122 ppp authentication pap callin 
     124ip http server 
     125ip classless 
     126ip forward-protocol udp 2543 
     127ip route Ethernet0 
     128ip route Async1 
     129ip route Async2 
     130no logging console 
     131access-list 101 permit ip any any 
     132access-list 101 deny   igrp any host 
     133dialer-list 1 protocol ip list 101 
     135line con 0 
     136 exec-timeout 0 0 
     137line 1 2 
     138 autoselect ppp 
     139 modem InOut 
     140 transport input all 
     141 flowcontrol hardware 
     142line 3 8 
     143 transport input all 
     144line aux 0 
     145 transport input all 
     146line vty 0 4 
     147 exec-timeout 0 0 
     148 password reftek 
     149 login 
     154For more information about RTP consult the RefTek Protocol Manual. 
     159More information about installing and troubleshooting RTPD can be 
     160found in the RTPD Installation and Users Guide Manual. 
     1621.  Windows NT 4.0 
     164To configure the RTPD server as a Windows NT 4.0 service, copy the 
     165service executable rtpudpsvc.exe and the startup file rtpd.ini from the 
     166utils/winnt directory to, for example, c:\reftek. Edit the rtpd.ini 
     167file to reflect local customizations (for example, directory names, 
     168etc) then execute the following commands to install this program as a 
     171 c: 
     172 cd \reftek 
     173 svcins rptd_service "RefTek Data Server" c:\reftek\rtpudpsvc.exe 
     175The RTPD service can now be controlled like any other NT service, 
     176using the Services icon within the Control Panel. 
     1792.  Solaris 2.6 
     181o Copy the rtpd binary from the utils/solaris directory to whatever 
     182  directory you find convenient, and make sure it is setuid as the user 
     183  you want it to run as. 
     185This example assumes user "root", with executables in /usr/local/bin. 
     186In that case you would copy rtpd to /usr/local/bin and execute the 
     187following commands: 
     189   chown root /usr/local/bin/rtpd 
     190   chmod 4555 /usr/local/bin/rtpd 
     193o Copy the rtpd.ini file from solaris/winnt to, for example, 
     194  /usr/local/etc directory and make any local customizations to it. 
     196The Solaris version of the file is identical to the NT version, with 
     197the exception that path names are different.  You also have the choice 
     198of using the syslog logging facility.  Suppose you want to use syslog. 
     199Then select a facility and give it in the ini file like: 
     201Facility   LOCAL6 
     203Then, edit /etc/syslog.conf and include the following line: 
     205local6.debug    /var/log/local6 
     207Note that it should be a TAB between the two tokens.  Create 
     208/var/log/local6 and HUP syslogd (as root, kill -HUP ), 
     209once to get it to reread the conf file.  See syslog.conf(4) and 
     210syslogd(1M) for additional information. 
     213o Copy the startup script utils/solaris/rtpd_init to /etc/init.d  
     214  and make sure that it is executable (mode 544) and owned by root.  
     215  Change directory names and make any other local customizations.  
     217  Make the following soft links:: 
     219# ln -s /etc/init.d/rtpd_init /etc/rc3.d/S75rtpd_init 
     220# ln -s /etc/init.d/rtpd_init /etc/rc2.d/K10rtpd_init 
     221# ln -s /etc/init.d/rtpd_init /etc/rc0.d/K10rtpd_init 
     223This will cause RTPD to be started automatically at boot time, and to 
     224go down gracefully at system shutdown.   
     226The following command will manually stop the RTPD server: 
     228reftek% /etc/init.d/rtpd_init stop 
     230The following command will manually start the RTPD server: 
     232reftek% /etc/init.d/rtpd_init start 
     235=== How to Compile Reftek2ew === 
     237In order to build this program, you need to define the following in 
     238your earthworm.d file: 
     240RAW_RING       - transport ring for raw packets from the RTP server 
     241MOD_IMPORT_RTP - module id for this process 
     242TYPE_REFTEK    - message type for raw RTP server packets 
     244If you want to assign pin numbers, you will need to define them in a 
     245parameter file.  See import_rtp.d for the specification syntax, and 
     246see reftek.scn for an example. 
     248All dialog with the RTP server is done via the Refraction Technology 
     249API and libraries.  You can get a copy of this toolkit from 
     253Install the libraries and include files as per the instructions provided 
     254with the toolkit.  You will need to specify the installation location in 
     255your makefile.  See the comments in the makefile appropriate for your 
     259=== Example Configuration File === 
     261# @(#)import_rtp.d      1.3 07/01/98 
     262# reftek2ew parameter file 
     264#  Basic Earthworm setup: 
     266MyModuleId         MOD_REFTEK2EW  # module id for this process 
     267WaveRing           WAVE_RING      # output ring for TRACEBUF messages 
     268RawRing            RAW_RING       # output ring for REFTEK messages 
     269HeartBeatInterval  30             # seconds between heartbeats 
     271# At least one of WaveRing and RtpRing must be defined. 
     273# If you have selected a WaveRing to output TRACEBUF messages, then it 
     274# is necessary to define a mapping between the digitizer, stream, channel 
     275# information that is contained in each packet to the station, channel, 
     276# net, and pin number that is required by the TRACEBUF messages.  There 
     277# is no standard way to do this in vanilla Earthworm, therefore import_rtp 
     278# defines yet another parameter file.  If you don't specify this file, 
     279# then import_rtp issues a warning message on start up and then generates 
     280# its own names.  Station name is the unit id, channel name is built up 
     281# from the stream and channel values in the DT header (stream:chan), the 
     282# networm name is set to "RTP", and the pin number is set to -1. 
     284SCNLFile            reftek.scnl 
     286# Give the fully qualified host name, or the IP address of the server in 
     287# the usual decimal dot notation, followed by the port number for the RTP 
     288# service.  If you are running this on the same computer as the RTP server, 
     289# then specify "localhost" as the host name. 
     291Server             localhost    7000 
     293# The API allows you to request data from a single, specific, DAS or from 
     294# all DAS(es).  There is no provision in the API for requesting data from 
     295# a subset of the available digitizers.  If you want data from a single DAS, 
     296# give its unit id here, otherwise enter 0 to select all digitizers. 
     298DASid              0 
     300# You may filter the input based on packet type.  The following types are 
     301# supported: AD CD DS DT EH ET OM SC SH.  List the ones you want, or enter 
     302# ALL for all available. 
     304PktMask            ET DT SC 
     306# You may filter the DT packets based on stream.  List the stream id's you 
     307# want to see.  The stream codes here are the one-based values that are 
     308# used by people, not the zero-based values that are in the headers. 
     310StrMask            1 2 3 4 5 6 7 8 
     315modName  reftek2ew 
     316modId    MOD_REFTEK2EW 
     317instId   INST_MENLO 
     319tsec: 60  page: 0  mail: 10 
     321# Uncomment the "restartMe" line to enable automatic restart of this 
     322# process by statmgr/startstop.  statmgr will issue a TYPE_RESTART 
     323# message for this process_id if it declares the patient dead. 
     327err: 1  nerr: 1  tsec: 0  page: 0  mail: 20  
     328text: "RTP server OK." 
     330err: 2  nerr: 1  tsec: 0  page: 0  mail: 20  
     331text: "RTP server not responding." 
     333err: 3  nerr: 1  tsec: 0  page: 0  mail: 20  
     334text: "no data from RTP server." 
     338== Helpful Hints ==