home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
misc
/
bpq403a
/
hostmode.doc
< prev
next >
Wrap
Text File
|
1990-04-08
|
4KB
|
148 lines
The BPQ Switch supports a simplified subset of PK232 Hostmode Commands.
This document is intended to give a brief intorduction to Hostmode, and
define the commands supported by the switch. For full details of the
PK232 implementation, see the appropriate supplier's manuals.
With Hostmode, a single (virtual) TNC Port to the switch may support
several simultaneous conversations. Messages are passed to and from the
switch as character strings, with start and end frame delimiters. The
first byte specifies the type of data (command, status reponse, user
data, etc), and the channel number. The system allows two basic modes of
operation, polled or unpolled. With Polled, data is only sent from the
switch to the application on receipt of a poll. With unpolled, the switch
may send stuff to the application whenever it likes. Each method has its
advantages, and indeed the two BBS systems that I know of that use Hostmode
(G8UFQ and AA4RE) have chosen different modes. Unfortunately neither issues
the command which defines which mode to run in, so I have provided two
Hostmode options, PK232/AA4RE (polled), and PK232/UFQ (unpolled). There
are other minor differences between my options, which will be mentioned
when the commands that they affect are discussed.
The basic frame format is
SOH (HEX 01) CONTROL Data ETB (HEX 17)
Any 01h, 10h, or 17h bytes appearing in the packet must be preceeded
by a 10h escape char, to avoid confusion with framing charaters.
The CONTROL byte has the following (hex) format:
Appl - Switch
2x Data for channel x
4x Command to channel x
4F General (non channel specific) command.
Switch - Appl
3x Data from channel x
4x Link status (reply to CO)
4F General command reply.
5x Link status report from channel x
5F Status Errors
3F is used for monitored data (RX), and 29 for Unproto stuff (TX)
The most important message formats are as follows:
TNC Command:
SOH 4F C C p p.. ETB Where CC is the command code, and pp... params.
The Switch will respond immediately (ie without waiting for a poll) with
SOH 4F C C 00 ETB If OK
or SOH 4F X X 01 ETB If invalid.
Connect:
SOH 4x C O Callsign ETB
Note that whatever call you specify, you will just be connected to the
switch. Use switch commands from then onwards.
Session Status:
SOH 4x C O ETB
Returns
SOH 4x C O a b c d e callsign ETB
Where a - f are hex values in range 0 - f, ORed with 30H
a = link state-1 (ie state 5 (connected) = 34h)
b = ax25 version (always 2 (32h))
c = number of unacked packets outstanding
d = number of retries (not supported - always 30h)
e = conperm flag (not supported - always 30h)
callsign = users callsign (if connected)
Session state changes (connected/disconnected) are reported as
SOH 5x 'Text string' ETB
When using polled mode the poll command is
SOH 4F G G ETB
The reply with be either SOH 4F G G 00 ETB, if nothing is available, or
one (any only one) data/monitored data/link status/data ack message.
Data is send on a connected channel as
SOH 2x (data) ETB
There is no immediate response. The system will reply with a data ack
when it is able to process another frame.
SOH 5F X X 00 ETB
The application must not send more data until this is received. Note in
polled mode, the data ack is returned in response to a poll.
Only a minimal subset of the full command set is implemented. The
following commands are processed - others are accepted, but ignored.
GG POLL
CO CONNECT or STATUS Request
MN MONITOR - MN0 means monitor off, MN1 monitor on
MN2 also set MCOM on. Defaults on in UFQ mode,
off in AA4RE mode
ZM Monitor port mask - as normal tnc MMASK command
UR Users - set max concurrent users. In UFQ mode defaults
to 9, in AA4RE mode to zero. The maximum is 15, but as
the hostmode spec uses channel 9 for UNPROTO stuff, I
recommend a limit of 9.
DI Disconnect. If followed by S (DIS), user is returned to
the node, instead of being fully disconnected.
John Wiseman G8BPQ
11/3/90