linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Generic USB driver for small hardware projects?
@ 2016-04-04 20:08 Hubert Denkmair
  2016-04-06 13:23 ` Maximilain Schneider
  0 siblings, 1 reply; 3+ messages in thread
From: Hubert Denkmair @ 2016-04-04 20:08 UTC (permalink / raw)
  To: linux-can

Hi all,

I'm new to this list, so please excuse if my topic has been discussed
before. I didn't find anything like it in the recent archives, though...

I'm currently building - as others did before me - a small, cheap, open
hardware USB-CAN-Converter.

Now I have the same problem as everyone before me - how to get socketcan
support for it.

Of course, I can make a ACM device and implement the slcan protocol.
Which is, imho, a ugly hack and, besides needing a userspace daemon,
seems to have some shortcomings (e.g. not supporting the netlink config
interface, only a few supported bitrates...).

I'd much rather like to build a native socketcan usb driver for my
hardware. As this seems to be overkill for a small project like mine,
I'd propose to do something better:

Why not build a usb driver with a generic interface that all hardware
projects can implement if they want native socketcan support?

Though, before starting something like that, I'd like to know how you
think about it. Can I expect some support from the list?
Is there a existing usb driver to start from?
Do you think there is a chance to get such a driver into mainline kernel
in the near future?

If there is some interest, I'd like to discuss on the list how such a
interface should look like; E.g. provide all socketcan features, in a
way so that it's both easy to implement in firmware and the linux
driver, while making it possible for the hardware to also support other
protocols, e.g. the slcan interface.

Please let me know what you think of my proposal,

Cheers

Hubert

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

* Re: Generic USB driver for small hardware projects?
  2016-04-04 20:08 Generic USB driver for small hardware projects? Hubert Denkmair
@ 2016-04-06 13:23 ` Maximilain Schneider
  2016-04-06 13:54   ` xor
  0 siblings, 1 reply; 3+ messages in thread
From: Maximilain Schneider @ 2016-04-06 13:23 UTC (permalink / raw)
  To: Hubert Denkmair; +Cc: linux-can

Hello Hubert,

The Geschwister Schneider devices are open hardware and license free.
You can build your device to be compatible with the gs_usb device
driver. The source can be found at drivers/net/can/usb/gs_usb.c in the
linux source code.

I realize there is no easy to follow spec available for the gs_usb
protocol (I'm too lazy to write it), so implementing it will be a little
adventure. But if you have any questions, you can always ask me
directly.

If you implement the protocol, your device should work plug and play
with any uptodate and sufficiently configured kernel.

Of course, you could also write your own kernel module and load it
manually as needed.

Regards,
Max Schneider.

On Mon, 2016-04-04 at 22:08 +0200, Hubert Denkmair wrote:
> Hi all,
> 
> I'm new to this list, so please excuse if my topic has been discussed
> before. I didn't find anything like it in the recent archives, though...
> 
> I'm currently building - as others did before me - a small, cheap, open
> hardware USB-CAN-Converter.
> 
> Now I have the same problem as everyone before me - how to get socketcan
> support for it.
> 
> Of course, I can make a ACM device and implement the slcan protocol.
> Which is, imho, a ugly hack and, besides needing a userspace daemon,
> seems to have some shortcomings (e.g. not supporting the netlink config
> interface, only a few supported bitrates...).
> 
> I'd much rather like to build a native socketcan usb driver for my
> hardware. As this seems to be overkill for a small project like mine,
> I'd propose to do something better:
> 
> Why not build a usb driver with a generic interface that all hardware
> projects can implement if they want native socketcan support?
> 
> Though, before starting something like that, I'd like to know how you
> think about it. Can I expect some support from the list?
> Is there a existing usb driver to start from?
> Do you think there is a chance to get such a driver into mainline kernel
> in the near future?
> 
> If there is some interest, I'd like to discuss on the list how such a
> interface should look like; E.g. provide all socketcan features, in a
> way so that it's both easy to implement in firmware and the linux
> driver, while making it possible for the hardware to also support other
> protocols, e.g. the slcan interface.
> 
> Please let me know what you think of my proposal,
> 
> Cheers
> 
> Hubert
> --
> 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] 3+ messages in thread

* Re: Generic USB driver for small hardware projects?
  2016-04-06 13:23 ` Maximilain Schneider
@ 2016-04-06 13:54   ` xor
  0 siblings, 0 replies; 3+ messages in thread
From: xor @ 2016-04-06 13:54 UTC (permalink / raw)
  To: Maximilain Schneider; +Cc: linux-can

Thanks Max,

thanks for your support, I wasn't aware of your device until now.
I'll take a closer look this weekend, for now the driver code looks nice 
& lean to me.

Greetings,

Hubert


Am 2016-04-06 15:23, schrieb Maximilain Schneider:
> Hello Hubert,
> 
> The Geschwister Schneider devices are open hardware and license free.
> You can build your device to be compatible with the gs_usb device
> driver. The source can be found at drivers/net/can/usb/gs_usb.c in the
> linux source code.
> 
> I realize there is no easy to follow spec available for the gs_usb
> protocol (I'm too lazy to write it), so implementing it will be a 
> little
> adventure. But if you have any questions, you can always ask me
> directly.
> 
> If you implement the protocol, your device should work plug and play
> with any uptodate and sufficiently configured kernel.
> 
> Of course, you could also write your own kernel module and load it
> manually as needed.
> 
> Regards,
> Max Schneider.
> 
> On Mon, 2016-04-04 at 22:08 +0200, Hubert Denkmair wrote:
>> Hi all,
>> 
>> I'm new to this list, so please excuse if my topic has been discussed
>> before. I didn't find anything like it in the recent archives, 
>> though...
>> 
>> I'm currently building - as others did before me - a small, cheap, 
>> open
>> hardware USB-CAN-Converter.
>> 
>> Now I have the same problem as everyone before me - how to get 
>> socketcan
>> support for it.
>> 
>> Of course, I can make a ACM device and implement the slcan protocol.
>> Which is, imho, a ugly hack and, besides needing a userspace daemon,
>> seems to have some shortcomings (e.g. not supporting the netlink 
>> config
>> interface, only a few supported bitrates...).
>> 
>> I'd much rather like to build a native socketcan usb driver for my
>> hardware. As this seems to be overkill for a small project like mine,
>> I'd propose to do something better:
>> 
>> Why not build a usb driver with a generic interface that all hardware
>> projects can implement if they want native socketcan support?
>> 
>> Though, before starting something like that, I'd like to know how you
>> think about it. Can I expect some support from the list?
>> Is there a existing usb driver to start from?
>> Do you think there is a chance to get such a driver into mainline 
>> kernel
>> in the near future?
>> 
>> If there is some interest, I'd like to discuss on the list how such a
>> interface should look like; E.g. provide all socketcan features, in a
>> way so that it's both easy to implement in firmware and the linux
>> driver, while making it possible for the hardware to also support 
>> other
>> protocols, e.g. the slcan interface.
>> 
>> Please let me know what you think of my proposal,
>> 
>> Cheers
>> 
>> Hubert
>> --
>> 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] 3+ messages in thread

end of thread, other threads:[~2016-04-06 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-04 20:08 Generic USB driver for small hardware projects? Hubert Denkmair
2016-04-06 13:23 ` Maximilain Schneider
2016-04-06 13:54   ` xor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).