linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cansniffer loop time
@ 2014-06-24 15:21 Felix Seitz
  2014-06-24 15:35 ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Seitz @ 2014-06-24 15:21 UTC (permalink / raw)
  To: linux-can

Hi there,

we from THM Motorsport are using the cansniffer running on a Raspberry 
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.

Regards,
Felix Seitz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cansniffer loop time
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2014-06-24 15:35 UTC (permalink / raw)
  To: Felix Seitz, linux-can

[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]

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

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cansniffer loop time
  2014-06-24 15:35 ` Marc Kleine-Budde
@ 2014-06-24 15:44   ` Oliver Hartkopp
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Hartkopp @ 2014-06-24 15:44 UTC (permalink / raw)
  To: Marc Kleine-Budde, Felix Seitz, linux-can

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-24 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).