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.
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.
SUPPORTED LINUX VERSIONS
This release of the Linux drivers for use with SyncLink adapters and the MicroGate Serial API targets:
- Red Hat Enterprise Linux/CentOS 6.X, 7.X, 8.X
- openSUSE Leap 15.x
- Debian 8.X, 9.X, 10.X
- Ubuntu 14.04LTS, 16.04LTS, 18.04LTS, 20.04LTS
- Raspbian 8, 9 on Raspberry Pi 3 Model B/Pi 4 Model B
- Generic (non-vendor specific) kernel versions up to 5.7
- Kernel versions before 2.6.5 are not supported.
- C programming skills
- Basic Linux administration
- Building and installing Linux device drivers
- Serial communication details for target application
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:
Developing with SyncLink devices on Linux requires the following knowledge:
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, Point-to-Point-Protocol 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.
The MicroGate Serial API contains programming documentation, sample programs for the C/C++, C# and Python 3 languages, 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.
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.xz||Complete SDK, documentation, and sample programs.|
Linux support for out of production adapters and for kernel versions prior to 2.4 is located here.
|MicroGate Software Development Kits (32-bit/64-bit)|
|Product Description||Part Number|
|MicroGate Serial API for Linux||DOWNLOAD|