Closed jackmerker13 closed 5 months ago
Pass your binary data to the data
keyword argument:
PyJ2534.PASSTHRU_MSG(PyJ2534.ProtocolID.ISO15765,PyJ2534.TxFlags.TX_NORMAL_TRANSMIT, data=b'\x01\x02\x03')
Thank you for the quick response. Unfortunately I have tried this, and still receive the Invalid message error.
https://github.com/Shamtam/PyRRhic/tree/main/pyrrhic/comms/phy
Have a look here for examples. I don't have examples for CAN at the moment, but I've done it before.
I suspect you need to add the appropriate ISO15765 flags to make this work, but I don't know your specific application
Thank you for the assistance, I am working on setting the message up according to the J2534 documentation, for my specific application.
I have solved the issue, thanks for the support! :)
I am trying to apply the PyJ2534 to PCANPT32.dll. I am having difficulty creating a message to write to my device. The device uses ISO15765 protocol. I use the following line: message = PyJ2534.PASSTHRU_MSG(PyJ2534.ProtocolID.ISO15765,PyJ2534.TxFlags.TX_NORMAL_TRANSMIT, b'\x01\x02\x03') When I try to write the message via PassThruWriteMsgs, I get ERR_INVALID_MSG. When i print out the message details for debugging, the protocolID is 6, which is correct, but the DataField is empty.
Not sure of the correct syntax to use for creating valid messages.