error counts when using transmitest

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
thorpey01
Posts: 8
Joined: Fri 26. Feb 2016, 10:55

error counts when using transmitest

Post by thorpey01 » Fri 26. Feb 2016, 11:23

hi,

I'm using Ubuntu 15.04 32bit with kernel 3.19.0.51-generic
Im running on Ubuntu on a Virtual Box VM version 5.0.14
I've installed the latest drivers... peak-linux-driver-7.15.2

built to use Chardev version of drivers.
I have a loop back terminated cable connecting CAN1 and CAN2

this is my current cat /proc/pcan in screenshot..
cat proc can
cat proc can
cat proc pcan.png (219.06 KiB) Viewed 7173 times
I can use the transmitest and receivetest to send and receive the transmit.txt i see the output of receive test so i know i have installed the drivers and can run the test. However I get big error counts when I CTRL C on the transmit test I get in the attached screenshot..
This is a screenshot of what I get when just running transmit test..
1_only run transmitest showing error count.png
1_only run transmitest showing error count.png (168.41 KiB) Viewed 7173 times
when i run transmitest and receive test i get this after i press ctrl C on transmitest term..
2_transmitest with receivetest started.png
2_transmitest with receivetest started.png (202.92 KiB) Viewed 7173 times
more error counts.

Sometimes the Ubuntu VM locks up and I need to restart..

I've noticed also that CAN1 is running on pcan32 and CAN2 is pcan33 but sometimes .. it would swap to CAN1 on 34 and CAN2 on 35.. like it is still being used so has to allocate a new set..

any help would be appreciated .. i am very new to using PEAK and linux..

thank you,
Nick

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: error counts when using transmitest

Post by M.Maidhof » Fri 26. Feb 2016, 12:07

Hi,

please check that you use a terminated CAN cable between both channels. Please use receivetest on a different channel than transmittest. A CAN bus system needs at least two active CAN nodes (due to the acknowledge system). And please use a real Linux system, instead of a VM. Sometimes the USB subsystem will not work correctly on VMs.

regards

Michael

thorpey01
Posts: 8
Joined: Fri 26. Feb 2016, 10:55

Re: error counts when using transmitest

Post by thorpey01 » Fri 26. Feb 2016, 12:20

Hi Michael,

I'm using two channels connected via a terminated can loopback cable.

i have two terminal windows open.. sending transmit in one window and receive in the other..
the command i use is :
transmitest transmit.txt -f=/dev/pcan32 -b=0x001c -e
receivetest -f=/dev/pcan33 -b=0x001c -e

the tests work correct and i can see in the receive window that I am getting CAN messages coming back.. but why am i getting so many error counts?

The reason for me using a VM is because i am running Ubuntu on a MAC .. there is no way to run PEAK Linux USB drivers on OSX is there?

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: error counts when using transmitest

Post by M.Maidhof » Mon 29. Feb 2016, 12:52

Hi,

did you break receivetest before transmittest? This could be a possible reason for your errors (ack errors due the missing second CAN node).

regards

Michael

thorpey01
Posts: 8
Joined: Fri 26. Feb 2016, 10:55

Re: error counts when using transmitest

Post by thorpey01 » Tue 1. Mar 2016, 09:23

Hi Michael, yes I may have not started transmitting without receiving first and also broken off receive before transmit.

Michael, because I have errors logged now on the device.. when typing cat /proc/pcan .. how do I clear the errors?

I am also wondering if the loop back cable i have is long enough? this is only big enough to loop between the CAN 1 and CAN2..
I am also installing a pure Ubuntu machine to see if there are any differences..

best regards,

Nick

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: error counts when using transmitest

Post by M.Maidhof » Tue 1. Mar 2016, 14:27

Hi,

to clear the error counters in /proc/pcan, you have to reload the driver again.

rmmod pcan
modprobe pcan

regards

Michael

Post Reply