:::tip Tutorial Follow our step-by-step tutorial to connect your first device over UDP: TagoTiP UDP — Quick Start :::
The fastest path from sensor to cloud. No connection setup, no handshake - a single datagram carries your data to TagoIO in as few as 60 bytes.
udp.tip.us-e1.tago.io166.117.107.1295683 (plaintext) / 5684 (TagoTiP(s))udp.tip.eu-w1.tago.io166.117.51.1375683 (plaintext) / 5684 (TagoTiP(s))sprintf builds your frameDevice TagoIO
| |
|── PUSH|hash|serial|[temp:=25] ────────> |
|<──────── ACK|OK|1 ───────────────────── ──|
One datagram in, one datagram out. Each datagram carries exactly one frame. Trailing \n is optional.
#include <WiFi.h>
#include <WiFiUdp.h>
const char* SSID = "your-wifi";
const char* PASSWORD = "your-password";
const char* TIP_HOST = "udp.tip.us-e1.tago.io";
const int TIP_PORT = 5683;
const char* TOKEN_HASH = "4deedd7bab8817ec"; // replace with yours
const char* SERIAL_N = "sensor-01"; // replace with yours
WiFiUDP udp;
void setup() {
Serial.begin(115200);
WiFi.begin(SSID, PASSWORD);
while (WiFi.status() != WL_CONNECTED) delay(500);
Serial.println("WiFi connected");
}
void loop() {
float temperature = analogRead(34) * 0.1; // example reading
char frame[256];
snprintf(frame, sizeof(frame),
"PUSH|%s|%s|[temperature:=%.1f#C]",
TOKEN_HASH, SERIAL_N, temperature);
udp.beginPacket(TIP_HOST, TIP_PORT);
udp.print(frame);
udp.endPacket();
// read response (optional for fire-and-forget)
delay(100);
int len = udp.parsePacket();
if (len > 0) {
char buf[128];
udp.read(buf, sizeof(buf) - 1);
buf[len] = '\0';
Serial.println(buf); // ACK|OK|1
}
delay(10000); // send every 10 seconds
}
Replace 4deedd7bab8817ec with your token hash and sensor-01 with your serial.
echo -n 'PUSH|4deedd7bab8817ec|sensor-01|[temperature:=25.5#C]' \
| nc -u -w1 udp.tip.us-e1.tago.io 5683
ACK|OK|1
echo -n 'PUSH|4deedd7bab8817ec|sensor-01|[temperature:=25.5#C;humidity:=60#%;active?=true]' \
| nc -u -w1 udp.tip.us-e1.tago.io 5683
ACK|OK|3
echo -n 'PUSH|4deedd7bab8817ec|tracker-01|[position@=39.74,-104.99,1609;speed:=45.2#km/h@=39.74,-104.99]' \
| nc -u -w1 udp.tip.us-e1.tago.io 5683
echo -n 'PUSH|4deedd7bab8817ec|sensor-01|>xDEADBEEF01020304' \
| nc -u -w1 udp.tip.us-e1.tago.io 5683
Raw bytes are delivered to your device's Payload Parser.
echo -n 'PULL|4deedd7bab8817ec|sensor-01|[temperature]' \
| nc -u -w1 udp.tip.us-e1.tago.io 5683
ACK|OK|[temperature:=25.5#C@1694567890000]
echo -n 'PING|4deedd7bab8817ec|sensor-01' \
| nc -u -w1 udp.tip.us-e1.tago.io 5683
ACK|PONG
When a command is pending:
ACK|CMD|reboot
:=temperature:=25.5=status=online?=active?=true@=position@=39.74,-104.99Append after the value, in this order:
#temperature:=25.5#C@=speed:=10@=39.74,-104.99@temperature:=25.5@1694567890000^temperature:=25.5^batch_01{}temperature:=25.5{source=dht22}All combined: temperature:=25.5#C@=39.74,-104.99@1694567890000^batch_01{source=dht22,quality=high}
ACK|OK|NN data points storedACK|OK|[...]ACK|PONGACK|CMD|<command>ACK|ERR|invalid_tokenACK|ERR|device_not_foundACK|ERR|invalid_payloadACK|ERR|invalid_seqACK|ERR|rate_limitedACK|ERR|payload_too_largeACK|ERR|server_errorKeep datagrams under ~1,400 bytes to avoid IP fragmentation.
RPM = requests per minute.
PING is exempt from rate limiting on UDP.
For the complete protocol grammar, parsing rules, and ABNF, see the TagoTiP Specification.