Linux CAN drivers development
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegor_sub1@visionsystems.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Stuart Statman <sstatman@sunverge.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	linux-can@vger.kernel.org
Subject: Re: "Blessed" Version
Date: Mon, 15 Oct 2012 08:33:37 +0200	[thread overview]
Message-ID: <507BAE41.4080104@visionsystems.de> (raw)
In-Reply-To: <50793FAD.6030704@hartkopp.net>

On 13.10.2012 12:17, Oliver Hartkopp wrote:
> Hello Stuart,
> 
> On 11.10.2012 21:09, Stuart Statman wrote:
> 
>> Strangely enough, just yesterday we made a decision to migrate CAN hardware
>> that reduced the urgency of my question.
>>
>> However, it does bring up another question.
>>
>> I've been using slcand and "ip link set xxx up" for a piece of hardware that
>> uses the slcan protocol. I'm pretty happy with how it's working, but I'd be
>> happier if it was compatible with the can_if script that's in the utilities. I
>> could write my own version of can_if that just does the right things for
>> slcan, but it does open up a few questions :
>>
>> 1. What is slcan anyway, and why is it not handled like the other drivers?
> 
> 
> The SLCAN driver adds the support for (usually low cost) simple CAN interfaces
> that transfer the CAN frames via some ASCII based protocol.
> 
> As these interfaces are attached via the serial line (RS232 or USB/serial) the
> slcan driver implements a 'serial line discipline' as you might know from
> early internet times where you used a modem to connect the internet.
> 
> In that modem case IP network packets have been transmitted through the serial
> line, after the modem has been set up and connected (-> ppp daemon).
> Once switching the 'line discipline' IP packets are tranferred via serial.
> 
> Same here with SLCAN:
> 
> First the SLCAN adapter needs to be configured (speed 'S') and opened 'O' and
> then the line discipline is switched to transfer CAN frames with the ASCII
> protocol (slcan_attach, slcand).
> 
> As this is a completely different CAN adapter configuration interface the
> CAN-DEV framework therefore can not be used and the 'ip link set' stuff does
> not work for SLCAN devices.
> 
>> 2. Is there a can_if style script that already handles slcan?
> 
> 
> We have extended the can_if script for slcan at Volkswagen and also extended
> the slcand to do some of the setup from slcan_attach (e.g. for the CAN
> bitrate). I don't know the exact state of these extensions and if it works
> stable in all environments (udev, ...). But if you like, i can sent it to you
> and you may check if it fit's your needs and if it's worth to merge it with
> the can-utils.

Please share the changes for can_if and related stuff. I was already looking for this.

Best regards,
Yegor


  reply	other threads:[~2012-10-15  7:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 23:25 "Blessed" Version Stuart Statman
2012-10-10 10:58 ` Wolfgang Grandegger
2012-10-11 19:09   ` Stuart Statman
2012-10-13 10:17     ` Oliver Hartkopp
2012-10-15  6:33       ` Yegor Yefremov [this message]
2012-10-15 18:12       ` Stuart Statman

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=507BAE41.4080104@visionsystems.de \
    --to=yegor_sub1@visionsystems.de \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=sstatman@sunverge.com \
    --cc=wg@grandegger.com \
    /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