Skip to contentSkip to conversation

"Blessed" Version

DISCUSSION Stuart Statman 4 participants 6 messages Oct 9, 2012 – Oct 15, 2012 CAN network drivers

lore
Share & tools
lore
#0 lore raw

Sorry if this is a repeat of an earlier question; I missed the transition from Berlios to this mailing list, and am only now catching up.

I've been sticking with a snapshot of the source tree from months ago. It isn't that I don't want the changes, I just don't want to have to retest my gear with a new set of drivers. (I'm also sticking with older versions of the kernel, same reason.)

However, we want to start testing against newer 2.6 kernels. However, it turns out that my snapshot from so many moons ago no longer compiles against the latest CentOS blessed 2.6 kernel.

So ... how do I get the latest release version of the SocketCAN drivers, CAN utils, etc? I could use git to grab from the head, I suppose, but that may be too bleeding edge for me.

(Forgive my almost complete ignorance of git, by the way. I'm likely to ask wildly stupid questions on this thread.)

Signature · 4 lines
Stu Statman
VP of Engineering
Sunverge, Inc
http://www.sunverge.com
#1 lore raw
Quoted 9 lines · Stuart Statman

Sorry if this is a repeat of an earlier question; I missed the transition from Berlios to this mailing list, and am only now catching up.

I've been sticking with a snapshot of the source tree from months ago. It isn't that I don't want the changes, I just don't want to have to retest my gear with a new set of drivers. (I'm also sticking with older versions of the kernel, same reason.)

Quoted 7 lines

However, we want to start testing against newer 2.6 kernels. However, it turns out that my snapshot from so many moons ago no longer compiles against the latest CentOS blessed 2.6 kernel.

So ... how do I get the latest release version of the SocketCAN drivers, CAN utils, etc? I could use git to grab from the head, I suppose, but that may be too bleeding edge for me.

We have moved to http://gitorious.org/linux-can. CAN utilities and kernel modules have been separated. You find them under "can-utils" and "can-modules". If you can, you should use a recent kernel version to avoid the "can-modules". I'm afraid, they are not really well maintained.

What kernel version do you plan to use? What CAN hardware do you want to support?

Quoted 2 lines

(Forgive my almost complete ignorance of git, by the way. I'm likely to ask wildly stupid questions on this thread.)

You are welcome.

Wolfgang.

#2 lore raw
Quoted 1 line · Wolfgang Grandegger

We have moved to http://gitorious.org/linux-can. CAN utilities and kernel modules have been separated. You find them under "can-utils" and "can-modules". If you can, you should use a recent kernel version to avoid the "can-modules". I'm afraid, they are not really well maintained. What kernel version do you plan to use? What CAN hardware do you want to support?

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?
2. Is there a can_if style script that already handles slcan?

Signature · 4 lines
Stu Statman
VP of Engineering
Sunverge, Inc
http://www.sunverge.com
#3 lore raw

Hello Stuart,

Quoted 5 lines · Stuart Statman

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.

Quoted 7 lines

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.

Quoted 1 line

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.

Regards,
Oliver

#4 lore raw
Quoted 42 lines · Oliver Hartkopp

Hello Stuart,

Quoted 5 lines · Stuart Statman

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.

Quoted 7 lines

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.

Quoted 1 line

2. Is there a can_if style script that already handles slcan?

Quoted 6 lines

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

#5 lore raw
In reply to Oliver Hartkopp
Quoted 7 lines · Oliver Hartkopp
Quoted 1 line

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.

I would love to see this! Thanks!

Signature · 4 lines
Stu Statman
VP of Engineering
Sunverge, Inc
http://www.sunverge.com