All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	Felix Seitz <felix.seitz@thm-motorsport.de>,
	linux-can@vger.kernel.org
Subject: Re: cansniffer loop time
Date: Tue, 24 Jun 2014 17:44:26 +0200	[thread overview]
Message-ID: <53A99CDA.9090906@hartkopp.net> (raw)
In-Reply-To: <53A99ABD.7020407@pengutronix.de>

Hi Marc,

the cansniffer (from can-utils) opens a CAN_BCM socket and configures filter
jobs to get updates on every data change (content change in the payload).

There's a loop parameter that can be tuned to ensure a proper (cyclic) update
on the screen, which can be set in x100ms steps.

Indeed I did not look into this (useful) tool since 2007 :-)

Still looks like a good coding style - but I really did not get behind it's
functionality in two minutes to answer Felix' question.

Obviously some comments would enhance the coding style then :-)

Cheers,
Oliver

On 24.06.2014 17:35, Marc Kleine-Budde wrote:
> Hey Felix,
> 
> On 06/24/2014 05:21 PM, Felix Seitz wrote:
>> we from THM Motorsport are using the cansniffer running on a Raspberry
> 
> What is "the cansniffer"?
> 
>> Pi to read out sensor data traffic on the CANbus in our car.
>> I would like to set the cansniffer's loop time lower than 100ms. I tried
>> to changing the source code but apparently I don't fully understand
>> where the loop delay comes from.
>> Could you give me some tips on how to set a lower delay for the
>> cansniffer? 20ms delay would be perfect.
> 
> Despite the fact, that the rpi is not the best hardware/software for
> doing CAN under Linux, there is no delay within the Linux Kernel that
> would cause a loop delay.
> 
> If you see such a delay it's probably in the application of "the
> cansniffer". The rpi has no CAN controller on the board, there are
> several possibilities to upgrade CAN support. The worst solution is to
> attach an mcp2515 via SPI, USB based CAN dongles give much better
> performance. However USB on the rpi is quite bad, too...
> 
> Marc
> 

      reply	other threads:[~2014-06-24 15:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 15:21 cansniffer loop time Felix Seitz
2014-06-24 15:35 ` Marc Kleine-Budde
2014-06-24 15:44   ` Oliver Hartkopp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A99CDA.9090906@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=felix.seitz@thm-motorsport.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.