linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: janusz.uzycki@elproma.com.pl
Cc: linux-can@vger.kernel.org,
	Krzysztof Borgulski <k.borgulski@elproma.com.pl>
Subject: Re: slcanpty
Date: Wed, 12 Jun 2013 17:25:24 +0200	[thread overview]
Message-ID: <51B892E4.6020907@hartkopp.net> (raw)
In-Reply-To: <a1ef1ba453a6dca8222147aab20b61f1@beep.pl>

On 11.06.2013 23:19, janusz.uzycki@elproma.com.pl wrote:
>>>> The SLCAN protocol is a nice and simple ASCII protocol that fits for many
>>>> purposes. But it also has some disadvantages e.g. when you want timestamps
>>>> and
>>>> additional error signaling you can usually get from a CAN controller.
>>>>
>>>>> (https://github.com/dschanoeh/socketcand/blob/master/doc/protocol.md) some
>>>
>>> I noticed that both slcanpty and socketcand don't implement bitrate
>>> settings yet.
>>> iproute2 includes libnetlink but the library avoids CAN support.
>>> libsocketcan seems to be the best choice but libnl also good.
>>>
>>> What do you prefer for CAN interface control?
>>
>> I'm personally using the standard ip tool from iproute together with
>> this script:
>>
>> https://gitorious.org/linux-can/can-misc/blobs/master/etc/can_if
> 
> The script is nice but I thought about "< can0 B bitrate sample_point tq
> prop_seg phase_seg1 phase_seg2 sjw brp >" command in
> https://github.com/dschanoeh/socketcand/blob/master/doc/protocol.md exactly.
> I looked for a proper code in socketcand and I didn't find. Is the command
> planned?

Not yet.

Today the socketcand can run as normal user.

When we want to add the "B" option (which is generally a good idea) we need to
take care to run socketcand as root or as some sudo user to be able to
configure the CAN interfaces.

Configuring the CAN interfaces as administrator on the host that is connected
to CAN interfaces is IMO a good solution. Don't know what happens, if multiple
users connected to the socketcand and specifiy different bitrates %-(

> I'm asking because if it would be implemented in socketcand it could be also
> implemented in slcanpty for S/s command support. Unfortunately using an
> external library will introduce dependency :/

Btw. i would recommend the libsocketcan from the pengutronix git then.

Best regards,
Oliver


  reply	other threads:[~2013-06-12 15:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2DAB3DC2841347E7AF7833620339B427@laptop2>
2013-06-05 19:44 ` slcanpty Oliver Hartkopp
2013-06-06 12:03   ` slcanpty Janusz Uzycki
2013-06-06 18:31     ` slcanpty Oliver Hartkopp
2013-06-06 20:43       ` slcanpty janusz.uzycki
2013-06-07 13:40       ` [PATCH] slcanpty janusz.uzycki
2013-06-08 11:09         ` Oliver Hartkopp
2013-06-10  9:06           ` janusz.uzycki
2013-06-10  9:16             ` janusz.uzycki
2013-06-10  9:36               ` janusz.uzycki
2013-06-10  9:42                 ` [PATCH 1/2] slcanpty: "slcanpty < /dev/null" issue fix janusz.uzycki
2013-06-10  9:44                   ` [PATCH 2/2] slcanpty: /dev/tty support for tests janusz.uzycki
2013-06-10  9:53                     ` janusz.uzycki
2013-06-10 18:29                       ` Oliver Hartkopp
2013-06-10 18:38                         ` janusz.uzycki
2013-06-11 20:28                           ` Oliver Hartkopp
2013-06-11 16:29       ` slcanpty janusz.uzycki
2013-06-11 20:32         ` slcanpty Oliver Hartkopp
2013-06-11 21:19           ` slcanpty janusz.uzycki
2013-06-12 15:25             ` Oliver Hartkopp [this message]
2013-06-14  8:42               ` slcanpty Janusz Uzycki
2013-06-18  8:24               ` slcanpty j.uzycki
2013-06-19 17:15                 ` slcanpty Oliver Hartkopp
2013-06-19 22:39                   ` slcanpty j.uzycki

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=51B892E4.6020907@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=janusz.uzycki@elproma.com.pl \
    --cc=k.borgulski@elproma.com.pl \
    --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;
as well as URLs for NNTP newsgroup(s).