Serial port settings


A number of settings are used to define the RS232 communication parameters and the touch data structure (in keeping with the USB HID settings that are used to define the touch data structure as read from the HID report descriptor).

Communications parameters

These define the standard RS232 coms parameters:

Setting Meaning  Value 
 port_type  Denotes a RS232 port Serial
 rs232.baudrate  Data rate 1200,2400,4800,9600,19200,38400,57600,115200
 rs232.databits  Number of data bits 5,6,7 or 8. Most likely will be 8.
 rs232.macro  Initialisation macro See macro definition
 rs232.macro.keepalive  Heartbeat Controller command/macro to keep the controller active - rarely required
See DMC, DUS, Serial for an example.
 rs232.macro.keepalive.ms  Heartbeat  Frequency between heartbeat macro.
 rs232.parity  Data parity 0 = NoParity - this is the most common setting and unlikely to be different.
2 = Even, 3 = Odd, 4 = Space, 5 = Mark
 rs232.port  Com port name
 or
 auto
Com port name varies by Operating System
Windows = COM1,2 etc.
On Unix based systems a port is typically: 
/dev/ttySN for a physical com port 
and 
/dev/ttyUSBN for a USB -> serial adaptor 
In both cases N is a number starting at 0.
The full device path or the device name may be used 
e.g. /dev/ttyS0 or  ttyS0.
In the latter case /dev/... is assumed.
The full path is useful for example in the case of a system with a non standard device path.
A value of auto can also be used. This is only tested on Windows and currently supports only one device
see the settings rs232.probe and rs232.probe.ack which are useful in conjunction with auto.
 rs232.probe  Probe string If the setting rs232.port is "auto" then the value represented by this setting is sent to each rs232 device in turn until one is found with the value represented by the setting rs232.probe.ack. If such a response is received within 3 seconds the search ends and the value of rs232.port is set to the name of the port just identified.
The format of rs232.probe and rs232.probe.ack is a series of HEX byte pairs e.g. AA BB CC 
notes:
an empty rs232.probe.ack will match any or no response so leaving both rs232.probe and rs232.probe.ack blank allows the first  port to be selected.  
this is currently only tested on windows
this only works for a single device 
this should not be used in situations where sending the probe data to an unrelated device might be problematic
In this example, an 'Elo, Smartset, serial' device is configured for auto detect by sending the query report command 55620000000000000000 which is acknowledged with a 20 byte string starting with 5542:

 rs232.probe.ack  Ack string Expected acknowledge sequence to probe hex sequence.
 rs232.reset.byte  Reset command Some serial devices will send out a 'reset' byte when they are connected to a system so that the driver will run whatever initialisation sequence may be required to enable the device. This setting defines the byte that will be sent.
Specifies a 2 character hex  representing 1 byte value that, if received from a serial device, will trigger the resend of rs232.macro
e.g. for a byte value of 0x12 a value of 12 is needed; for a byte value of 0x1 a value of  01 is needed.
 rs232.stopbits  Number of stop bits 1 or 2 (or 3 = 1.5 Windows only)

Touch data definition (for a legacy device)

These will be set up within our device configuration system for a specific device and defines (in an abstract way) the structure of the RS232 touch data packet. These settings should not be changed and are listed here for completeness sake:

legacy.0mask, 1mask, invertmask, tipmask, tipshift, xmask, xshift, ymask, yshift

Example as defined in our device configuration system:

‚Äč

Search