Description
Hi All,
Recently, I upgrade python-can from 2.1.0 to 3.0.0 and get pcan messages sent fail.
I debug into pcan.py & basic.py in /can/interfaces/pcan/ and add a print in basic.py::PCANBasic::Write() print(MessageBuffer.DATA, MessageBuffer.LEN)
before
res = self.__m_dllBasic.CAN_Write(Channel,byref(MessageBuffer))
.
The print output shows both DATA and LEN are expected, however in receiver side (PCAN Viewer) both LEN and DATA are 0, which means all messages are recieved fail.
No this issue on python-can 2.1.0, i.e. messages are sent successfully and received correctly. (Same SW/HW environment, only python-can difference)
On the other hand, if I change ("ID", c_ulong)
to ("ID", c_uint)
in python-can 3.0.0
in class TPCANMsg (Structure)
, all mesages are sent successfully.
I understand the comment "ID was changed from u_uint to c_ulong, so it is compatible with the PCAN-USB Driver for macOS". I'm not sure it's been fully tested on Ubuntu 4.15.0-36-generic x86_64 with python 3.6.6.
Would any one help dig into the issue and find a solution so that I can upgrade to python-can-3.0.0 and use it on both Ubuntu and MacOS?
Any other usefully information are needed, please let me know. Thanks.