socketcan

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

socketcan

kedar
Hi,
             I am new to socketcan and i write a socketcan driver based on the standard can drivers now i want to compile that driver how to compile it and please help me how to write user space applications and how to test my hardware so that  my driver code is correct .please help me regarding this issue

Thanks in advance,

Regards
Kedar

_______________________________________________
Socketcan-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/socketcan-users
Reply | Threaded
Open this post in threaded view
|

Re: socketcan

Marc Kleine-Budde
On 04/26/2013 03:03 PM, kedari appana wrote:
> I am new to socketcan and i write a socketcan driver based on the
> standard can drivers now i want to compile that driver how to compile

Add your driver to your linux kernel under:

    drivers/net/can/

and add an option to

    drivers/net/can/Kconfig
    drivers/net/can/Makefile

follow an existing driver like e.g. flexcan [1][2].

> it and please help me how to write user space applications and how to
> test my hardware so that  my driver code is correct .please help me
> regarding this issue

There are existing userspace applications, e.g. the can-utils, which can
be downlaoded at gitorious.org [3]. Use cansend and candump to send and
receive can messages. Use "ip" of the iproute2 package to configure the
bitrate of your can interface[4]. See that document for more information
about CAN under Linux.

hth,
Marc

[1] http://lxr.free-electrons.com/source/drivers/net/can/Kconfig#L99
[2] http://lxr.free-electrons.com/source/drivers/net/can/Makefile#L23
[3] https://gitorious.org/linux-can/can-utils
[4]
http://lxr.free-electrons.com/source/Documentation/networking/can.txt#L854
--
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


_______________________________________________
Socketcan-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/socketcan-users

signature.asc (271 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: socketcan

kedar
In reply to this post by kedar
Hi,
By googling and reading the socket can mailing issues i finally relized that for compiling my can hardware there are user space utilites called iproute2 and canutils before configuring canutils we need to compile libsocketcan binaries right? because the canutils depends on libsockeutils.I downloaded the all the above utilites and i try to run make on libsocletcan utilities but it is error as no targets are found in and no make file found.Please help me regarding the issue.


Please tell me indetail how to configure this utilities and how to check version and whether that version is compatiable with my linux version? i am using linux 3.8

Waiting for your response,

Thanks,
Kedar


On Fri, Apr 26, 2013 at 6:33 PM, kedari appana <[hidden email]> wrote:
Hi,
             I am new to socketcan and i write a socketcan driver based on the standard can drivers now i want to compile that driver how to compile it and please help me how to write user space applications and how to test my hardware so that  my driver code is correct .please help me regarding this issue

Thanks in advance,

Regards
Kedar


_______________________________________________
Socketcan-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/socketcan-users
Reply | Threaded
Open this post in threaded view
|

Re: socketcan

kedar
In reply to this post by kedar
Hi,
thank u for your suggestion,Now i able to compile can utilities and iproute2 and libsocketcan utilities.But when i try to use  any one of the below commands i am getting below errors.
 ip link set can0 type can bitrate 50000 triple-sampling on
ip: either "dev" is duplicate, or "type" is garbage
 canconfig can0 bitrate 50000 ctrlmode triple-sampling on
-sh: canconfig: not found
Please explain me how to compile the socketcan am i need to copy these can utilities into linux-source tree in order work.Please explain
I am new to linux that's why i am asking everything sorry for making inconvenience to you.

Regards,
Kedar.


On Fri, Apr 26, 2013 at 6:33 PM, kedari appana <[hidden email]> wrote:
Hi,
             I am new to socketcan and i write a socketcan driver based on the standard can drivers now i want to compile that driver how to compile it and please help me how to write user space applications and how to test my hardware so that  my driver code is correct .please help me regarding this issue

Thanks in advance,

Regards
Kedar


_______________________________________________
Socketcan-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/socketcan-users