Design

The MicroGate Serial API provides a serial communications Application Program Interface (API) for Linux (kernel versions 2.4 and later) using the SyncLink GT, SyncLink GT4, SyncLink GT PC/104+, and SyncLink PCMCIA Adapters. The API supports multiple serial protocols (when supported by specific adapter model), including SDLC, HDLC, BISYNC, MONOSYNC, asynchronous, and raw bit-synchronous. These protocols are used to build applications for networking, X.25, frame relay, IBM SDLC (SNA), satellite, radio and other serial communications. The MicroGate Serial API is designed for applications where direct control of the serial hardware is required. 

System calls are used to open a serial port, configure the port, manipulate serial interface signals, and send and receive data. 

The MicroGate Serial API is FREE and may be downloaded at any time from the MicroGate website..

HARDWARE SUPPORT

Hardware support for API features depends on the specific model. For example, the PCMCIA adapter only supports HDLC and asynchronous modes of operation. For a complete list of adapter specific support of each API feature, click here.

SOFTWARE

The MicroGate Serial API contains programming documentation, sample C programs, SyncLink device driver, and HDLC line discipline. Source is included for all provided software including the device driver and HDLC line discipline. SyncLink and its device driver are designed to support both single and multi-processor operation, as well as, 64-bits under x86_64 architecture when using Linux.

The sample C programs include:
 

mgslutil command line configuration utility
mgsltest diagnostics program
sample-hdlc SDLC/HDLC sample program
sample-async asynchronous sample program
sample-raw raw bit synchronous sample program
sample-bisync bisync sample program

SYSTEM CALLS

The MicroGate Serial API consists of system calls used for controlling and monitoring communications. Most operations act on a port (file descriptor) that is opened and closed with the open and close system calls. Data is exchanged with the write and read system calls. Port control and monitoring is accomplished with the ioctl system call using a mix of standard tty ioctl codes (prefix TIOC) and SyncLink specific ioctl codes (prefix MGSL).

API system calls by category:
 

Function Call
Description
Device Access
open() Open port
close() Close port
Device Configuration
ioctl(MGSL_IOCSPARAMS) Set adapter parameters
ioctl(MGSL_IOCGPARAMS) Get adapter parameters
Device Control and Status
ioctl(TIOCMSET) Explicitly set/clear all serial signals
ioctl(TIOCMBIS) Set (assert) individual serial signals
ioctl(TIOCMBIC) Clear (negate) individual serial signals
ioctl(TIOCMGET) Get serial signals
ioctl(TIOCMIWAIT) Wait for serial signal transition
ioctl(MGSL_IOCWAITEVENT) Wait for event (serial signal/hunt mode/idlereceived)
ioctl(TIOCGICOUNT) Get interrupt/event statistics
ioctl(MGSL_IOCGSTATS) Get communication statistics
Data Communications
write() Transmit frame
ioctl(MGSL_IOCTXENABLE) Enable/Disable transmitter
ioctl(MGSL_IOCSTXIDLE) Set transmit idle mode (flags/ones/zeros/mark/space/etc)
ioctl(MGSL_IOCGTXIDLE) Get current transmit idle mode
ioctl(MGSL_IOCTXABORT) Abort currently transmitting frame
read() Get received frame
ioctl(MGSL_IOCRXENABLE) Enable/Disable receiver
ioctl(MGSL_IOCLOOPTXDONE) Indicate transmit done in loop mode

 

PORT PARAMETERS

The ioctl(MGSL_IOCSPARAMS) call specifies options for a serial port. 
 

Parameter
Description
mode async, HDLC, BISYNC, MONOSYNC, RAW
loopback Internal loopback mode for diagnostics
flags Misc control options loop mode selection
encoding NRZ NRZ-L NRZB NRZI NRZ-M NRZ-S, BIPHASE, FM0, FM1, Manchester, differential biphase level
clock_speed internally generated clock speed
addr_filter SDLC/HDLC address
crc_type CCITT CRC16, CRC32, none
preamble_length Preamble length in bits (8 16 32 64)
preamble_patterm Preamble pattern

DEBUG LOGGING

For use in application debugging and for diagnosing communications problems, the SyncLink device driver has a configurable debug level (specified when loading the driver) that output varying levels of debug information to the system log. Debug levels include logging of complete data blocks, informational events, error events, system calls, and interrupt events.

OPTIONAL GENERAL PURPOSE I/O SIGNALS

The SyncLink GT family of serial adapters can be ordered with an optional header that provides general purpose digital (TTL) input/output signals. These signals can be configured (direction), controlled, and monitored through the serial API. Contact our sales department for ordering details.

AVAILABLE DOWNLOADS
linuxwan.tar.gz         Complete package (all sources/drivers)
Programming.txt      API programming documentation

Linux support for out of production adapters and for kernel versions prior to 2.4 is located here.

Download data sheet

PRODUCT CONFIGURATIONS

Single Port Adapters
Product Code 
SyncLink GT Adapter for Linux/PCI/V.35
191193
SyncLink GT Adapter for Linux/PCI/RS-232
192193
SyncLink GT Adapter for Linux/PCI/RS-422/X.21
193193
SyncLink GT Low Profile Bracket
LBP000
PCMCIA Adapters
SyncLink Adapter for Linux/PCMCIA
P10193
4-port Adapters
SyncLink GT4 Adapter for Linux/PCI/V.35/4p
491193
SyncLink GT4 Adapter for Linux/PCI/RS-232/4p
492193
SyncLink GT4 Adapter for Linux/PCI/RS-422/X.21/4p
493193
PC/104+ Adapters
SyncLink GT PC/104+ Adapter for Linux/V.35
1P1193
SyncLink GT PC/104+ Adapter for Linux/RS-232
1P2193
SyncLink GT PC/104+ Adapter for Linux/RS-422/X.21
1P3193
 
Cables
V.35 cable
2534GT
RS-232 cable
CMF000
RS-449 cable
2537FM
RS-530 cable
CMF000
X.21 cable
2515FM

 

SPECIFICATIONS  (SyncLink GT)

Controller: MicroGate FPGA
Serial Ports: One
Serial Interface: Jumper select: V.35, RS-232, RS-422/485 (RS-530 & RS-449, X.21)
Serial Format: SDLC, HDLC, raw bit synchronous, BISYNC, MONOSYNC, asynchronous
Data Rates: Up to 10 Mbps synchronous; 921600 bps asynchronous
Clocking: internal, external, DPLL
Plug and Play configurable, Bus Master DMA data transfer
Environmental: Temperature 0C to 60C standard, -40C to +85C optional; humidity 0 to 95% non-condensing;  alt. - 200 to +10,000 ft
Mechanical: Low-Profile PCI MD1; length 4.7 ", height 2.5 ", Weight 2.7 Oz
PCI 3.0 compliant, 32-bit, 33mhz (5v, 3.3v and PCI-X compatible), Low-profile compatible w/optional bracket.
Power usage:  0.2A +5V, 23 mA +12V, 23mA -12V
Regulatory: FCC Class B, CE, ANSI C63.4 Class B, VCCI Class B, EN55022 Class B, EN55024, RoHS
Connector: DB-25 (male)
Cable Options: DB-25 (female) to DB-25 (male); DB-25 (female) to 34-pin V.35 (male); DB-25 (female) to 37-pin RS-449 (male); DB-25 (female) to 15-pin X.21 (male)

SPECIFICATIONS (SyncLink GT4)

Controller(s): MicroGate FPGA
Serial Ports: Two (2) or four (4); custom designs offer more ports-per-adapter
Serial Interface: Jumper select: V.35, RS-232, RS-422/485 (RS-530,RS-449, X.21)
Serial Format: SDLC, HDLC, raw bit synchronous, BISYNC, MONOSYNC, asynchronous
Data Rates: Up to 10 Mbps per port synchronous; 921600 bps asynchronous
Clocking: internal, external, DPLL
Plug and Play configurable, Bus Master DMA data transfer
Environmental: Temperature 0C to 60C standard, -40C to +85C optional; humidity 0 to 95% non- condensing; alt. - 200 to +10,000 ft.,
Mechanical: Standard PCI short card; length 6.875", height 4.2",  Weight 5.5 Oz
PCI 3.0 compliant, 32-bit, 33mhz (5v, 3.3v, and PCI-X compatible)
Power usage: 300mA 5V, 80mA +12V, 80mA -12V
Regulatory: FCC Class B, CE, ANSI C63.4 Class B, VCCI Class B, EN55022 Class B, EN55024, RoHS
Connectors: LFH-60
Supplied Adapter Cable: LFH-60 to dual DB-25 (male)
Cable Options: DB-25 (female) to DB-25 (male); DB-25 (female) to  34-pin V.35 (male); DB-25 (female) to 37-pin RS-449 (male); DB-25   (female) to 15-pin X.21 (male)

SPECIFICATIONS (SyncLink GT PC/104+)               

Controller: MicroGate FPGA
Serial Ports: One
Serial Interface: Jumper select: V.35, RS-232, RS-422/485 (RS-530 & RS-449, X.21)
Serial Format: SDLC, HDLC, raw bit synchronous, BISYNC, MONOSYNC, asynchronous
Data Rates: Up to 10 Mbps synchronous; 921600 bps asynchronous
Clocking: internal, external, DPLL
Plug and Play configurable, Bus Master DMA data transfer
Rotary switch selects 1 of 4 PC/104+ stack positions
Environmental: Temperature -40C to +85C; humidity 0 to 95% non-condensing; alt. - 200 to +10,000 ft;
Mechanical: Standard PC/104+ dimensions, Stack-through connectors, Weight 3.1 Oz
PCI 3.0 compliant, 32-bit, 33mhz (Universal, 3.3v and 5v)
Power: 200mA +5V, 100mA 3.3V
Connector: 26 Pin Header with Ejector/Latches, 26-pin Header to DB-25 adapter cable
Cable Options: DB-25 (female) to DB-25 (male); DB-25 (female) to 34-pin V.35 (male); DB-25 (female)
to 37-pin RS-449 (male); DB-25 (female) to 15-pin X.21 (male)

SPECIFICATIONS (SyncLink PCMCIA)

Controller(s): SAB82532
Serial Ports: One
Serial Interface: Software-selectable as V.35, RS-232, RS-422 (RS-530,RS-449, X.21)
Serial Format: HDLC, SDLC, asynchronous
Data Rates: Up to 512 Kbps synchronous, 115200bps asynchronous
Clocking: internal, external, DPLL
Plug and Play configurable, PIO data transfer
Environmental: Temperature 0C to 60C; humidity 0 to 95% non- condensing; alt. - 200 to +10,000 ft.
Mechanical: Standard Type II PCMCIA card; length 3.37 inches, width 2.126 inches, weight 1.0 Oz
Power usage: 200 mA +5V
Regulatory: FCC Class B; EN55022 Class B, EN55024
Supplied Adapter Cable: PC card I/O connector to DB-25 (male)
Cable Options: DB-25 (female) to DB-25 (male) DB-25 (female) to 34-pin V.35 (male); DB-25 (female) to 37-pin RS-449 (male); DB-25   (female) to 15-pin X.21 (male)