UDP transport added to the Ruptela protocol
Ruptela devices can now connect to flespi channels over UDP as well as TCP. The packet format is the same for both transports.
Note: keep in mind that the Ruptela protocol was designed around a persistent connection rather than independent datagrams. Because of this, a record with a large set of parameters may arrive as several messages with the same timestamp.
The device splits a record with many I/O parameters (tachograph, FMS, CAN data) into several parts and packs them into packets without regard to record boundaries. Over TCP flespi merges the parts within the connection. Over UDP each datagram is processed on its own, so the parts of one record that land in different datagrams are registered as separate messages with the same timestamp. They are merged in the device storage, but streams, webhooks and calculators receive each part as it arrives. No device setting prevents this.
When UDP is a good fit:
- simple tracking tasks where saving traffic and battery matters more than an occasional lost message.
- configurations with a moderate set of I/O parameters, without tachograph, FMS or CAN blocks, so a record fits into a single part.
- setups that read messages from the device storage, where the parts are merged, rather than from streams, webhooks or calculators in real time.
But TCP is mandatory for:
- devices sending tachograph, FMS or CAN data to real-time consumers (streams, webhooks, calculators).
- tachograph file downloads, OTA updates and remote configuration.
Recommended transport is still TCP. It guarantees delivery and keeps a stable connection for commands and file transfers.