Linux CAN drivers development
 help / color / mirror / Atom feed
* Re: SocketCAN support for a Serial-CAN controller
       [not found] <CAPO0vcvuOaGxcCA-722c60o4-k-6somqCD1nuaaV6tWiPkoiTw@mail.gmail.com>
@ 2016-04-22 11:17 ` Rein Appeldoorn
  2016-04-23 13:54   ` Oliver Hartkopp
  0 siblings, 1 reply; 5+ messages in thread
From: Rein Appeldoorn @ 2016-04-22 11:17 UTC (permalink / raw)
  To: linux-can

Hi all,

Up until now, I've been working with SocketCAN via CANUSB adapters
from Lawycel (http://www.can232.com/?page_id=16). However, now we
received a new platform with another serial-can controller from
axiomtek (http://www.axiomtek.com/Default.aspx?MenuId=Products&FunctionId=ProductView&ItemId=8270).

I am able to communicate with the CAN controller via serial and
receive CAN frames. However, using slcand to create a socketcan
interface does not work. As I see here
https://github.com/linux-can/can-utils/blob/master/slcand.c , the
slcand program sends specific commands to the serial bus and then
creates a bridge between the socket and serial. However, the commands
are different for my CAN controller.

Can somebody give me some pointers how to get SocketCAN to work with
an arbitrary serial-can controller?

I'm am very new to these low level Linux things so I really would
appreciate your help / corrections. Thanks in advance,

-Rein

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support for a Serial-CAN controller
  2016-04-22 11:17 ` SocketCAN support for a Serial-CAN controller Rein Appeldoorn
@ 2016-04-23 13:54   ` Oliver Hartkopp
  2016-04-25  7:26     ` Rein Appeldoorn
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Hartkopp @ 2016-04-23 13:54 UTC (permalink / raw)
  To: Rein Appeldoorn, linux-can

Hello Rein,

On 04/22/2016 01:17 PM, Rein Appeldoorn wrote:

> Up until now, I've been working with SocketCAN via CANUSB adapters
> from Lawycel (http://www.can232.com/?page_id=16). However, now we
> received a new platform with another serial-can controller from
> axiomtek (http://www.axiomtek.com/Default.aspx?MenuId=Products&FunctionId=ProductView&ItemId=8270).
>
> I am able to communicate with the CAN controller via serial and
> receive CAN frames. However, using slcand to create a socketcan
> interface does not work. As I see here
> https://github.com/linux-can/can-utils/blob/master/slcand.c , the
> slcand program sends specific commands to the serial bus and then
> creates a bridge between the socket and serial. However, the commands
> are different for my CAN controller.

Yes. That's pretty bad to reinvent the wheel by creating 'just another' 
CAN ASCII protocol :-(

> Can somebody give me some pointers how to get SocketCAN to work with
> an arbitrary serial-can controller?

The slcan driver supports the standard SLCAN protocols as you know from 
Lawicel:

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

> I'm am very new to these low level Linux things so I really would
> appreciate your help / corrections. Thanks in advance,

You would need to extend the slcan.c driver and the slcan tools from the 
can-utils to cope with the Axiomtek protocol.

Alternatively you can write a user space application that talks to the 
Axiomtek device and send the CAN frames to a virtual CAN (e.g. vcan0) so 
that you can use the can-utils on top of that virtual CAN.

Just a different idea: As you obviously have a full-size mini 
PCI-Express module - why don't you use a proper CAN PCIe interface with 
a PCI-connected SJA1000 controller which is already supported by Linux?

All this serial line encapsulation stuff does not support the really 
good (configuration) things and error handling from SocketCAN.

Regards,
Oliver

ps. Maybe Axiomtek can also provide a SLCAN compatible firmware ...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support for a Serial-CAN controller
  2016-04-23 13:54   ` Oliver Hartkopp
@ 2016-04-25  7:26     ` Rein Appeldoorn
  2016-04-25  7:42       ` Oliver Hartkopp
  0 siblings, 1 reply; 5+ messages in thread
From: Rein Appeldoorn @ 2016-04-25  7:26 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: linux-can

Hi Oliver,

Thanks for the feedback. I think it is best we go for a PCI SJ1000
controller then. Do you perhaps have any recommendations on this? I
was thinking about the PEAK can pci controller:
http://www.peak-system.com/PCAN-miniPCIe.285.0.html

Thanks,

-Rein
-Rein


On Sat, Apr 23, 2016 at 3:54 PM, Oliver Hartkopp <socketcan@hartkopp.net> wrote:
> Hello Rein,
>
> On 04/22/2016 01:17 PM, Rein Appeldoorn wrote:
>
>> Up until now, I've been working with SocketCAN via CANUSB adapters
>> from Lawycel (http://www.can232.com/?page_id=16). However, now we
>> received a new platform with another serial-can controller from
>> axiomtek
>> (http://www.axiomtek.com/Default.aspx?MenuId=Products&FunctionId=ProductView&ItemId=8270).
>>
>> I am able to communicate with the CAN controller via serial and
>> receive CAN frames. However, using slcand to create a socketcan
>> interface does not work. As I see here
>> https://github.com/linux-can/can-utils/blob/master/slcand.c , the
>> slcand program sends specific commands to the serial bus and then
>> creates a bridge between the socket and serial. However, the commands
>> are different for my CAN controller.
>
>
> Yes. That's pretty bad to reinvent the wheel by creating 'just another' CAN
> ASCII protocol :-(
>
>> Can somebody give me some pointers how to get SocketCAN to work with
>> an arbitrary serial-can controller?
>
>
> The slcan driver supports the standard SLCAN protocols as you know from
> Lawicel:
>
> https://github.com/linux-can/can-misc/blob/master/docs/SLCAN-API.pdf
>
>> I'm am very new to these low level Linux things so I really would
>> appreciate your help / corrections. Thanks in advance,
>
>
> You would need to extend the slcan.c driver and the slcan tools from the
> can-utils to cope with the Axiomtek protocol.
>
> Alternatively you can write a user space application that talks to the
> Axiomtek device and send the CAN frames to a virtual CAN (e.g. vcan0) so
> that you can use the can-utils on top of that virtual CAN.
>
> Just a different idea: As you obviously have a full-size mini PCI-Express
> module - why don't you use a proper CAN PCIe interface with a PCI-connected
> SJA1000 controller which is already supported by Linux?
>
> All this serial line encapsulation stuff does not support the really good
> (configuration) things and error handling from SocketCAN.
>
> Regards,
> Oliver
>
> ps. Maybe Axiomtek can also provide a SLCAN compatible firmware ...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support for a Serial-CAN controller
  2016-04-25  7:26     ` Rein Appeldoorn
@ 2016-04-25  7:42       ` Oliver Hartkopp
  2016-04-25  7:43         ` Rein Appeldoorn
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Hartkopp @ 2016-04-25  7:42 UTC (permalink / raw)
  To: Rein Appeldoorn; +Cc: linux-can

On 04/25/2016 09:26 AM, Rein Appeldoorn wrote:

> Thanks for the feedback. I think it is best we go for a PCI SJ1000
> controller then. Do you perhaps have any recommendations on this? I
> was thinking about the PEAK can pci controller:
> http://www.peak-system.com/PCAN-miniPCIe.285.0.html

I have some of them running in a Core i7 carpc setup and can confirm 
that they are working out of the box with Mainline Linux.

Best regards,
Oliver

>
> On Sat, Apr 23, 2016 at 3:54 PM, Oliver Hartkopp <socketcan@hartkopp.net> wrote:
>> Hello Rein,
>>
>> On 04/22/2016 01:17 PM, Rein Appeldoorn wrote:
>>
>>> Up until now, I've been working with SocketCAN via CANUSB adapters
>>> from Lawycel (http://www.can232.com/?page_id=16). However, now we
>>> received a new platform with another serial-can controller from
>>> axiomtek
>>> (http://www.axiomtek.com/Default.aspx?MenuId=Products&FunctionId=ProductView&ItemId=8270).
>>>
>>> I am able to communicate with the CAN controller via serial and
>>> receive CAN frames. However, using slcand to create a socketcan
>>> interface does not work. As I see here
>>> https://github.com/linux-can/can-utils/blob/master/slcand.c , the
>>> slcand program sends specific commands to the serial bus and then
>>> creates a bridge between the socket and serial. However, the commands
>>> are different for my CAN controller.
>>
>>
>> Yes. That's pretty bad to reinvent the wheel by creating 'just another' CAN
>> ASCII protocol :-(
>>
>>> Can somebody give me some pointers how to get SocketCAN to work with
>>> an arbitrary serial-can controller?
>>
>>
>> The slcan driver supports the standard SLCAN protocols as you know from
>> Lawicel:
>>
>> https://github.com/linux-can/can-misc/blob/master/docs/SLCAN-API.pdf
>>
>>> I'm am very new to these low level Linux things so I really would
>>> appreciate your help / corrections. Thanks in advance,
>>
>>
>> You would need to extend the slcan.c driver and the slcan tools from the
>> can-utils to cope with the Axiomtek protocol.
>>
>> Alternatively you can write a user space application that talks to the
>> Axiomtek device and send the CAN frames to a virtual CAN (e.g. vcan0) so
>> that you can use the can-utils on top of that virtual CAN.
>>
>> Just a different idea: As you obviously have a full-size mini PCI-Express
>> module - why don't you use a proper CAN PCIe interface with a PCI-connected
>> SJA1000 controller which is already supported by Linux?
>>
>> All this serial line encapsulation stuff does not support the really good
>> (configuration) things and error handling from SocketCAN.
>>
>> Regards,
>> Oliver
>>
>> ps. Maybe Axiomtek can also provide a SLCAN compatible firmware ...
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support for a Serial-CAN controller
  2016-04-25  7:42       ` Oliver Hartkopp
@ 2016-04-25  7:43         ` Rein Appeldoorn
  0 siblings, 0 replies; 5+ messages in thread
From: Rein Appeldoorn @ 2016-04-25  7:43 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: linux-can

Thanks for the help!

-Rein


On Mon, Apr 25, 2016 at 9:42 AM, Oliver Hartkopp <socketcan@hartkopp.net> wrote:
> On 04/25/2016 09:26 AM, Rein Appeldoorn wrote:
>
>> Thanks for the feedback. I think it is best we go for a PCI SJ1000
>> controller then. Do you perhaps have any recommendations on this? I
>> was thinking about the PEAK can pci controller:
>> http://www.peak-system.com/PCAN-miniPCIe.285.0.html
>
>
> I have some of them running in a Core i7 carpc setup and can confirm that
> they are working out of the box with Mainline Linux.
>
> Best regards,
> Oliver
>
>>
>> On Sat, Apr 23, 2016 at 3:54 PM, Oliver Hartkopp <socketcan@hartkopp.net>
>> wrote:
>>>
>>> Hello Rein,
>>>
>>> On 04/22/2016 01:17 PM, Rein Appeldoorn wrote:
>>>
>>>> Up until now, I've been working with SocketCAN via CANUSB adapters
>>>> from Lawycel (http://www.can232.com/?page_id=16). However, now we
>>>> received a new platform with another serial-can controller from
>>>> axiomtek
>>>>
>>>> (http://www.axiomtek.com/Default.aspx?MenuId=Products&FunctionId=ProductView&ItemId=8270).
>>>>
>>>> I am able to communicate with the CAN controller via serial and
>>>> receive CAN frames. However, using slcand to create a socketcan
>>>> interface does not work. As I see here
>>>> https://github.com/linux-can/can-utils/blob/master/slcand.c , the
>>>> slcand program sends specific commands to the serial bus and then
>>>> creates a bridge between the socket and serial. However, the commands
>>>> are different for my CAN controller.
>>>
>>>
>>>
>>> Yes. That's pretty bad to reinvent the wheel by creating 'just another'
>>> CAN
>>> ASCII protocol :-(
>>>
>>>> Can somebody give me some pointers how to get SocketCAN to work with
>>>> an arbitrary serial-can controller?
>>>
>>>
>>>
>>> The slcan driver supports the standard SLCAN protocols as you know from
>>> Lawicel:
>>>
>>> https://github.com/linux-can/can-misc/blob/master/docs/SLCAN-API.pdf
>>>
>>>> I'm am very new to these low level Linux things so I really would
>>>> appreciate your help / corrections. Thanks in advance,
>>>
>>>
>>>
>>> You would need to extend the slcan.c driver and the slcan tools from the
>>> can-utils to cope with the Axiomtek protocol.
>>>
>>> Alternatively you can write a user space application that talks to the
>>> Axiomtek device and send the CAN frames to a virtual CAN (e.g. vcan0) so
>>> that you can use the can-utils on top of that virtual CAN.
>>>
>>> Just a different idea: As you obviously have a full-size mini PCI-Express
>>> module - why don't you use a proper CAN PCIe interface with a
>>> PCI-connected
>>> SJA1000 controller which is already supported by Linux?
>>>
>>> All this serial line encapsulation stuff does not support the really good
>>> (configuration) things and error handling from SocketCAN.
>>>
>>> Regards,
>>> Oliver
>>>
>>> ps. Maybe Axiomtek can also provide a SLCAN compatible firmware ...
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-25  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAPO0vcvuOaGxcCA-722c60o4-k-6somqCD1nuaaV6tWiPkoiTw@mail.gmail.com>
2016-04-22 11:17 ` SocketCAN support for a Serial-CAN controller Rein Appeldoorn
2016-04-23 13:54   ` Oliver Hartkopp
2016-04-25  7:26     ` Rein Appeldoorn
2016-04-25  7:42       ` Oliver Hartkopp
2016-04-25  7:43         ` Rein Appeldoorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox