Skip to main content

NET

Syntax​

NET <ip> <command>

Description​

Asks the board to forward a text command to another board at <ip> (port 55152). This is how a board — or a Studio program, with the NET command block — drives another board, for example to raise an event flag on it. See NET Relay.

The relay is fire-and-forget: the reply only says that the command was sent, not that the other board executed it. The other board answers on its own, to the board that sent the command.

Parameters​

ParameterDescription
<ip>IPv4 address of the target board. Not a broadcast or multicast address, and not the board itself.
<command>The command to forward, at most 107 bytes.

Response​

OK NET ip=<ip>

Errors​

ReplyCondition
ERR NET bad_ipInvalid, broadcast or multicast address.
ERR NET selfThe address is the board's own.
ERR NET emptyNo command after the address.
ERR NET too_longCommand longer than 107 bytes.
ERR NET send_failedThe packet could not be sent.

Example​

Raise flag 1 on board B through board A:

net.py
from hmcls_udp import Board

board_a = Board("192.168.1.11")
board_a.request("NET 192.168.1.21 FLAG SET 1")