7. Lightware REST API Reference
UCX series – User's Manual
96
Applied firmware package: v1.2.0b9 | LDC software: v2.5.10b1
7.15. Serial Port Configuration
7.15.1.
BAUD Rate Setting
Request and Response
#rs-232 #rs232
ɯ
header:
POST·http://
<ip>
/api/V1/MEDIA/SERIAL/
<serial_port>
/Baudrate·HTTP/1.1
ɯ
body:
<baudrate>
ɮ
header:
200 OK
ɮ
body:
<baudrate>
Parameters
Identifier
Parameter description
Parameter values
<serial_port>
Serial port number
P1-P2*
<baudrate>
Baud rate value
9600
19200
38400
57600
115200
*The UCX-2x1-HC30 model has one serial port (P1).
Example
ɯ
header:
POST http://192.168.0.50/api/V1/MEDIA/SERIAL/P1/Baudrate HTTP/1.1
ɯ
body: 19200
ɮ
header:
200 OK
ɮ
body: 19200
7.15.2.
Stop Bits Setting
Request and Response
#rs232 #rs-232 #serial
ɯ
header:
POST·http://
<ip>
/api/V1/MEDIA/SERIAL/
<serial_port>
/StopBits·HTTP/1.1
ɯ
body:
<stopbits>
ɮ
header:
200 OK
ɮ
body:
<stopbits>
Parameters
Identifier
Parameter description
Parameter values
<serial_port>
Serial port number
P1-P2*
<stopbits>
Stop bit value
1
2
*The UCX-2x1-HC30 model has one serial port (P1).
Example
ɯ
header:
POST http://192.168.0.50/api/V1/MEDIA/SERIAL/P1/StopBits HTTP/1.1
ɯ
body: 1
ɮ
header:
200 OK
ɮ
body: 1
7.15.3. Query Data Bits
Request and Response
ɯ
header:
GET·http://
<ip>
/api/V1/MEDIA/SERIAL/
<serial_port>
/DataBits·HTTP/1.1
ɮ
header: 200·OK
ɮ
body:
<databits>
Parameters
Identifier
Parameter description
Parameter values
<serial_port>
Serial port number
P1-P2*
<databits>
DataBits value
8
9
*The UCX-2x1-HC30 model has one serial port (P1).
Example
ɯ
header:
GET http://192.168.0.50/api/V1/MEDIA/SERIAL/P1/DataBits HTTP/1.1
ɮ
header:
200 OK
ɮ
body: 8
7.15.4.
Parity Setting
Request and Response
ɯ
header:
POST·http://
<ip>
/api/V1/MEDIA/SERIAL/
<serial_port>
/Parity·HTTP/1.1
ɯ
body:
<parity>
ɮ
header:
200 OK
ɮ
body:
<parity>
Parameters
Identifier
Parameter description
Parameter values
<serial_port>
Serial port number
P1-P2*
<parity>
Parity value
None
Odd
Even
*The UCX-2x1-HC30 model has one serial port (P1).