Linux terminal

Packet na linuxu v terminálu :

 

nainstalujeme ax25-apps ax25-tools libax25 

 

 

/etc/ax25/ax25udp.conf  

socket udp
mode tnc
mycall CZ3DTC # Volačka teminálu
device /dev/ptmx
speed 115200
loglevel 4
broadcast NODES
route dig233 62.54.177.44 udp 93 d
route ks0nod 194.59.177.64 udp 93 d
route bn1obb 46.232.248.101 udp 9093 d
route dok346 159.69.155.16 udp 93 d
route cb0hal dno320.no-ip.org udp 8093 d
route cb0dln-8 CB0DLN.MYFTP.BIZ udp 93 d

 

 

/etc/ax25/axports

# name callsign speed paclen window description
ax0     CZ3DTC          115200  255     7       Internet    (115200)
 

 

/etc/ax25/ax25-up
#!/bin/bash
# /etc/ax25/ax25-up

# Set Sysctl values
sysctl -w kernel.panic=30
sysctl -w kernel.panic_on_oops=30  

# Attach KISS-device /dev/ttyS0 to Port 0  

ttyAXUDP=$(/sbin/ax25ipd -c /etc/ax25/ax25udp.conf | tail -1)
/usr/sbin/kissattach -l $ttyAXUDP ax0 >/tmp/ax25-config.tmp
 awk ‚/device/ { print $7 }‘ /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
 read Device > /tmp/ax25-config-tmp  

# Parms for Port0  (LAN)
cd /proc/sys/net/ax25/$Device/
echo 3100   > t1_timeout        # (Frack) /100 = seconds (1 – 30) seconds
echo 1000   > t2_timeout        # (RESPtime) /100 = .001 seconds (1 – 20)second
echo 300000 > t3_timeout        # (Check) /600 = min (0 – 3600)seconds
echo 600000 > idle_timeout      # Disconnect when idle /600 = min (0 or greater)
echo 0      > ax25_default_mode # AX25 Default Mode 0 = Normal,1 = Extended (0)
echo 0      > ip_default_mode   # IP Default Mode 0 = Standard (mod 7),1 = Extended (mod 127)(0)
echo 0      > backoff_type      # Backoff 0 = Original, 1 = linear, 2 = exponential (1)
echo 256 > maximum_packet_length # Frame Size 1 – 512 (256)
echo 2  > connect_mode           # Connect Mode 0 = None, 1 = Network, 2 = All (2)
echo 8  > maximum_retry_count    # N2 (1 -31)
echo 180000 > dama_slave_timeout
echo 32     > extended_window_size
echo 2      > standard_window_size # Max frames
echo 0 > protocol                  

# Start ax25d daemon
 /usr/sbin/ax25d &
 echo „ax25d started“

# Start Mheard daemon
 /usr/sbin/mheardd  
 echo „mheardd Started“

# (End of ax25.up)

/etc/ax25/ax25-down  
#!/bin/bash
# /etc/ax25/ax25-down
# Stop Ax25 support
for PROC_NAME in beacon ax25d ax25ipd ax25rtd mheardd listen
  do
  PID=`/bin/pidof -x $PROC_NAME`
    if [ -n „$PID“ ]; then  
       kill -TERM $PID > /dev/null
       echo „$PROC_NAME – $PID „
       sleep 1
    fi
  done

# Stop netromd if it is running
 pidof netromd > /dev/null
  if [ $? -eq  0 ]; then
  killall netromd
  echo Netrom Stopped  
  fi  

# Close sockets
echo „Detach Ax/Nr/Sp Devices“
echo `ifconfig|grep AMPR` > /tmp/ax25-config.tmp
read Select > /tmp/ax25-config.tmp  
i=0  
while [ „$Select“ != „“ ]
 do  
  let i=i+1  
  awk ‚ NR == ‚$i‘ { print $1 }‘ /tmp/ax25-config.tmp > /tmp/ax25-config-tmp  
  read Select < /tmp/ax25-config-tmp  
  if [ „$Select“ != „“ ]; then   
    ifconfig $Select down
    echo “ $Select detached“  
  fi  
 done  

# Stop Kissattach  
 killall -KILL kissattach > /dev/null  

 echo „Ax25 Stopped“
# End of ax25-down

 

/lib/systemd/system/ax25.service
[Unit]
Description=AX.25 interface
After=network.target

[Service]
#EnvironmentFile=/etc/ax25
Type=simple
Restart=always
RestartSec=1
TimeoutSec=0
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SysVStartPriority=12
ExecStart=/etc/ax25/ax25-up
ExecStop=/etc/ax25/ax25-down

[Install]
WantedBy=multi-user.target

 

 

sudo systemctl enable ax25
sudo systemctl start ax25
 

call ax0 bn1obb 

 

nebo

 

call ax0 ks0nod

 

 

 

Můžeme i nainstalovat linpac v archu

 

 

git clone https://github.com/yu4zed/arch-ax25
cd arch-ax25/linpac/
makepkg -si