Re: canfd through slcan via SocketCAN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

On 16/02/2020 14.43, Chris Morgan wrote:

I’m looking at options to add canfd support to embedded processors via serial using slcan. I’d like the devices to be available via socketcan. Looking at the slcan driver it looks like the MTU is something around 30 bytes and there isn’t any mention of canfd in the driver or in the userspace utilities. Am I missing something with this support? If slcan doesn’t support canfd yet is anyone working to add any?

The slcan driver implements the SLCAN aka Lawicel protocol, originally provided by http://www.can232.com/

See documentation at:
http://www.can232.com/docs/can232_v3.pdf

Other low cost serial CAN adapters adopted this simple protocol, see this overview:

https://github.com/linux-can/can-misc/blob/master/docs/SLCAN-API.pdf

By today there is no CAN FD capable CAN interface using the SLCAN protocol on the market!!

You would need to set a second bitrate (data bitrate) and you would need a separated data frame identifier for CAN FD frames.

Today:

t/T -> Classic CAN data frame
r/R -> Classic CAN rtr frame (not in CAN FD)

According to the above documents we would been able to use:

d/D -> CAN FD data frame (with BRS/ESI flags!)
k/K -> set FD data bitrates (analogue to s/S)

The biggest problem with defining these values/characters and adding them to the slcan driver in the Linux kernel, is that WE DO NOT KNOW whether future serial CAN FD interfaces will follow our suggestion.

Usually you have a hardware providing an API/protocol and THEN the driver developers write the driver - and not the other way around ;-)

Regards,
Oliver



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux