Data trouble on google coral dev board
Posted: Sat 16. Nov 2019, 21:45
Currently trying to use the pcan-basic API for python-can with the peak driver on linux but running into some issues. Im working with the google coral dev board running mendel linux with a kernal version of
I compiled and installed the peak linux driver v8.9.3 and the pcan basic linux 4.3.2, and when I connect my pcan usb adapter I see the device in /dev. My problem is when I use the python-can library to try and send a message, it sends the frame but with a data length of 0 and no data. The id changes however so I'm not sure whats going wrong here. Here's the test program I am using
I've tested the same program and same clean driver install with ubuntu on my laptop and it works fine. Any insight on why this would be happening would be wonderful! sorry if my language is basic, mostly a windows / embedded developer but this task requires the linux board. Thanks!
Code: Select all
$ uname -r
4.9.51-imx
Code: Select all
bus = can.interface.Bus(bustype='pcan', channel='PCAN_USBBUS1', bitrate=100000)
msg = can.Message(arbitration_id=0x304,
data=[0, 1, 2, 3, 4, 5, 6, 7])
try:
bus.send(msg)
print("Message sent on {}".format(bus.channel_info))
except can.CanError:
print("Message NOT sent")