====== ASCII Basic Protocol ======
The ASCII Basic Protocol was developed for greater efficiency, when compared to the historical MBL/RLI protocol. Its design reduced the number of necessary transactions, which proves its convenience on high latency links, or in situations where radio/modem turnaround is particularly expensive (half-duplex links).
Commands and payload exchange is reduced to a minimum by pipelining multiple requests at a time. In typical transactions, up to five requests/messages are sent at once.
* The protocol availability is indicated by the ''F'' letter in the [[b2f:start#sid|SID]].
* All protocol command lines start in first column with the ''F'' character (''0x46'').
* All protocol command lines are terminated by a Carriage Return (CR) character (''0x0d'').
*
The ASCII Basic Protocol protocol MUST operate over a communication bearer which provides reliable and ordered delivery of at least 7-bit US-ASCII characters ([[https://en.wikipedia.org/wiki/8-bit_clean|8-bit clean]] channels satisfy this condition).
===== Commands =====
==== Pending mail proposal ====
The message pending proposal (''FB'') notifies the remote party some message are enqueued for transfer.
It is composed of 7 mandatory fields.
When multiple messages are to be proposed, up to five proposals can be grouped for transmission in a single block. A group of proposals SHALL be followed by the prompt proposal (''F>'').
ABNF Grammar:
ASCII_MESG_TYPE = "P" / "B" ; Type of message Private / Bulletin
ASCII_MESG_FROM = 1*VCHAR ; From field
ASCII_MESG_RCPT_BBS = 1*VCHAR ; Recipient FQDN / BBS
ASCII_MESG_RCPT_TO = 1*VCHAR ; Recipient (User part)
ASCII_MESG_MID = 1*VCHAR ; Message ID
ASCII_MESG_SIZE = 1*DIGIT ; Size of message in bytes
ASCII_PEND_PROPOSAL = "F" "B" WSP ASCII_MESG_TYPE WSP 0x0D
ASCII_PEND_CSUM = 0x20 2*2HEXDIG
ASCII_PEND_PROMPT = "F" ">" [ ASCII_PEND_CSUM ] 0x0D
ASCII_XFER_PEND = 1*5ASCII_PEND_PROPOSAL ASCII_PEND_PROMPT
==== No message pending ====
The no message pending proposal (''FF'') is used to notify the remote party that no further message are enqueued on our side.
Format:
FF
ABNF Grammar:
ASCII_XFER_NOPEND = "F" "F" 0x0D
==== Selective message retrieval ====
The selective message retrieval command (''FS'') is issued by the party which has been offered several pending messages.
It is used to tell the remote party how to process the proposed messages.
A ''FS'' command MUST have as many ''+'',''-'', or ''='' signs as lines in the related proposal.
Format:
FS
^ Code ^ Action ^ Remarks ^
| ''+'' | Accept | Send the message and delete it from the queue |
| ''-'' | Reject | Don't send the message and delete it from the queue |
| ''='' | Defer | Keep in the queue to retrieve it later |
ABNF Grammar:
RETR_TOKEN = "+" / "-" / "="
ASCII_XFER_RETR = "F" "S" %x20 1*RETR_TOKEN %x0D
==== Disconnection request ====
This command is exclusively sent by the called party, and signals the calling station the bearer can be torn down.
Format:
FF
ABNF Syntax:
ASCII_XFER_DISC = "F" "F" %x0D
==== Data transfer frame ====
The data transfer direction is reversed after every block of data.
Each message is structured as following:
* The message title on the first line,
* The message text on the following lines,
* The end of message symbol (Ctrl Z / ''0x1A'' in the last line.
ABNF Grammar:
FIXME clarify the end of message marker: is it ''%x1A %x0D'' or ''%x1A''?
ASCII_MESG_HEADER = 1*(WSP / VCHAR) %x0D
ASCII_MESG_BODY = 1*( 1*(WSP / HTAB / VCHAR) %x0D )
ASCII XFER_FRAME = 1*5( ASCII_MESG_HEADER ASCII_MESG_BODY %x1A %x0D)
===== Transaction flow =====
FIXME
A transaction happens as following:
- The calling party establishes a reliable delivery bearer, that provides (either a TCP session, an AX.25 virtual circuit, or a raw ARQ/SACK modem connection).
- The called party sends its SID banner, optional text messages, then a line that ends with the character ''>'' (''0x3E'').
- The calling party answers with its SID banner, and either a proposal for messages pending expedition followed by the ''F>'', or the empty message queue notification ''FF'' command (skip to the penultimate step in this case).
- The called party issues a ''FS'' command to select messages it is interested in receiving.
- The calling party transfers the selected messages, drops and defers the other messages according to the called party's request.
- The called party sends either a list of pending message proposals, or we jump to the penultimate step.
- The calling party issues a ''FS'' command to select messages it is interested in receiving.
- The called party transfers the selected messages, then drop and defer the other messages according to the calling party's request, and finally follows with either an empty message queue notification, or a list of the next pending message proposals. In the latter situation, we jump back to the last step.
- The called party requests for the bearer teardown using the ''FQ'' command.
- The calling party initiates the bearer teardown.
==== Exchange with no new message ====
{{ :b2f:fbb_ascii_no_mail.svg |}}
msc {
wordwraparcs=on;
a [label="Alice"], c [label="Carol"];
--- [label=" Alice opens reliable delivery bearer "];
c => a [label="[Carol-1.33.7-FHM$]"];
c => a [label="Welcome Alice"];
c => a [label=">"];
a => c [label="[Alice-1.73-FHM$]"];
a => c [label="FF"];
c => a [label="FQ"];
--- [label=" Alice tears down the bearer "];
}
==== Exchange with message transfer ====
{{ :b2f:fbb_ascii_mails.svg |}}
msc{
hscale="2.5", wordwraparcs=off;
a [label="Alice"], c [label="Carol"];
--- [label=" Alice opens reliable delivery bearer "];
c => a [label="[Carol-1.33.7-FHM$]"];
c => a [label="Welcome Alice"];
c => a [label=">"];
a => c [label="[Alice-1.73-FHM$]"];
a => c [label="FB P F6FBB FC1GHV.FFPC.FRA.EU FC1MVP 24657_F6FBB 1345"];
a => c [label="FB P FC1CDC F6ABJ F6AXV 24643_F6FBB 5346"];
a => c [label="FB B F6FBB FRA FBB 22_456_F6FBB 8548"];
a => c [label="F>"];
c => a [label="FS +-+"];
a => c [label="Title 1st message"];
a => c [label="Text 1st message ...... "];
a => c [label="^Z"];
a => c [label="Title 3rd message"];
a => c [label="Text 3rd message ...... "];
a => c [label="^Z"];
c => a [label="FB P FC1GHV F6FBB F6FBB 2734_FC1GHV 234"];
c => a [label="FB B FC1GHV F6FBB FC1CDC 2745_FC1GHV 3524"];
c => a [label="F>"];
a => c [label="FS --"];
a => c [label="FB P FC1CDC F6ABJ F6AXV 24754_F6FBB 345"];
a => c [label="F>"];
c => a [label="FS +"];
a => c [label="Title message"];
a => c [label="Text message ......"];
a => c [label="^Z"];
c => a [label="FF"];
c => a [label="FB B F6FBB TEST FRA 24654_F6FBB 145"];
c => a [label="F>"];
a => c [label="FS +"];
c => a [label="Title message"];
c => a [label="Text message ...... "];
c => a [label="^Z"];
a => c [label="FF"];
c => a [label="FQ"];
--- [label=" Alice tears down the bearer "];
}