MicroGate® Serial API

MicroGate® Serial API for Linux

Full-Featured Software Development Kit for Linux.

The MicroGate Serial API provides a serial communications Application Program Interface for Linux using the SyncLink family of adapters (USB, PCI, PCI Express, PC/104+). The API supports multiple serial protocols including SDLC, HDLC, BISYNC, MONOSYNC, ISOCHRONOUS, ASYNCHRONOUS, and RAW bit-synchronous. These protocols are used to build applications for networking, X.25, IBM SDLC (SNA), satellite, radio and other serial communications. The API allows direct control of the serial hardware (Base API), or high level control of the link layer protocol (Link Layer API).

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.

Download the Guide to MicroGate Serial Communications for Linux for complete details regarding the use of SyncLink hardware, driver and software-development-kit options, and Linux.

VERSION COMPATIBILITY

This release of the Linux drivers for use with SyncLink adapters and the MicroGate Serial API targets:

  • Red Hat Enterprise Linux/CentOS version 6.X, kernel version 2.6.32-220.13.1.el6
  • Red Hat Enterprise Linux/CentOS version 7.X, kernel version 3.10.0-229.14.1.el7
  • Ubuntu 14.04LTS, kernel version 4.4.0
  • Ubuntu 16.04LTS, kernel version 4.4.0
  • Raspbian 8

Many different Linux distributions and kernel versions are available to users. As a first step, MicroGate urges developers build and install the freely downloadable drivers in the target environment to verify compatibility. If your target kernel or distrubution is different than the supported version identified above, MicroGate offers consulting and development services for those projects where Linux kernel driver development expertise is required. Contact MicroGate for details.

Known Version Limits:

  • Kernel versions before 2.6.5 are not supported.

REQUIRED KNOWLEDGE

Developing with SyncLink devices on Linux requires the following knowledge:

  • C programming skills
  • Basic Linux administration
  • Building and installing Linux device drivers
  • Serial communication details for target application

MicroGate offers consulting and development services for projects where this knowledge is absent. Contact MicroGate for details.

MicroGate Serial Communications Overview

User mode applications access the serial device in one of two different ways: using standard network system calls or directly using MicroGate serial API (application programming interface) calls. The access method depends on application specific requirements. For network access, the application generally knows nothing about serial communications and relies on configuring the serial device and device driver to appear as a standard network device. The serial API allows direct control of the serial device by a custom serial application that controls the detailed operation.

In current Linux kernels, the Generic HDLC kernel component supplies a framework for using serial devices as network devices. This component provides several protocol options, including frame relay, PPP, and Cisco HDLC. An overview of this layer is provided later in this document. Generic HDLC is only used when configuring the SyncLink serial device as a network device. Custom serial applications directly accessing the SyncLink device driver do not use this layer. The Generic HDLC layer is not written or maintained by MicroGate.

Software Overview Diagram.

Software Included

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.

System Calls Used

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).

Extensive 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.

Hardware Supported

The MicroGate Serial API supports all the SyncLink hardware MicroGate manufactures. Once you develop an application using the SDK, you can be confident any platform your users require will have a ready-to-go solution.

Optional General Purpose I/O Signals

The SyncLink 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.

Serial API Downloads
linuxwan.tar.xzComplete SDK, documentation, and sample program source.

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

Product and Ordering Information
Use the part numbers below for ordering SyncLink hardware and MicroGate software.
MicroGate Software Development Kits (32-bit/64-bit)
Product Description Part Number
USB Adapters
MicroGate Serial API for Linux w/ SyncLink USB Adapter (1-port) 1U3193
PCI Adapters
MicroGate Serial API for Linux w/ SyncLink GT Adapter (1-port) 193193
MicroGate Serial API for Linux w/ SyncLink GT4 Adapter (4-port) 493193
PCIe Adapters
MicroGate Serial API for Linux w/ SyncLink GT4e Adapter (4-port) 403193
PC/104+ Adapters
MicroGate Serial API for Linux w/ SyncLink GT PC/104+ Adapter (1-port) 1P3193
MicroGate Serial API for Linux w/ SyncLink GT4 PC/104+ Adapter (4-port) 4P2193
Extended Temperature Adapters
MicroGate Serial API for Linux w/ SyncLink GTx Adapter (1-port) 193X93
MicroGate Serial API for Linux w/ SyncLink GT4x Adapter (4-port) 493X93
NOTE: These adapters are available in PCI, PCIe and PC/104+ models. Contact MicroGate for more details.
Speed-Enhanced Adapters
MicroGate Serial API for Linux w/ SyncLink GTs Adapter (1-port) 193S93
MicroGate Serial API for Linux w/ SyncLink GT2s Adapter (2-port) 293S93
NOTE: These adapters are available in PCI, PCIe and PC/104+ models. Contact MicroGate for more details.
Cables and Options
Product Description Part Number
Synchronous RS-232 Cable (DB25F-DB25M) 6-feet CMF000
V.35 Cable (DB25F-34pin Block Connector) 6-feet 2534GT
RS-449 Cable (DB25F-DB37M) 6-feet 2537FM
X.21 Cable (DB25F-DB15M) 6-feet 2515FM
Low-Profile Bracket supporting MD1 Compliant SyncLink GT/AC Adapters LPB000