- Using an external library: RXTX
- Features specific to Android and Android widget
In french: sEchap
Runs different functions that directly affect the bits of serial port, parallel port or infrared port, independently of the communication protocol. These functions are used to manage:
- the DTR signal,
- the RTS signal,
- the XOFF and XON characters.
- The port must be opened beforehand (sOpen).
- Infrared ports are not supported.
- This function returns information regarding the server.
// Clears the DTR signal
<Result> = sEscape(<Port number> , <Function>)
- True if the function was run,
- False otherwise. If the port was not opened beforehand (by sOpen), sEscape has no effect.
<Port number>: Integer
Identifier of the port used:
- Port number:
- Number of the serial port: 1, 2, 3, ... 32 for COM1, COM2, COM3, ... COM32.
- Number of the parallel port: -1, -2, -3 or -4 for LPT1, LPT2, LPT3 or LPT4.
- Number of the infrared port: 1, 2, 3, ... 32 for IR1, IR2, IR3, ... IR32.
- Port identifier returned by sOpen (if this function was called with a port name).
Only this type of parameter is available.
<Function>: Character string
Function to run:
Special case for Linux
- Only serial ports can be opened and initialized.
- By default, users do not have access to serial ports. It is necessary to grant them specific rights to manage serial ports.
Using an external library: RXTX
In Java, the use of functions for handling the serial and parallel ports (sOpen
, ...) requires the presence of an external library: RXTX.
This library includes a Jar archive and one or more native libraries that depend on the operating system on which the application is run.
To use these functions:
- the Jar archive (RXTXComm.jar) must:
- be found in the same directory as the Java application generated by WINDEV,
- be found in the execution classpath of the application,
- be directly included in the generated application (from the wizard for Java generation).
- the native libraries corresponding to the operating system on which the application is run must be found:
- in the same directory as the Java application generated by WINDEV,
- in the path of the application libraries (librarypath).
Caution: The management of infrared ports is not available in Java.
Features specific to Android and Android widget
In Android and Android widget mode, the serial and parallel port functions can be used:
- Only on serial (not parallel or infrared) ports.
- Only with devices that support the CDC/ACM protocol (Arduino ATmega32U4) and the following USB to serial converter chips:
- FTDI FT232R, FT232H, FT2232H, FT4232H, FT230X, FT231X, FT234XD
- Silabs CP210x
- Qinheng CH340, CH341A
- Prolific PL2303
Business / UI classification: Business Logic
This page is also available for…