The text of a manual · part 3 of 12
Spectrum One Serial Access Bridge (SAB) II Programmer's Reference Guide: Chapter 1 Development Overview
Pages 7 to 14 of 94, from Spectrum One Serial Access Bridge (SAB) II Programmer's Reference Guide
The original document is the PDF (1.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Symbol SAB-Lite
Page 7
Chapter 1
Development Overview Programming host applications with the Symbol Spectrum One Serial Access Bridge (SAB) attached to the host requires knowledge of how the SAB and host communicate. The SAB uses serial packets to communicate with the host. With the use of bridge access routines (BARs), the Spectrum One network can be administered from the host. BARs also allow file exchanges between the host and radio terminals. The basic task of the host programmer is to create and interpret serial packets exchanged between the host and SAB. The host application programmer should have a basic familiarity with: • host application programming • Symbol Series 3000 terminals • C language, if using Symbol development tools. Development tools include: Symbol Terminal Enabler Program (STEP)
radio terminal program which interprets routines from the enablers. The STEP/enabler combination controls terminal input, output and display. STEP also manages scanner and peripherals connected to the terminal. Refer to the Series 3000 STEP Application Programmer’s Guide.
host dependant enablers
C routine library for interfacing the host with the Spectrum One network. These include higher-level routines that interact with STEP. The SAB can only use the Symbol serial enablers. Refer to the Enabler Programmer’s Reference Manual.
Spectrum One Application Development Kit (ADK)
includes interface libraries for C and utilities for creating hex images, mapping the keyboard, and scanning. The kit includes the Series 3000 Programmer’s Reference Manual and the Series 3000 Application Programmer’s Guide.
1-1
Page 8
SAB II - Programmer’s Reference Guide
To develop terminal applications without Symbol tools, the host programmer can use information found in the Series 3000 System Software Manual. The manual is a low-level software reference for programming radio terminals including information on the terminal basic input/output system (BIOS), the terminal operating system, printer driver and scanner driver.
SAB Interface and Application Development The SAB interface controls Spectrum One network operations, host file access services, and communication between host-based applications and terminals. Major SAB interface components include: Symbol Host Interface Program (SHIP)
Permits communication between a terminal and a host application through the RS-232-C serial link.
BARs
An optional set of a standardized program interface routines accessible from the host. BARs control administrative Spectrum One network operations and provide access to file resources and management on the host for the SAB. BARs are packets containing unique user addresses to communicate with the SAB.
To support the radio network, the SAB runs several distinct software components. The SAB Server Program (SSP) organizes network topology and facilitates terminal hand-off from one transceiver to another. SSP packetizes data for error-free delivery to and from the terminals and interfaces with the cradle and transceiver. Before programming in the SAB environment you should consider some unique features of the Spectrum One SAB.
1-2
Page 9
Development Overview
Sessions and Datagrams Serial transactions in synchronous mode translate to the NetBIOS datagram mode. Asynchronous mode translates to the NetBIOS session mode. The terminal determines the operative mode for the Spectrum One network Session requests are more secure and datagram requests are usually more efficient. Session mode provides a delivery guarantee or an error within a specific time interval through NetBIOS support for automatic acknowledgment. A host application should use session requests for reliable data transmission and the minimal data loss.
Connection Establishment and Termination A terminal to a host process connection occurs when the SAB initiates a Connect Indication. The host responds with a Connect Request. The SAB sends a Set Parameters Indication and the host responds with a Set Parameters Request. The host application is able to exchange data with the terminal until the connection terminates. To provide network connectivity, a connection is established between the host BAR and the SAB BAR for sending and receiving data and file commands. Once the BAR is received by the SAB or prior to it being passed to the Serial Protocol Driver, it is handled by the SAB software NetBIOS portion. The connection terminates when the SAB sends a Disconnect Indication and the host responds with a Disconnect Request. The host cannot initiate a Disconnect Request. It would be ignored by the SAB. The host can, however, initiate a Hang Up Request that asks the SAB to initiate a Disconnect Indication. For host administration using the serial packet protocol, an indication is always sent by the SAB. The host always sends a request even though the SAB initiates the transaction. Regardless which initiates connection termination, the SAB receives the Disconnect Request and SAB interface terminates communication with the specified terminal.
Data Buffers When communicating with the host application, SAB interface supports a 512-byte data buffer in datagram mode or a 1024-byte data buffer in session mode. If the data buffer limit is exceeded, SAB interface generates the NetBIOS error code 0x01: Illegal Buffer Length.
1-3
Page 10
SAB II - Programmer’s Reference Guide
Data Format All short and long integer formats follow the Intel convention. The least significant bit (LSB) is positioned in byte 0 and is recieved first. The most significant bit (MSB) is in byte 1 for a short integer and in byte three for a long integer.
Command and Response Packet Structure Many packets are strictly for serial link administration which is not passed to the SAB interface or the terminal. The 256-byte packets includes a header, data and a terminating character. The header contains addressing and the ucntr field that identifies the particular packet function. Data passes between the host and terminal using specific application data packets. These packets contain 512 bytes in a 2-packet combination. In multi-packet transactions, packets may contain more than 512 bytes.
BAR Enabling To use BARs on the SAB, Under [BARs] in SSP.INI, set the Admin field to yes to enable administrative BARs, and set Filesrv to yes to enable file access BARs.
BAR Packet Structure The 8-byte header contains a flag to identify the packet type, a code to define the command or response, the packet data length, and a command specific host field. Data following the header varies in length up to 512 bytes. Data is command/response specific and no space is allocated for it within the header. Data is part of a command or response packet. For example, a read file command has no data field. The read file command response fills the data field with the file read. Several administrative BARs are exceptions to the data length of 512 bytes. They still are only able to contain up to 512 bytes in a single packet, but send data in successive packets using a flag bit in byte 0 to indicate that another packet is due to follow. Information passed between the host and the SAB for BARs are in specific packets identified by ucntr of 70, 71, and 72. A user address (uadr) of 126 identifies the packets as administrative BARs while a uadr of 127 identifies file access BARs.
1-4
Page 11
Development Overview
Host Considerations The SAB administrative and file access BARs do not link directly with any host application. They are limited to specific serial user addresses. One address is dedicated to support administrative SAB control from the host. Another address supports the host file access BARs that provide file services to the SAB. The SAB views these host components as separate applications. In addition, each host application that interfaces with the SAB interface is also separate. This is true even if each application maintains individual connections with multiple terminals. A multi-tasking operating system views each application as a separate logical entity and treats it as an individual task. Host applications using the SAB interface require no special programming efforts in a multi-tasking environment. SAB interface components behave as follows: • NetBIOS WAIT mode serializes each request to the host file access BAR from the SAB through the SAB file access BAR. The SAB file access BAR stops while a request is pending and the host file access BAR is not required to field multiple asynchronous requests. • Administrative BARs process and respond to one command at a time. • SAB interface takes multiple asynchronous requests from the host. Design host applications that use the SAB interface to manage terminal communication as the individual application dictates.
Host Application Interface The SAB interface enables communication between a host application on the serial link and terminals on the Spectrum One network with the NetBIOS API packet protocol. A host application uses the serial packet protocol to communicate with the terminals. The SAB interface provides multiplexed access to terminals for the host. Each connection with a terminal is a logical serial packet protocol connection established by each terminal.
1-5
Page 12
SAB II - Programmer’s Reference Guide
Naming Conventions To communicate with a host process or a terminal, specify the host or remote network address. The SAB assigns unique terminal names when the terminal is initialized in its cradle. Host names are pre-assigned during SAB initialization. Options under [NetBIOS] in SSP.INI contains one record for each application when the SAB interface is operational.
Host Application Naming A terminal accesses a host application by its host ID. All host applications have unique names to distinguish their traffic from other computer or process traffic in the network. The host application name format is: HOSThhhppp where: hhh a unique 3-digit ASCII number from 000 to 999 identifying the host. The SAB supports one host.
ppp a unique 3-digit ASCII number from 000 to 999 identifying the host application.
The 16-character name is padded on the right with spaces.
1-6
Page 13
Development Overview
Terminal Naming A host process contacts a terminal by its terminal name. All terminals have unique names to distinguish their traffic from other terminal traffic in the network. The SAB assigns a terminal address during a terminal log on by sending a Connect Indication packet to the host. Terminal names are in the following format: SYMBOLrrr where: rrr a unique 3-digit ASCII number from 000 to 251 identifying the terminal and corresponding to the number assigned by the SAB at initialization.
The 16-character name is padded on the right with spaces.
Naming Conversion Serial user addresses use 3-digit numeric fields with numbers from 002 through 127. NetBIOS network names use16-character alphanumeric fields. The conversion between them takes place in the serial protocol layer. The serial packet protocol converts the following: • terminal names • host process names • BAR names.
Terminal Names The serial protocol converts the terminal NetBIOS name SYMBOLrrr to a serial terminal ID field nnnnnn by dropping SYMBOL and padding the field with leading zero characters. SYMBOLrrr becomes 000rrr. The NetBIOS to serial conversion works in both directions: • NetBIOS SYMBOL001 to serial ID 000001 • Serial ID 000025 to NetBIOS SYMBOL025.
1-7
Page 14
SAB II - Programmer’s Reference Guide
The terminal ID is allocated to the next available uadr in an incremental, modulo 64, lowest-available number. The values 000, 126, and 127 are never assigned as a terminal ID. Although the serial terminal ID field is 6 characters, the actual terminal ID is only 3 characters. The terminal ID field is always right-justified and zero filled.
Host Process Names The host process names are passed through without modification in the Connect Indication transaction. Options under [NetBIOS] in SSP.INI associate the serial uadr with the terminal ID and host process name. SSP.INI routes data between a terminal and a host process.
BAR Names The serial packet protocol converts the various BAR names in both directions. File access BARs: • NetBIOS SYMHOSTSERVICE0 converts to serial ID 000127 • Serial ID 000127 converts to NetBIOS SYMBRIDGSERVICE0 Administrative BARs: • NetBIOS SYMHOSTADMIN0 is converted to serial ID 000126 • Serial ID 000126 is converted to NetBIOS SYMBRIDGEADMIN0.
Network Name Assignment The network name is derived from the unique terminal unit number. The SAB assigns the unit number and network name that are initially unknown to the host. The SAB interface maintains a remote table for the assignment process and as terminals attach and detach from the network. SAB initialization defines individual logical connections supported by the serial interface. Host processes do not need to notify the SAB interface of their existence. Terminals must handle all assignments to the host process in the system.
1-8