Data trouble on google coral dev board

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
gking53
Posts: 1
Joined: Sat 16. Nov 2019, 21:33

Data trouble on google coral dev board

Post by gking53 » 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

Code: Select all

$ uname -r
4.9.51-imx
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

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")
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!

F.Vergnaud
Software Development
Software Development
Posts: 305
Joined: Mon 9. Sep 2013, 12:21

Re: Data trouble on google coral dev board

Post by F.Vergnaud » Mon 18. Nov 2019, 10:35

Dear gking53,

Your issue regards a third party library "python-can", unfortunately we can't provide support for other libraries.
You should contact directly the "python-can" support on github (https://github.com/hardbyte/python-can).
Otherwise you can directly use our python wrapper for PCAN-Basic "PCANBasic.py", which is included in the PCAN-Basic linux package (in libpcanbasic/examples/python).
Best regards,
Fabrice

Post Reply