From 31d76e49c576ed4c0ed2e91892fae4b78c0a699b Mon Sep 17 00:00:00 2001 From: hadaq Date: Mon, 5 Nov 2012 09:48:22 +0000 Subject: [PATCH] added information about trbnetd and portmapd, mt --- trb3/GbEGettingStarted.tex | 57 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/trb3/GbEGettingStarted.tex b/trb3/GbEGettingStarted.tex index c157d7e..fe85f28 100644 --- a/trb3/GbEGettingStarted.tex +++ b/trb3/GbEGettingStarted.tex @@ -12,10 +12,63 @@ After loading the design, TRB3 will automatically start to send control packets Now you can reload the central FPGA and it should automatically aquire the IP address from the server. One can verify that by monitoring the network traffic or system log file. +\subsubsection{Trbnetd} +To access the TRB3 you can access it directly with trbcmd (the local version +found in ``trbsoft/trbnettools/libtrbnet'', but this is +not recommended and only meant to be used by experts for debugging. +To find out which version of trbcmd one uses you can type "trbcmd -V" +and in the output you will either find "Local TRB3" (local version) or "RPC" +for the RPC version. +The correct way is to use a trbnetd running on any machine in the +network, which has direct UDP access to the TRB3 to be controlled. This daemon +then collects all requests from many different clients and takes care of the +correct arbritration (doesn't work for non atomic accesses, like SPI-interface +which needs to access several registers one after the other). +The trbnetd needs to know the ip-address of the TRB3 and *can* additionally be +identified via a 8 bit number. +So, to start the trbnetd which connects to the TRB3 with the ip-name trb30 one +has to start the trbnetd in the following way: +\begin{verbatim} + TRB3_SERVER=trb030 trbnetd +\end{verbatim} +This opens a trbnetd with the RPC-id 0. +It is recommended to write down explicitly the RPC-id-number when starting the daemon, e.g: +\begin{verbatim} + TRB3_SERVER=trb030:9 trbnetd +\end{verbatim} +to start the trbnetd with the id 9. + +To access this trbnetd one uses trbcmd with the address of the daemon given in +the environment variable DAQOPSERVER, e.g.: +\begin{verbatim} + export DAQOPSERVER=kp1pc105:9 + trbcmd i 0xffff +\end{verbatim} + +Installation: + +For security reasons normally RPC-calls are only accepted from the loopback +interface, so we have to tell the rpcbind daemon running on the machine where +the trbnetd should run, that it should accept connections from anywhere. +This is the option "-i". + +In OpenSuse you have to edit the file +/etc/sysconfig/rpcbind and make the following entry: + +\begin{verbatim} + RPCBIND_OPTIONS="-i" +\end{verbatim} + +and then restart the daemon: + +\begin{verbatim} + rcrpcbind restart +\end{verbatim} + \subsubsection{Trbcmd server} \begin{itemize*} -\item Download the latest release of {\bf trbcmd} and {\bf libtrbnet} from CVS repository: \begin{verbatim}trbsoft/trbnettools/libtrbnet \end{verbatim} +\item Download the latest release of {\bf trbcmd} and {\bf libtrbnet} from CVS repository: \begin{verbatim} trbsoft/trbnettools\end{verbatim} \item Compile with appropriate flag: \begin{verbatim} make TRB3=1\end{verbatim} \item Set up the environment variable DAQ\_SERVER to your TRB3 hostname \item Make sure that the UDP port 5555 is open in your firewall @@ -23,4 +76,4 @@ Now you can reload the central FPGA and it should automatically aquire the IP ad \subsubsection{Usage} -Now you are ready to use the trbcmd in the same way as it is for the normal HADES system. \ No newline at end of file +Now you are ready to use the trbcmd in the same way as it is for the normal HADES system. -- 2.43.0