From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Rein Appeldoorn <reinappeldoorn@gmail.com>
Cc: linux-can@vger.kernel.org
Subject: Re: SocketCAN support for a Serial-CAN controller
Date: Mon, 25 Apr 2016 09:42:36 +0200 [thread overview]
Message-ID: <571DCA6C.8000102@hartkopp.net> (raw)
In-Reply-To: <CAPO0vcsCE1P56MtDw7B3jnp4cFVBd6zCBpmUGHDW30hWmc2Z+w@mail.gmail.com>
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
>
next prev parent reply other threads:[~2016-04-25 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2016-04-25 7:43 ` Rein Appeldoorn
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=571DCA6C.8000102@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=reinappeldoorn@gmail.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