User`s manual
Examples AXIS 2490 User’s Manual
38
Serial port control
Method: GET/POST
Syntax: Control Serial Port
The following parameters and values are available:
Open serial port
This CGI makes it possible to open the serial port using the HTTP protocol. Authentication
is handled by the Web server. After an initial connect command from the client, the
connection is kept alive until the client closes it. A limited number of clients may be
connected concurrently to the same serial port.
After the connection has been set up, data sent from the client to the Web server is
forwarded to the serial port, and incoming serial data is returned to all the currently
connected clients.
Syntax: open serial port
The following parameters and values are available:
http://<AXISserver>/axis-cgi/com/serial.cgi?<parameter>=<value>[&<parameter>=<value>...]
<parameter>=<value> Values Description
port=<int> 1,2,3 This parameter selects the COM port.
write=<string> <bytestring> "<bytestring>": hex coded bytes with values of {0, 1, 2, 3, 4, 5, 6, 7,
8, 9, A, B, C, D, E, F, a, b, c, d, e, f}
Writes the specified data string to the selected serial port. Max
string length: 128 bytes.
writestring=<string> <url encoded string> Writes the url encoded string to the selected serial port.
Max string length: 128 bytes.
read=<int> <n> Reads n bytes from the selected serial port.
The returned data will be hexadecimal coded and placed between
#s (e.g. #3A#).
wait=<int> 1 - 9000 Specified in milliseconds. Used together with the "read" parameter.
A read is terminated when the specified number of bytes is read or
when the wait period has ended.
timeout=<int> 1 - 9 Specified in seconds. Used together with the "read" parameter. A
read is terminated when the specified number of bytes is read or
when the timeout has expired.
info=<int> 1 Returns a description of this CGI-request.
http://<servername>/axis-cgi/com/serial.cgi?<parameter>=<value>[&<parameter>=<value>...]
<parameter>=<value> Values Description
port=<int> 1,2,3 Select COM port.
unit=<int> 1,2,3 Selects the source AXIS server. If omitted, and the "port="
command is also ommitted, the default AXIS server is used to
determine the serial port to use.
connect=<string> yes Makes the AXIS server keep the connection open, and start acting
as a link between the client and the serial port.