Skip to content

Second consecutive multi-part (TP DT) Memory Access write fails #76

@sbaconbits

Description

@sbaconbits

My test case performs the following operations on a j1939.MemoryAccess
object:

  • write len 14
  • read len 14
  • write len 14
  • read len 14

The second write fails to complete.

In the function J1939_21::async_job_thread a message in the state
SENDING_IN_CTS has equal values for 'next_packet_to_send' and 'num_packages'
which I believe should not happen.

Later calls to J1939_21::send_pgn() detects there is a message with the same hash in the
_snd_buffer and returns False.

I believe the fix is to delete the buffer from the send dictionary (_snd_buffer) if
'next_packet_to_send' and 'num_packages' are equal after the call to __send_tp_dt.

With all that being said I am new to using this library and perhaps I'm using
it incorrectly.

Thanks for your time,
Steve

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions