Menu

#370 UDP protocol: bugs in documentation, and irtext2udp

Future
closed
None
fixed
2025-06-09
2022-03-05
Paul Fox
No

The documentation for the UDP protocol on the website, and in the header commentary for plugins/udp.c, is incorrect, and has been since 2015. The problem is with regard to the meaning of the high bit in the 16 bit packets sent over UDP. The documentation says that the high bit, if set, represents a "pulse", but the code in plugs/udp.c (line 282) is unchanged since 2002 (first implementation), and clearly treats the high bit as meaning "space".

irtext2udp implements the protocol as described in the documentation, and doesn't work as a result.

Attached are 4 patches which fix all of this. The first patch is actually a dupe of the patch I attached to ticket 369. I include it here because my subsequent patches will break without it.

My last patch implements a "--invert" flag for irtext2udp, since someone may depend on the current behavior, and would need an easy way to get that behavior back again.

4 Attachments

Discussion

  • Sean Young

    Sean Young - 2025-06-08

    A simpler solution is to fix plugins/udp.c

    I've applied your first patch and a fix to plugins/udp.c.

     
  • Sean Young

    Sean Young - 2025-06-08
    • status: open --> closed
    • assigned_to: Sean Young
    • Resolution: na --> fixed
     
  • Paul Fox

    Paul Fox - 2025-06-08

    Some conversation would have been useful before closing this. The fix is incorrect, in that it changes lirc's udp device protocol, which has been the same for decades. Anyone using this protocol to talk to lirc, other than with irtext2udp, will see their systems fail when lirc is next released.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.