#!/bin/sh # /etc/rc.d/rc.tnc # This shell script will initialise AX25 ports using mkiss. # Linux kernel is 2.2.26 # Two KPC9612 dual ports TNCs are connected to serial devices # ttyS0 and ttyS1 # TNCs serial speeds are configured at 38400 bauds # before putting them in KISS mode. # 73 de Bernard, F6BVP # echo "Installing KISS on ports 0-1" # # 0, 1, 2, 3 are the ports names defined in the first columns of /etc/ax25/axports # f6bvp.ampr.org address is 44.151.75.15 # # serial PORT ttyS1 connected to dual port KPC9612 TNC#2 (ttyS1 speed is 38400 bauds) /usr/local/sbin/mkiss -s 38400 -l /dev/ttyS1 /dev/ptyp3 /dev/ptyp4 # radio PORT#1 KPC9612 #2 = 1200 bauds ---> ax0 = 0 /usr/local/sbin/kissattach /dev/ttyp3 0 44.151.75.15 # radio PORT#2 KPC9612 #2 = 9600 bauds ---> ax1 = 1 /usr/local/sbin/kissattach /dev/ttyp4 1 44.151.75.15 # echo "Installing KISS on ports 2-3" # serial PORT ttyS0 connected to dual port KPC9612 TNC#1 (ttyS0 speed is 38400 bauds) /usr/local/sbin/mkiss -s 38400 -l /dev/ttyS0 /dev/ptyp1 /dev/ptyp2 # radio PORT #1 KPC9612 #1 = 1200 ---> ax2 = 2 /usr/local/sbin/kissattach /dev/ttyp1 2 44.151.75.15 # radio PORT #2 KPC9612 #1 = 9600 ---> ax3 = 3 /usr/local/sbin/kissattach /dev/ttyp2 3 44.151.75.15 # # installin NET/ROM #/usr/local/sbin/nrattach -i 44.151.75.15 -m 256 netrom #/usr/local/sbin/nrattach -i 44.151.75.15 -m 256 netnod # declaration for adjacent NET/ROM nodes via port 1=ax1, 3=ax3 #/usr/local/sbin/nrparms -nodes f5kck-13 + LNXKCK 120 6 1 f5kck-13 #/usr/local/sbin/nrparms -nodes f6kds-9 + LNXKDS 120 6 3 f6kds-9 # Broadcast NET/ROM #/usr/local/sbin/netromd -lid # remove NET/ROM default routes #/sbin/route del -net 44.0.0.0/8 nr0 #/sbin/route del -net 44.0.0.0/8 nr1 #/sbin/route del -net 44.0.0.0 netmask 255.255.255.255 eth0 # # With Linux kernel 2.2 and after, times are in 1/1000 of seconds sleep 2 # TNC #2 timers # TNC radio port #1 speed is 1200 bauds echo "TNC#2 port#1 timers adjustment via ax0" # T1 FRACK time wait before retransmitting a non ACKed frame echo 3000 > /proc/sys/net/ax25/ax0/t1_timeout # T2 RESPTIME minimal time before a new frame ACK echo 500 > /proc/sys/net/ax25/ax0/t2_timeout # T3 CHECK wait time before testing if link is OK echo 40000 > /proc/sys/net/ax25/ax0/t3_timeout # self explain echo 250 > /proc/sys/net/ax25/ax0/maximum_packet_length # # TNC radio port #2 speed is 9600 bauds echo "TNC#2 port#2 timers adjustment via ax1" # T1 FRACK time wait before retransmitting a non ACKed frame echo 3000 > /proc/sys/net/ax25/ax1/t1_timeout # T2 RESPTIME minimal time before a new frame ACK echo 2500 > /proc/sys/net/ax25/ax1/t2_timeout # T3 CHECK wait time before testing if link is OK echo 40000 > /proc/sys/net/ax25/ax1/t3_timeout # echo 250 > /proc/sys/net/ax25/ax1/maximum_packet_length # # TNC#1 timers # TNC radio port #1 speed is 1200 bauds echo "TNC#1 port#1 timers adjustement via ax2" # T1 FRACK time wait before retransmitting a non ACKed frame echo 3000 > /proc/sys/net/ax25/ax2/t1_timeout # T2 RESPTIME minimal time before a new frame ACK echo 500 > /proc/sys/net/ax25/ax2/t2_timeout # T3 CHECK wait time before testing if link is OK echo 40000 > /proc/sys/net/ax25/ax2/t3_timeout # echo 250 > /proc/sys/net/ax25/ax2/maximum_packet_length # # TNC radio port #2 speed is 9600 bauds echo "TNC#1 port#2 timers adjustment via ax3" # T1 FRACK time wait before retransmitting a non ACKed frame echo 3000 > /proc/sys/net/ax25/ax3/t1_timeout # T2 RESPTIME minimal time before a new frame ACK echo 2500 > /proc/sys/net/ax25/ax3/t2_timeout # T3 CHECK wait time before testing if link is OK echo 40000 > /proc/sys/net/ax25/ax3/t3_timeout # echo 250 > /proc/sys/net/ax25/ax3/maximum_packet_length #