Skip to content

J1939: collected minor findings (PGN normalization, CTS retransmit, claim delay, thread churn) #58

Description

@dborgards

Minor findings from section 3 of the repository review, J1939 part. Source: docs/reviews/2026-09-10-repository-review.md (branch claude/repository-review-hpttwc). Line numbers refer to main @ 8ed80f6.

Transport protocol

  • A PDU1 PGN from TP.CM is not normalized, so a peer that puts the destination address in the low byte never reaches our TX session.
  • A CTS asking for retransmission is answered with an abort instead of being served.
  • maxPacketsPerCts == 0 is read as "unlimited"; J1939-21 defines 0 as "hold, send nothing".
  • DatagramReceived is raised before the inbox write, on the actor (J1939TpChannel.cs:936-947). ISO-TP already restructured exactly this.

Node

  • The 0–153 ms pseudo-random delay before Cannot Claim / re-claim (J1939-81 §4.4.4.3) is missing, so two nodes colliding on an address can livelock in lockstep.
  • A second ClaimAddressAsync silently cancels the first.
  • Every claim round creates two threads — a full arbitrary-address scan is 240 thread creations.

Docs

  • The README maps FR-TP-032 and FR-TP-033 the wrong way round.
  • J1939NodeOptions.cs:63 documents a factory overload that does not exist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: j1939CanKit.Pro.J1939 and .J1939Tp — node, address claim, transport protocoltype: choreBuild, CI, tooling, housekeeping

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions