8.7.7. Send message via an RS-232 port
The RS-232 ports can be used for sending a message to the other end of the serial
channel. The feature allows controlling a connected (third-party) device, below command
is for sending an ASCII-format text message:
Command format: CALL●/MEDIA/UART/<P
n
>.sendText(<message>)
Response format: mO●/MEDIA/UART/<Pn>:sendText
Example:
˃ CALL /MEDIA/UART/P2.sendText(pwr_on)
˂ mO /MEDIA/UART/P2:sendText
Send message in HEX or BIN format
Message can be sent in other formats by the following methods:
▪ sendMessage: sending in HEX format.
▪ sendBinaryMessage: sending in BIN format.
8.8. Network conguration
ATTENTION!
The following commands can be used for SW4-OPT-TX240RAK model only.
8.8.1. Query the DHCP state
Command format: GET●/MANAGEMENT/NETWORK.DhcpEnabled
Response format: pw●/MANAGEMENT/NETWORK.DhcpEnabled=true|false
Example:
˃ GET /MANAGEMENT/NETWORK.DhcpEnabled
˂ pw /MANAGEMENT/NETWORK.DhcpEnabled=true
8.8.2. Change the DHCP state
Command format: SET●/MANAGEMENT/NETWORK.DhcpEnabled=true|false
Response format: pw●/MANAGEMENT/NETWORK.DhcpEnabled=true|false
Example:
˃ SET /MANAGEMENT/NETWORK.DhcpEnabled=false
˂ pw /MANAGEMENT/NETWORK.DhcpEnabled=false
8.8.3. Query the IP address
Command format: GET●/MANAGEMENT/NETWORK.IpAddress
Response format: pr●/MANAGEMENT/NETWORK.IpAddress=<>IP_Address>
Example:
˃ GET /MANAGEMENT/NETWORK.IpAddress
˂ pr /MANAGEMENT/NETWORK.IpAddress=192.168.0.100
Page 82 / 106 LW3 programmers' reference