------------- INSTALLATION: ------------- 1. Create GPSTools/RFPlaybackRegression/config.xml with your setup For example see Sunnyvale_config.xml 2. Make sure you have needed tools: - Anaconda python 3 is the easiest distribution to install because I think it comes with almost all packages you need. I don't recall if the following are installed by default: flask flask-login msgpack pyserial Use "conda install" to install what you are missing. 3. Make directories: - GPSTools/RFPlaybackRegression/Samples/ Populate it with your XML scenario files. - GPSTools/RFPlaybackRegression/Builds/ I linked this to the SSD main drive for faster speed (but that is totally optional). - mkdir GPSTools/RFPlaybackRegression/OutputResults (This should be done in ProcessResults.py...) - Manually run the server and it will tell you about more missing directories: ./run_control.sh (Ctrl-C kill if it doesn't immediately exit with an error, otherwise create any directories it wants.) - Manually run ProcessResults and it will create more directories/files: ./ProcessResults.py 4. Edit GPSTools/RFPlaybackRegression/ run_web.sh and run_control.sh with your paths: - Under GPSTools/ do: cvs checkout NoPi - needs NoPi, t012kml, StingerNavPC, viewdat in path - needs setup so CVS checkouts of coreBuild work - you can set up CCACHE/DISTCC for faster coreBuild compiles - needs Anaconda path setup - needs Python include path to "GPSTools/pythonTools" 5. If you have a USB/serial port: Also need to make sure /dev/ttyUSB0 comes up with the correct permissions. Create /etc/udev/rules.d/71-persistent-usb.rules with: SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE="0666" 6. To automatically start on a systemd-enabled machine, edit then install RFcontrol.service and RFweb.service. e.g.: cp *.service /etc/systemd/system/ systemctl daemon-reload systemctl start RFcontrol.service systemctl start RFweb.service systemctl enable RFcontrol.service systemctl enable RFweb.service To check status of a service: journalctl -u RFweb.service 7. For automated weekly runs, add the following to a crontab. Currently in wlentz's crontab on fermion: 0 16 * * fri /mnt/data_drive/SpirentTest/GPSTools/RFPlaybackRegression/start_full_regression.py 8. After you have a OutputResults/all_data.db file, you probably want to turn on sqlite WAL mode to avoid read/write lock timeout issues. This requires the database is not on a network drive. Run the following once: sqlite3 OutputResults/all_data.db 'PRAGMA journal_mode=WAL;'; ---------------------------------------------------------------------- To run server manually using anaconda Python: cd /mnt/data_drive/SpirentTest/GPSTools/RFPlaybackRegression ./run_control.sh & ./run_web.sh & ---------------------------------------------------------------------- Optional Steps(required only if using Ag receivers with RFReplay): ---------------------------------------------------------------------- Harware: Moxa box connected to linux server with ethernet connection Ag receiver Port-A(for tsip serial control), Port-C(ZDA output,RTCM input) connected to moxa serial port Ag receiver 4-pin TCP socket(for writing T04 using TNFS) using BroadRReach to ethernet convertor(eg. Mojito) connected to linux server with ethernet Ag receiver RF signal input connected to Spirent Software: You may skip step 1 - 4 if already done 1. Install moxa driver (m64 option is for 64-bit system) manual url: https://cdn-cms.azureedge.net/getmedia/b397ab89-af2d-4f40-b374-d54cd87f4882/moxa-nport-5000-series-manual-v6.4.pdf download driver for linux env, see manual "8. Linux Real TTY Drivers" >> sudo ./mxinst m64 (m64 option is for 64-bit system. To solve problems caused by server reboot, try uninstall >> sudo ./mxuninst then install again) moxa driver will be installed at /usr/lib/npreal2/driver 2. Map ethernet to serial TSIP python lib use serial connection to control receivers >> cd /usr/lib/npreal2/driver to show a list of mapping port >> cat /usr/lib/npreal2/driver/npreal2d.cf currently there is nothing load moxa server >> sudo ./mxloadsvr configure moxa box in persion on its display. set static ip address eg. 10.1.150.0 map ethernet to serial >> sudo ./mxaddsvr 10.1.150.0 8 >> cat /usr/lib/npreal2/driver/npreal2d.cf now it will show moxa box port 1-8 is now mapped to /dev/ttyr00-07 Note /ttyr00-07 are used in section in config.xml file 3. Install TNFS server TNFS enables ag receiver to write logging files to server instead of internal 28MB flash get tnfs.tar from Andy Arch >> tar -xvf tnfs.tar >> cd platform.external.tnfsserver >> mkdir build >> cd build >> cmake .. >> make 4 Run TNFS server >> ./tnfsserver 2030 -d terminal will show message when ag receiver's TNFS server IP is set and trying to connect. .tsip and .t0x files will be written at ./gpsData/ Note TNFS server path(TNFS_server_root) and ip address(TNFS_server_ip_address) needs to be defined in in config.xml 5. Check out Ag tools Create folder GPSTools/RFPlaybackRegression/AgLib/ Add id_rsa.pub to bitbucket “ssh key” >> git config --global user.name "??" >> git config --global user.email "??@trimble.com" >> cd GPSTools/RFPlaybackRegression/AgLib >> git clone --filter=blob:none ssh://git@bitbucket.trimble.tools/agri/testautomation.git --recursive confirm AgLib/testautomation/drivers/py_tsip/ is not empty confirm AgLib/testautomation/drivers/pyflash/ is not empty >> cd .. set env variable BAMBOO_PW to enable Ag firmware download >> export BAMBOO_PW=? (Ask Ag testing team, eg. Dan Costello) try following cmd to confirm tsip and pyflash is working (assuming ag receiver's Port-A has been mapped to eg. /dev/ttyr03 already) >> python3 AGRXTools.py /dev/ttyr03 download 6. Add info section for ag receivers in config.xml 7. Lanuch RFReplay, then click ag receiver's hyperlink to confirm setup and see receiver's info