;       CONFIGURATION FILE FOR >CALLSIGN< LINBPQ PACKET NODE
;       FOR USE WITH WINLINK AND EMERGENCY COMMUNICATIONS
;       EVERYWHERE you see the word      CALLSIGN, 
;       put in your ham radio callsign 
;
;   Use copy and paste to put this in a Text Editor and then save it 
;   as /home/pi/bpq32.cfg     The case and spelling are important.
;
;   John Wiseman has extensive help for this file in several places:
;   https://dl.dropboxusercontent.com/u/31910649/bpq32.cfg.Examples.zip 
;   http://www.cantab.net/users/john.wiseman/Documents/BPQ32%20Installation.htm
;   http://www.cantab.net/users/john.wiseman/Documents/BPQCFGFile.html 
;
;       The order of parameters in not important, but they
;       all must be specified - there are no defaults
;
; CREATE YOUR SYSOP PASSWORD USING THE NEXT LINE
PASSWORD=putyourpasswordhere;              ; SYSOP Password
;
;
SIMPLE                          ; Hopefully this sets a bunch of parameters
                                ; to reasonable defaults....
NODECALL=CALLSIGN-7
LOCATOR=XXXX               ; Enable Map Reporting  Put your Maidenhead Locator here
MAPCOMMENT=BPQ32 Node<BR> CITY, STATE 
;
;       BBS enables the Application support system. 
;       If you have specified any of the APPLnCALLS,
;       you should set BBS to 1.
;
BBS=1           ; INCLUDE BBS SUPPORT
;
;       NODE
NODE=1          ; INCLUDE SWITCH SUPPORT
;
; The NODES and ROUTES tables can be saved, so that they can be 
; reloaded when the software is restarted,
; rather than having to wait for the tables to be rebuilt. 
; There is a program SAVENODES.exe and a command
; to the BPQ32 console to to this. By Setting AUTOSAVE=1, 
; the tables will be saved each time the software closes
;
AUTOSAVE=1              ; Save Nodes File before exiting
;
;
;       Station Identification.
;
;       If a user connects to the NODE Callsign or Alias, he is linked
;       to the switch code, and can use normal NetRom/TheNet commands
;
;       If he connects to an Application Callsign or Alias he will be connected
;       directly to the corresponding application. 
;       If not available, the connect will
;       be rejected. See the section on Application Calls towards the 
;       bottom of the file for
;       more information.
;
;       Note that for compatibility with the DOS version, 
;       and older versions of BPQ32, BBSCALL is an alias for APPL1CALL,
;       and BBSALIAS is an alias for APPL1ALIAS. If both BBSCALL and 
;       APPL1CALL are specified, the BBSCALL will be ignored.      
;
;
NODECALL=CALLSIGN-7        ; NODE CALLSIGN
NODEALIAS=ALIAS         ; pick an alias to go here  

;       'ID' MESSAGE - SENT EVERY IDINTERVAL MINS
;
;       WILL BE ADDRESSED FROM THE PORT CALLSIGN (IF DEFINED)
;            ELSE FROM THE NODE CALL
;
;       The main purpose of this is to satisfy the requirements of those
;       administrations that require a regular station 
;       identification in the same mode as used for communication. 

IDMSG:
CALLSIGN-7 Network node (BPQ)
***
IDINTERVAL=10;     to meet FCC requirements

;       'I' COMMAND TEXT
;
;
INFOMSG:
CALLSIGN-7 LINBPQ, CITY STATE
Remember that BPQ systems have to specify PORTS.
E.G., MHeard 4   rather than simply MHeard.
***


; BTEXT is the default beacon sent by the Node. Note that application 
; programs may change this, or
; generate their own beacons.
; An APRS compatible position may be included. 

BTEXT:
= CITY STATE {BPQ32}
CALLSIGN's BPQ Node.  Port 4 is 2 meter outlet.
***
BTINTERVAL=30; Send beacon text this often

;
;       CTEXT - Normally will only be sent when someone connects to 
;       the NODE ALIAS at level 2. If FULL_CTEXT is set to 1, it 
;       will be sent to all connectees. Note that this could confuse BBS
;       forwarding connect scripts. 
;
CTEXT:
Welcome to CALLSIGN-7 BPQ Node. Port 4=2 meters
Type ? for list of available commands.
***
;
FULL_CTEXT=0            ; SEND CTEXT TO EVERYBODY
HFCTEXT=BPQ32 Node CALLSIGN-7 CITY STATE
;
;  ------------------SET UP FOR CONNECTIONS TO RMS RELAY --------------

;CMSCALL=CALLSIGN-11                   ;  GATEWAY AUTHORIZED CALLSIGN WINLINK SYSTEM
;CMSPASS=                            ;  CMS PASSWORD
;  -------------------------------------------------------------------




;       Network System Parameters. 
;
;       These are my values. Many other node sysops use other values. 
;       If in doubt, liase with
;       those running nodes that you link to

OBSINIT=5               ; INITIAL OBSOLESCENCE VALUE
OBSMIN=4                ; MINIMUM TO BROADCAST
NODESINTERVAL=15        ; 'NODES' INTERVAL IN MINS, 15= easy to find
L3TIMETOLIVE=25         ; MAX L3 HOPS
L4RETRIES=4;            ; LEVEL 4 RETRY COUNT
L4TIMEOUT=60;           ; LEVEL 4 TIMEOUT
L4DELAY=10              ; LEVEL 4 DELAYED ACK TIMER
L4WINDOW=4              ; DEFAULT LEVEL 4 WINDOW
MINQUAL=120             ; MINIMUM QUALITY TO ADD TO NODES TABLE 



;       The following MAX params set the limits for various tables. 
;
;       Although significantly larger values can be used, a common area is used
;       for these tables and the buffer pool, so don't increase them more than 
;       necessary.

MAXLINKS=50            ; MAX LEVEL 2 LINKS (UP,DOWN AND INTERNODE)
MAXNODES=50;           ; MAX NODES IN SYSTEM
MAXROUTES=30            ; MAX ADJACENT NODES
MAXCIRCUITS=50         ; NUMBER OF L4 CIRCUITS

        

BUFFERS=400             ; PACKET BUFFERS - 999 MEANS ALLOCATE AS MANY
                        ; AS POSSIBLE - NORMALLY ABOUT 600, DEPENDING
                        ; ON OTHER TABLE SIZES
;
;       TNC DEFAULT PARAMS
;
PACLEN=64              ; MAX PACKET SIZE
;
;       PACLEN is a problem! The ideal size depends on the link(s) over
;       which a packet will be sent. For a session involving another node,
;       we have no idea what is at the far end. Ideally each node should have
;       the capability to combine and then refragment messages to suit each
;       link segment - maybe when there are more of my (G8BPQ) nodes about than
;      'real'
;       ones, i'll do it. When the node is accessed directly, things are a
;       bit easier, as we know at least something about the link.
;       So there are two PACLEN params, one here and
;       one in the PORTS section. This one is used to set the initial value
;       for sessions via other nodes, and for sessions initiated from here.
;       The other is used for incoming direct (Level 2) sessions. In all cases
;       the Node PACLEN command can be used to override the defaults.
;
;       236 is the largest that can be sent over a NETROM link without
;       fragmetation.
;       so don't go above this unless you don't have any NETROM links.
;
;       Level 2 Parameters
;
;       Most Level 2 parameters are specified in the PORTS section'
;
T3=180                  ; LINK VALIDATION TIMER (3 MINS)
IDLETIME=900            ; IDLE LINK SHUTDOWN TIMER (15 MINS)    
;
;
HIDENODES=0             ; IF SET TO 1, NODES STARTING WITH # WILL
                        ; ONLY BE DISPLAYED BY A NODES * COMMAND
;
;       THE *** LINKED COMMAND IS INTENDED FOR USE BY GATEWAY SOFTWARE, AND
;       CONCERN HAS BEEN EXPRESSED THAT IT COULD BE MISUSED. I RECOMMEND THAT
;       IT IS DISABLED IF NOT NEEDED.
;
ENABLE_LINKED=A         ; CONTROLS PROCESSING OF *** LINKED COMMAND
                                ; Y ALLOWS UNRESTRICTED USE
                                ; A ALLOWS USE BY APPLICATION PROGRAM
                                ; N (OR ANY OTHER VALUE) DISABLE
;
;       AX25 PORT DEFINITIONS
;
;       These define the external links - normally to radios, but possibly
;       to other computers, modems, etc. 
; 
;       The KISS protocol supports dual port TNC's such as the KAM and KPC4.
;       You should define two port entries with the same IO addr
;       and SPEED - set CHANNEL=A for the first and B for the second.
;
;       Note that all timer values are in ms intervals. Most TNC's
;       use different units for the various timers, so be careful!
;
;       All parameters should be set for all ports, but not all
;       drivers support all features. For instance, the NETROM driver
;       does not use the TXDELAY, SLOTTIME and PERSIST values. The NETROM
;       driver only works in FULL DUPLEX mode, and the HDLC only in
;       HALF DUPLEX.
;;
;       CWID works only on DRSI and PC120 cards, and can be suppressed 
;       by omitting the parameter.
;
;       BECAUSE OF OUR ODD LICENCING CONDITIONS YOU MAY WISH TO BAN
;       CONNECTIONS TO THE BBS CALLSIGN ON SOME PORTS - USERS MAY STILL
;       CONNECT USING L4, OR CONNECT TO THE NODE ADDR, AND USE BBS
;       COMMAND. PUT 'BBSFLAG=NOBBS' TO ACTIVATE THIS FUNCTION.
;       'BBSFLAG=BBSOK', OR NO PARM, MEANS BEHAVE AS NORMAL
;
;       You can have an extra callsign and alias for each
;       port for user access only. The callsigns defined in NODECALL and
;       BBSCALL are used for all networking activity.
;
PORT
 ID=LOOPBACK
 TYPE=INTERNAL
 PROTOCOL=KISS
 CHANNEL=A
 QUALITY=0
 MAXFRAME=6
 FULLDUP=0
 FRACK=10000
 RESPTIME=3000
 RETRIES=10
 PACLEN=200
 TXDELAY=500
 SLOTTIME=100
 PERSIST=64
 DIGIFLAG=1   ; 0= NO  1= ALL   255= UI only
 DIGIPORT = 0   ; Port to send digi'd packets, 0 = same port
 UNPROTO=FBB
ENDPORT
;
PORT
 ID=AXIP Link
 TYPE=EXTERNAL
 DLLNAME=BPQAXIP.DLL
 QUALITY=200
 MAXFRAME=4
 FRACK=5000
 RESPTIME=1000
 RETRIES=10
 PACLEN=236
 MINQUAL=150
 UNPROTO=FBB            ; DEFAULT UNPROTO ADDR
 BCALL=CALLSIGN           ; Call for Beacons
 
 CONFIG
 
 UDP 10093                 # Optional. Enables UDP support, and defines the port
                           # AX.IP listens on. You can specify more than one
                           # UDP line if you need to listen on more than one port
                                 
 MHEARD                    # Optional - opens a window to display a "Heard List" 
 BROADCAST NODES
 ;MAP CALLSIGN  G8BPQ.NO-IP.COM UDP 10093 B
 
 ; Steve Conrad, VE9SC, provides a service which displays a map of BPQMailChat
 ; nodes dynamically updated:  http://guardian.no-ip.org/bpqmap/ChatNetwork.htm
 ; The following line causes your Chat Node to be included on the map.
; MAP DUMMY chatmap.g8bpq.net UDP 10090
ENDPORT
;


; ********************PORT 3  TELNET **************************************
PORT
 ID=Telnet Server
 DRIVER=Telnet
 CONFIG
    LOGGING=1
    DisconnectOnClose=0     ;  1 = closes window when you bye
    TCPPORT=8010
    FBBPORT=8011
    HTTPPORT=8080
    LOGINPROMPT=user:
    PASSWORDPROMPT=password:
    MAXSESSIONS=10

    CMS=1
    CMSCALL=CALLSIGN-11       ; CMS Access Callsign (with SSID if used)
    CMSPASS=                ; WL2K sysop password
    FALLBACKTORELAY=1    ; will try to get to RMS RELAY if CMS unavaiable
    RELAYHOST=192.168.1.21  ; put the name or ip number of your RMS_RELAY here
 
    CTEXT=Welcome to CALLSIGN Telnet Server\n Enter ? for list of commands\n\n
    USER=username1,password1,callsign1,,SYSOP
    USER=username2,password2,callsign2,,
; add as many as you like


ENDPORT

; -----------------PORT 4  THE 2 METER RADIO ------------------------
; Adjust options to either use /dev/ttyUSB0 (for TNC-x over usb)
; or soundcard (signalink or $10 TNC) over tcp/ip to DIREWOLF
;
PORT
; ID=KISS COM1    ; for KISS TNC-X on Raspberry PI usb port
ID=Direwolf Soundcard-based
 TYPE=ASYNC
 PROTOCOL=KISS
; COMPORT=/dev/ttyUSB0   ; TNC-X
IPADDR=127.0.0.1         ; DIREWOLF
TCPPORT=8001             ; DIREWOLF
 SPEED=9600
 INTLEVEL=4
 CHANNEL A ;   worked with TNC-X  & also for Direwolf 1 chan 
; Other channels I have tried are 0; I don't think it matters
 QUALITY=0
 MAXFRAME=1            ; training wheels setting
 FULLDUP=0
 FRACK=10000
 RESPTIME=3000
 RETRIES=10
 PACLEN=64             ; also training wheels
 TXDELAY=500           ; intentionally long....training wheels
 TXTAIL=50    ;  used only by KISS devices...long so you can hear packet
 SLOTTIME=100
 PERSIST=64
 DIGIFLAG=1
 DIGIPORT=0

;
;       KISSOPTIONS=ACKMODE
;       KISSOPTIONS=POLLED,CHECKSUM

 UNPROTO=FBB
 MHEARD
 BROADCAST NODES     ; so routes will appear in other person's view

ENDPORT


ROUTES:
;
;       ROUTES TO LOCK IN
;
;       specify Callsign, Quality and Port. You can now also specify
;       MAXFRAME, FRACK, PACLEN (in that order) to override the port
;       defaults.
;
;
;AE5E-14,200,2,0,0,0,2     ; No Keepalives
;G4RFG,0,1                ; Marginal, So lock out by setting QUALITY = 0
;G0GDR-1,100,2,1,6000,100 ; not always very good, so MAXFRAME = 1
***
;
;       APPLICATIONS SUPPORTED
;
;       NAMES STARTING WITH * ARE NOT INCLUDED IN 'VALID COMMANDS' DISPALY
;
LINCHAT; Get the CHAT available
LINMAIL;
;
;  Applications.   These will show up first on the command list line,
;  followed by the standard commands.   
;  Uncomment the ones you want (you must be a WINLINK sysop to have
;  WINLINK access....)
;
;  The APPLCALL is the callsign associated with an application.
;  Apparently CHAT *must* have one....or you get an error on startup
;  Find the config file that CHAT creates...and edit it so that the 
;  Application number matches what you have for CHAT below:   
;
APPLICATION 1,CHAT,,CALLSIGN-4,linbpq,
;APPLICATION 2,RMS,C 3 CMS,CALLSIGN-11,linbpq,255
;APPLICATION 3,RELAY,C 3 RELAY,CALLSIGN-12,linbpq,255
;APPLICATION 3,FBB,,CALLSIGN-3,BPQFBB,0
;APPLICATION 4,BBS,,CALLSIGN-13,linbpq,255
;