50: Link Control
Control a link to the internet to send and receive messages. Used to control a remote device link, such as connecting to a UDP server, and using the V3 messaging protocol to communicate with it. Once initiated, messages can be forwarded to the link directly using the forwarding headers. Enable is a common keep-open override: it applies to Link2 when Link2 is configured and available, otherwise to Link1. IP Address, Port, and FQDN configure Link2 only. They do not change Link1's protected endpoint and are unsupported when Link2 is compiled out.
Header
| Field | Name | Description | Type |
|---|---|---|---|
| 5 | Method | Request a service to be perform an action Possible values:
| uint8 |
Payload
| Field | Name | Description | Type | Unit |
|---|---|---|---|---|
| 1 | IP Address | IP address of Link2, if not using FQDN | ascii | |
| 2 | Port | UDP port for Link2 | uint16 | |
| 3 | Enable | Enable or disable the keep-open override; Link2 when configured and available, otherwise Link1 | bool | |
| 4 | FQDN | FQDN of Link2, if not using IP address | ascii |
Examples
Set a link to a server using FQDN
📡 Real example from Generate tool on 2025-10-16This example was generated using the generate tool, and tested against an RH2 device, sent from Toit.
ACK for setting a link to a server using FQDN
📡 Real example from RH2 P1 v2300 on 2025-10-16This example is captured from an RH2 device as part of normal communications over I2C with the ESP32 co-processor, where P1 responses to a request from Toit on the ESP32.
GET request for link settings
📡 Real example from Generate tool on 2025-10-16This example was generated using the generate tool, and tested against an RH2 device, sent from Toit.
Code
For convenience, the following constants can be used to reference this message type.