Skip to content

Large diagnostic response payloads aren't sent properly in JSON #375

Description

@zacnelson

Initially created an issue in openxc-android here. Turns out I was able to recreate the same issue with the Python command line tools, so now I think it's an issue in the firmware.

In IsoTp and UDS-C we allow a max diagnostic payload size of 255 bytes. When trying to send many bytes through in the diagnostic response, part of the JSON string is overwritten by other information. Like this:

{"bus":1,"id":2016,"mode":17,"success":true,"pid":2,"payload":"0x030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60616{"command_response":"diagnostic_request","status":true}

In this example case, the payload should have contained 128 bytes (256 ascii characters when converted to JSON string).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions