Protocols & device control
UDP Command Acknowledgement: Distinguish Sent, Received and Executed
Design honest UDP status using application replies, request correlation and state verification instead of treating send success as execution.
A successful UDP send means that your application handed a datagram to its local networking stack. It does not prove that the target received the message or performed the requested action. Use the device protocol's acknowledgement and state feedback, when available, and label unconfirmed commands honestly.
This matters for opening macros that control several devices. A panel that marks every local send green can report a fully open venue while one receiver was offline throughout the sequence.
Define the acknowledgement level
RFC 8085 explains the reliability responsibilities of applications using UDP. An acknowledgement scheme must be part of the application design; adding the word ACK to a payload does not make an existing device understand it.
| Evidence | What it supports | What it does not prove |
|---|---|---|
| Local send returned | Local submission succeeded | Delivery to the target |
| Application acknowledgement | Receiver recognized a transaction | Physical action completed, unless specified |
| State readback | Reported device state | Correct visible content or mechanical movement |
| Independent observation | Intended outcome was observed | Future commands will always succeed |
Choose the level required for each action. A noncritical decorative trigger may tolerate unconfirmed delivery; a routine that depends on a completed input change may need verified feedback.
Correlate replies before accepting them
If the device protocol includes a request identifier, validate it and the sender endpoint. A reply to yesterday's command or another room's device must not complete the current operation. If identifiers are absent, avoid overlapping indistinguishable requests and document the resulting limitations.
Keep timeout handling distinct from negative acknowledgement. A rejection says something about what the receiver understood. Silence can result from loss, addressing, filtering, an unsupported command or a receiver that never sends replies.
A reply source port may differ from the command destination only if the device protocol says so. Match the documented behavior rather than broadly accepting any incoming datagram as successful feedback.
Design retries around the action
Set the retry count and delay from the receiver's guidance and the project's response requirement. Repeating a desired-state command can be reasonable if documented as safe. Repeating a toggle, next-cue or pulse may produce another action.
Avoid broadcasting repeated control commands as a general cure for missing acknowledgements. It increases traffic and can affect unintended receivers. Prefer addressed bench tests and packet captures that show both command transmission and any documented reply.
TCP's reliable stream model is a different transport option, but switching to TCP still does not prove physical completion. The application protocol needs meaningful responses regardless of transport.
Prove loss and recovery behavior
Test the receiver online, disconnected and then restored. The UI should distinguish confirmed, rejected and unconfirmed outcomes. Introduce controlled packet loss in a safe test environment or use a test receiver, and verify that retry behavior remains bounded.
For duplicate-sensitive commands, make the acceptance test count actual actions. The desired result is one action or an explicit uncertainty requiring intervention, not two actions hidden behind a successful final reply.
Capture both directions from the same test window when investigating a missing acknowledgement. Record endpoint addresses, ports and any documented transaction field. Seeing a command near the controller proves transmission there; seeing it near the receiver narrows the question further. Neither alone proves execution. Include the resulting device observation in the same record to distinguish a lost reply from an action never performed. Keep the capture window short enough that the relevant transaction can be identified unambiguously.
Document whether the installed product can receive and interpret the device's replies. A generic UDP transmitter may only send bytes; this guide does not imply otherwise. See the AV protocol overview for transport choices, and discuss required acknowledgement semantics with SoftControl partners.
Source documents
Use the source applicable to your model, firmware and operating-system edition. Read our editorial method.