Linux CAN drivers development
 help / color / mirror / Atom feed
From: "André Hartmann" <aha_1980@gmx.de>
To: Lars Susaas <larssusaas@gmail.com>
Cc: linux-can@vger.kernel.org
Subject: Re: Setting CAN FD data bitrate with libsocketcan
Date: Tue, 12 Sep 2017 21:26:24 +0200	[thread overview]
Message-ID: <5f0be713-a0e0-aadf-dad4-72a92ab31c4d@gmx.de> (raw)
In-Reply-To: <CALHGA=tEn1r1XPW6hCSA0n_cHb-XVhZA9yT0e6FHVqP+vz0G9A@mail.gmail.com>

Hi Lars,

thanks for your answer.

Am 10.09.2017 um 13:25 schrieb Lars Susaas:
>> However, I did not find a possibility to set the CAN FD data bitrate.
>> Is there a way or does no such function exist yet? If it does not exist, are
>> there plans to support it?
> 
> Hi,
> 
> Was looking for the same thing a little while back.
> Did not find it, so i made some changes to libsocketcan as part of my
> work on canFestival (canOpen stack)

Ah Ok, I like to use it for QtSerialBus [1]. Therefore I'm a bit limited 
with including 3rd party libraries (licenses and so) and we decided to 
use the system-wide libsocketcan. Which now turns out to miss (at least) 
one feature.

> You can check out work here:
> https://bitbucket.org/nimrof/canfestival-3-asc/src/53f18ae80f39901b61ddf6d04b9358893ac518db/drivers/can_socket?at=canfd
> 
> Just copy the following files into libsocketcan:
> can_netlink.h
> libsocketcan.c
> libsocketcan.h
> 
> Its yet testet that well, so may contain bugs.
> 
> To set the databaudrate you have to set baudrate first with
> 'can_set_bitrate' then you can use 'can_set_data_bitrate'.

I will definitely have a look this weekend. Have you considered 
upstreaming your changes back to libsocketcan?

Best regards,
André

[1] http://code.qt.io/cgit/qt/qtserialbus.git/

  reply	other threads:[~2017-09-12 19:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-09 18:08 Setting CAN FD data bitrate with libsocketcan André Hartmann
2017-09-10 11:25 ` Lars Susaas
2017-09-12 19:26   ` André Hartmann [this message]
2017-09-14 19:41     ` Lars Susaas

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=5f0be713-a0e0-aadf-dad4-72a92ab31c4d@gmx.de \
    --to=aha_1980@gmx.de \
    --cc=larssusaas@gmail.com \
    --cc=linux-can@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox