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 L2 (Cloud link 2) when configured and available, otherwise to L1 (Cloud link 1). IP Address, Port, and FQDN configure L2 only. They do not change L1's protected endpoint and are unsupported when L2 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 L2 (Cloud link 2), if not using FQDN | ascii | |
| 2 | Port | UDP port for L2 (Cloud link 2) | uint16 | |
| 3 | Enable | Enable or disable the keep-open override; applies to L2 (Cloud link 2) when configured and available, otherwise L1 (Cloud link 1) | bool | |
| 4 | FQDN | FQDN of L2 (Cloud link 2), if not using IP address | ascii |
Examples
Set a link to a server using FQDN
Protocol
3
3
Length
450
45 bytes
Type
500
50 (Link Control)
Header Count
20
2
Header Types
15
1, 5
Message ID
4123000
123
Method
11
1 (SET)
Payload Count
30
3
Payload Types
234
2, 3, 4
Port
22538
2301
Enable
11
true
FQDN
16115111109101461021171081084610011110997105110
some.full.domain
Checksum
99224
57443
📡 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
Protocol
3
3
Length
240
24 bytes
Type
50
5 (ACK)
Header Count
20
2
Header Types
34
3, 4
Response to
4123000
123
Status
10
0 (OK)
Payload Count
10
1
Payload Types
1
1
ACK Type
2500
50
Checksum
237184
47341
📡 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
Protocol
03
3
Length
5700
57 bytes
Type
5000
50 (Link Control)
Header Count
0200
2
Header Types
0105
1, 5
Message ID
04123000000
123
Method
0101
1 (SET)
Payload Count
0300
3
Payload Types
020304
2, 3, 4
Port
0225308
2301
Enable
0101
true
FQDN
2810810511511645116104114101971161011101011004610310846971164611210812146103103
list-threatened.gl.at.ply.gg
Checksum
12168
17529
📡 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.