MMX2 series – User's Manual 68
Serial Port Messaging
Sending a Message via RS-232
ATTENTION!
#message
Request and Response
ɯ <ip><serial_port>
ɯ body: <message>
ɮ header: 200 OK
Parameters
Parameter
description
Parameter values
<serial_port> Serial port
number
P1-P2
<message> Serial message Any format is acceptable (text, binary,
hexadecimal etc.), maximum message
size is 100K. Escaping is unnecessary.
Example
ɯ
ɯ
ɮ header: 200 OK
INFO:
the response from the connected device is accepted within 100 ms. The communication is closed after
that time interval.
Setting the Direction of a GPIO Pin
Request and Response
ɯ <ip><pin>
ɯ body: <dir>
ɮ header: 200 OK
ɮ body: <dir>
Parameters
Parameter Parameter description
<pin> GPIO pin number.
P1-P6
<dir> The direction of the GPIO pin.
Input
input
Output
output
Example
ɯ
ɯ body: Input
ɮ header: 200 OK
ɮ body: Input
Setting the Output Level of a GPIO Pin
Request and Response
ɯ <ip><pin>
ɯ body: <state>
ɮ header: 200 OK
ɮ body: <state>
Parameters
Parameter Parameter description
<pin> GPIO pin number.
P1-P6
<value> The output value of the GPIO pin.
High
high level
Low
low level
Example
ɯ
ɯ body: High
ɮ header: 200 OK
ɮ body: High