Description

Use this frame to connect a socket to the given address and port.

For a UDP socket, this filters out any received responses that are not from the specified remote address and port.

Two frames occur in response:

  1. Socket Close Response - 0xC2: Arrives immediately and confirms the request.

  2. Socket State - 0xCF: Indicates if the connection was successful.

Format

The following table provides the contents of the frame. For details on frame structure, see API Frames.

Offset Size Frame Field Description

0

8-bit

Start Delimiter

Indicates the start of an API frame.

1

16-bit

Length

Number of bytes between the length and checksum.

3

8-bit

Frame type

0x42

4

8-bit

Frame ID

A reference identifier used to match status responses.

If set to 0, the device does not send a response.

5

8-bit

Socket ID

ID of the socket to connect.

6

16-bit

Destination Port

Destination port to send to.

8

8-bit

Destination address type

Supported address types:

  • 0 = Indicates the destination address field is a binary IPv4 address in network byte order.

  • 1 = Indicates the destination address field is a IPv4 string containing either a dotted quad value or a domain name to be resolved.

  • 2 = Indicates the destination address field is a binary IPv6 address in network byte order.

  • 3 = Indicates the destination address field is a IPv6 string containing either an ASCII string in colon-hexadecimal notation or a domain name to be resolved.

9-n

variable

Destination address

EOF