Connect
Message to authenticate and negotiate connection parameters.
Last updated
Message to authenticate and negotiate connection parameters.
Last updated
Stream Id (0x01)
Connect stream identifier
Parameters
(0x02)
1: Payload contains an array with username, device, and credentials
2: Auth Info contains a string with a token.
Default: 1 (Username/Password Credentials)
Payload (0x03)
Parameter with value 1:
Auth Info contains an array with ["username", "device", "credential"].
Parameter with value 2: Auth Info contains a string with a token.
Keep Alive Interval (0x04)
Number of expected seconds between keep alives.
Default: 60 seconds
Payload Encoding (0x05)
0x00: Reserved
0x01: PSON
0x02: JSON
0x03: MessagePack
0x04: BSON
0x05: CBOR
0x06: UBJSON
Default: 0x01 (PSON)
Field
Type
Description
OK
Parameters: None
Payload: None
The server agree the Connect
Unknown
N/A
N/A
The server refuses the connection.
Redirect
1
Target server redirect
The server requires the device to connect to another host, i.e., for load balancing, route to a nearest host, etc.
Examples:
iotmp://newserver.io
iotmps://newserver.io
Bad Credentials
2
The provided credentials are not valid in the server.
Invalid Keep Alive
3
The negotiated keep-alive is incorrect.
Bad Encoding
4
The negotiated encoding is not supported by the server.