Skip to content

Index of Module serial

Matthias Görges edited this page Aug 6, 2013 · 12 revisions

Module: serial

Module serial provides cross platform rs232 (serial) bindings. This implementation assumes that the communication flow control is completely controlled by the external device, which is the case with most instruments.

Note: Android USB requires usb-serial-for-android library, which is not included here as it's LGPL. All serial functions are handled in JNI so nothing declared here. (However, two callbacks the other way around are needed if used.)

Functions in this module:

Function Short Description
(rs232-open devname baudrate bitsize parity stopbits) Open the RS232 serial port
(rs232-open-file filepath) Open from a file instead of a serial port
(serial-close port) Close the RS232 serial port
(serial-readchar port) Reads character from RS232 device
(serial-writechar port char) Write a character to RS232 device
(serial-flush port) Flush RS232 device communication port
(serial-error) (For Android) Returns if a serial error has occurred
(serial-timeout) (For Android) Returns if a serial timeout has occurred
(serial-try devname baudrate databits parity stopbits testproc) Attempt to open the serial port with given settings.
(serial-tryfile filepath) Attempt to open the serial port with a file
(serial-autodetect devname testproc) Attempt at auto detecting RS232 device
(serial-cache-setup dev char1 char2) RS232 serial cache, which buffers data patterns starting with char1 and ending with char2
(serial-cache-clear dev) Clear RS232 device serial port cache

| | (serial-cache-read dev . hook) | Read data from RS232 serial cache |

Clone this wiki locally