SW5501 – SW5502
Wireless Serial Server
User Manual
Configuration and
setup
time interval can be set between 1 and 100 seconds
.
Check Medium
:
Due to the unstable
nature of wireless connections, sometimes even the connection
(
physical
layer
)
is already
broken, the TCP Server
(
application layer
)
is unaware and still active
.
Some applications
establish a new TCP connection instead of recycling an old connection, the existing
TCP connection needs to
be automatically closed to allow a new incoming TCP Client connection
.
With this option, the user can
set the
waiting time of the physical medium
’
s recovery
.
The period of waiting time can be in between 3 to 30 seconds
.
If the physical connection cannot be recovered in the previously set time, the TCP Server will forcefully close
the existing TCP connection
.
The default value is three seconds
.
Decreasing this value might result in
unfavorable network behavior
.
Delimiters
Serial to Network Packet Delimiter
:
Packet delimiter is a way of packing data in the serial communication
.
It
is designed to keep packets in track
.
SW550X provides three types of delimiter
:
Time Delimiter, Maximum
Bytes and Character Delimiter
.
Note that the following delimiters
(
Interval, Max Byte and Character
)
when they
are selected are programmed in the OR logic
.
Meaning that if any of the three conditions were met, SW550X
would transmit the serial data in its buffer over the network
.
Interval timeout
:
SW550X will transmit the serial data in its buffer when the specified time interval has
reached and no more serial data comes in
.
The default value is calculated automatically based on the baud
rate
.
If the automatic value results in chopped data, the timeout could be increased manually by switching to
“
Manual setting
” (
checking the radio button in Figure 3
.
35
)
and specifying a larger value in the text box above
.
Note that the maximum interval is 60,000 milliseconds
.
Attention
Manual Calculation of Interval Timeout
The optimal
“
Interval timeout
”
depends on the application but it must
be at least larger than one character interval within the specified baud
rate
.
For example, assuming that the serial port is set to 1200 bps, 8
data bits, 1 stop bit, and no parity
.
In this case, the total number of bits
needed to send a character is 10 bits
(
included 1 start bit
)
, and the
time required to transfer one character is
(
10
(
bits
)/
1200
(
bits
/
s
))*
1000
(
ms
/
s
) =
8
.
3 ms
.
Therefore, you should set the
“
Interval
timeout
”
to be larger than 8
.
3 ms
.
Rounding 8
.
3 ms to the next integer
would give you 9 ms
.
Which can be set as your interval timeout
.
Discard Bytes
:
SW550X will keep packets from the serial interface into its buffer, assemble data into a TCP
packet based on user
’
s setup condition, and then send
the packet to the network
.
The compared condition to
discard data can be more than,
less than,
equal to,
or non
-
equal to a specific number of data
(
in Bytes
).
Within
the timeout interval, if the condition is not satisfied, the data in buffer will be packed and sent out
.
Max Bytes
:
SW550X will transmit the serial data in its buffer when the specified length in the unit of bytes has