2008-12-15 14:26:48     CAN Question

Document created by Aaronwu Employee on Aug 9, 2013
Version 1Show Document
  • View in full screen mode

2008-12-15 14:26:48     CAN Question

ivan ucles (GERMANY)

Message: 66724   

 

Hi,

 

I´d like that somebody could explain me a little bit about the can4linux driver.

 

The can4linux provides the funcition write() to send a message

 

but there is also a function can_Send() that is called with ioctl() giving the proper arguments.

 

Which one should i use? Do they provide the same functionality?

 

Thanks!

QuoteReplyEditDelete

 

 

2008-12-15 14:29:19     Re: CAN Question

Mike Frysinger (UNITED STATES)

Message: 66725   

 

can4linux is documented at its homepage:

http://www.port.de/software/can4linux/

QuoteReplyEditDelete

 

 

2008-12-15 14:55:57     Re: CAN Question

ivan ucles (GERMANY)

Message: 66727   

 

Thanks Mike

 

I had already read that page but i still don't get what i explain in the previous message.

 

Maybe someone could give me a further and brief explanation?

 

Thanks

QuoteReplyEditDelete

 

 

2008-12-16 04:59:21     Re: CAN Question

Miquel Soler i Mir (SPAIN)

Message: 66749   

 

Hallo Ivan.

 

I hope this code can help you.

 

Miquel Soler i Mir

 

CANTR.c

TranslateQuoteReplyEditDelete

 

 

2008-12-16 07:11:46     Re: CAN Question

ivan ucles (GERMANY)

Message: 66752   

 

Hola Miquel,

 

gracias por tu respuesta.

 

Yo tambien hice un programa parecido usando write() y read()

 

y puedo intercambiar mensajes entre las dos placas.

 

Lo que preguntaba es cual es entonces la funcion de las rutinas can_Send y can_Receive()

 

que se pueden llamar con CAN_IOCTL_SEND e CAN_IOCTL_RECEIVE desde ioctl().

 

Has usado esas funciones? Sirven para lo mismo que read y write?

 

Un saludo

Attachments

Outcomes