Usage Next Version
From Syslserve
In coming Version it's possible to add multiple receivers. A receiver can be a tcp port listed on, and udp one or even a com ( serial ) port. Another feature added is the relay function. A receiver can act as a relay, sending all incoming messages on that port to another syslserve server that listen for example on a tcp port.
[edit] The COM port Receiver. Config example
Here follows the example of a config file with 1 receiver that is set for COM1.
<settings>
<output_screen> False </output_screen>
<raw> true </raw>
<filesize> 1024 </filesize>
<output_dir> c:\output </output_dir>
</settings>
<receivers>
<receiver protocol="COM" relay="false" port="1" baud="9600" parity="2" data="8" stop="0" odsr="off" octs="on" dtr="on" rts="off" idsr="on"> </receiver>
</receivers>
<maps>
<group name="serverpark">
<ip>192.168.7.2</ip>
<ip>192.168.7.3</ip>
</group>
<group name="test">
<ip>127.0.0.1</ip>
<ip>192.168.76.10</ip>
<ip>192.168.76.11</ip>
</group>
<group name="routers">
<ip>192.168.76.1</ip>
</group>
</maps>
[edit] serial com port stuff
Protocol For using the COM port fill in COM =)
Relay
Isn't supported yet for COM ports, maby later... set it to false, otherwise it might crash.
Port
The Com port number, I've only tested with virtual COM ports 1 and 2 so far, but i think the code will work up till COM port 9. Say that > COM9 needed some extra attention. Also for the future =)
baud ( also called speed )
Possible values:
110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000, 256000.
parity Here the list of possible values you can use for the parity property, you can use the number or the word as a value in this property.
2 or evenparity 3 or markparity 0 or noparity 1 or odparity 4 or spaceparity
data It doesn't check much here, but it should be a number. Numbers that make sense would be between 5 and 9.
The number of data bits in each character can be 5 (for Baudot code), 6 (rarely used), 7 (for true ASCII), 8 (for any kind of data, as this matches the size of a byte), or 9 (rarely used). 8 data bits are almost universally used in newer applications. 5 or 7 bits generally only make sense with older equipment such as teleprinters. ( from the wikipedia page )
stop
Possible values, the numbers are slighty odd, but they match the ones on MSDN. you can either use the number or the word as value:
0 or onestopbit ( you got 1 stop bit ) 1 or one5stopbits ( you got 1.5 stop bits ) 2 or twostopbits ( you got 2 stop bits )
Some extra info: Stop bits sent at the end of every character allow the receiving signal hardware to detect the end of a character and to resynchronise with the character stream. Electronic devices usually use one stop bit. If slow electromechanical teleprinters are used, one-and-one half or two stop bits are required. ( source wikipedia )
Now some serial port options that can be either set on or off.
odsr ( fOutxDsrFlow )
Specifies whether output handshaking that uses the Data Set Ready (DSR) circuit is on or off.
octs ( fOutxCtsFlow )
Specifies whether output handshaking that uses the Clear To Send (CTS) circuit is on or off.
dtr ( fDtrControl )
Specifies whether the Data Terminal Ready (DTR) circuit is on or off.
rts ( fRtsControl )
Specifies whether the Request To Send (RTS) circuit is set to on, off, handshake, or toggle.
idsr ( fDsrSensitivity )
Specifies whether the DSR circuit sensitivity is on or off.
source for explaining some setttings briefly: http://www.geocities.com/rick_lively/MANUALS/COMMANDS/M/MODECS.HTM
also a source is msdn(dcb struct): http://msdn.microsoft.com/en-us/library/aa363214(VS.85).aspx
Probably can add more settings based on dcb struct and timeout structs available.
[edit] Test Setup
Currently i'm testing it out on a Sun Virtualbox with Windows XP (no servicepacks)
Using the trial version of Virtual Serial port driver 6.9 of Eltima Software to create a COM1/COM2 pair.
I let syslserve bind COM1
and for now use "COM Port Data Emulator & traffic generator" to pump in data from COM2.
First tests seem fairly succesfull.
