wiki:SoftWare
Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.
Last modified 8 months ago Last modified on 09.01.2017 17:29:26

Software

Python scripts

Cube-plugin

Master config file example:

#
# Configuration file for CCube - used with master-script
# version 0.1 - Tue Mar 8 11:40:53 CET 2016
# author: Matthias Ohrnberger, mao@geo.uni-potsdam.de
#
#############################################################
# CUBE acquisition parameters section
# we may think of "ACTION GET/SET" parameter .... (?)
DIGITIZER-ID AAC
DIGITIZER-VERS 1
# may be 1 or 2 ... (different config files)
S_RATE 100 # one of 50, 100, 200, 400
P_AMPL 1
# one of 1, 2, 4, 8, 16, 32, 64
E_NAME MAMBA
# GPS_ON is going to be set to one (1) ALWAYS! not selectable
# rest of CUBE^3 configuration file is pre-set with fixed values
#############################################################
#############################################################
# seedlink / cube_plugin parameters
# parameters needed to setup up cube_plugin and seedlink
NETWORK yy
STATION ABCDE # check whether it may be 5 characters... (?)
# LOCATION 00 # not yet compatibel with plugin
STREAM HH
SATELLITES 3 # minimum number of satellites needed
#############################################################
#############################################################
# Communication settings - specification of operation for
# all network devices: eth0 / wlan0 and usb0
ETHERMODE 2 # one of 0, 1, 2 - add as u need ...
ETHERIP 192.168.0.100 # derived from device eeprom
WLANMODE 0 # one of 0, 1, 2 - add as u need ...
WLANIP 172.16.0.100 # derived from device eeprom
WLANCHAN 1 # one of 1, 6, 12
UMTSMODE 0 # one of 0, 1, 2, 3, 4 -->
# 0G means OFF, 1G means AUTO, 2G, 3G, 4G
UMTSAPN internet.t-d1.de #
SIMPIN xxxx # pin in fulltext!
#############################################################
#############################################################
# VPN settings - config for device tun0
43
# /etc/openvpn/client.conf
# NOTE: please fill VPNREMOTE variable even if you don’t
# want to use openvpn - it is needed for not breaking the
# general configure script!
VPNPROTO udp
VPNREMOTE 141.89.111.92 1194
#############################################################

Routing per iptables:

iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward


root@CC006:~# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  anywhere             anywhere     


root@CC006:~# iptables  -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
daniel@maipo:~/CCUBE$ more iptab_works_info.txt~ 
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward


root@CC006:~# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  anywhere             anywhere     


root@CC006:~# iptables  -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination     

root@CC006:~# lsmod
Module                  Size  Used by
iptable_filter          1387  1 
ipt_MASQUERADE          1785  1 
iptable_nat             2534  1 
nf_conntrack_ipv4      12666  1 
nf_defrag_ipv4          1475  1 nf_conntrack_ipv4
nf_nat_ipv4             3575  1 iptable_nat
nf_nat                 14817  3 ipt_MASQUERADE,nf_nat_ipv4,iptable_nat
nf_conntrack           85401  5 ipt_MASQUERADE,nf_nat,nf_nat_ipv4,iptable_nat,nf_conntrack_ipv4
ip_tables              10185  2 iptable_filter,iptable_nat
x_tables               16535  3 ip_tables,ipt_MASQUERADE,iptable_filter
tun                    17611  2 
cdc_ether               4522  0 
usbnet                 24315  1 cdc_ether
mii                     4991  1 usbnet
lm92                    6010  0 
hwmon                   3685  1 lm92
at91_adc               10046  0 
industrialio_triggered_buffer     1487  1 at91_adc
kfifo_buf               2478  1 industrialio_triggered_buffer
industrialio           44524  3 at91_adc,industrialio_triggered_buffer,kfifo_buf
i2c_at91                8057  0 

root@CC006:~# iptables-save -t nat
# Generated by iptables-save v1.4.14 on Tue Aug 23 13:30:38 2016
*nat
:PREROUTING ACCEPT [141:9037]
:INPUT ACCEPT [133:8701]
:OUTPUT ACCEPT [95:6302]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o usb0 -j MASQUERADE
COMMIT
# Completed on Tue Aug 23 13:30:38 2016

root@CC006:~# iptables-save       
# Generated by iptables-save v1.4.14 on Tue Aug 23 13:30:55 2016
*filter
:INPUT ACCEPT [20962:2478398]
:FORWARD ACCEPT [8575:324306]
:OUTPUT ACCEPT [20974:2477948]
-A FORWARD -i eth0 -j ACCEPT
COMMIT
# Completed on Tue Aug 23 13:30:55 2016
# Generated by iptables-save v1.4.14 on Tue Aug 23 13:30:55 2016
*nat
:PREROUTING ACCEPT [141:9037]
:INPUT ACCEPT [133:8701]
:OUTPUT ACCEPT [95:6302]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o usb0 -j MASQUERADE
COMMIT
# Completed on Tue Aug 23 13:30:55 2016

Setup VPN

https://wiki.ubuntuusers.de/OpenVPN/ (German)
https://help.ubuntu.com/lts/serverguide/openvpn.html (English)