W
W
Whiteha2015-07-03 15:58:08
linux
Whiteha, 2015-07-03 15:58:08

A computer on linux with a CAN controller to which the sensor is connected, how to receive and transmit data?

I apologize in advance for a probably stupid question, unfortunately I don’t know much about the low level of development, but the problem needs to be solved.
I have a computer on yocto Linux assembled with support for such a thing - CANBUS: (Intel Corporation Platform Controller Hub EG20T Controller Area Network (CAN) Controller). Actually, I have a sensor plugged into this controller, and I need to programmatically send data to it in accordance with a certain protocol and receive a response. Actually the question is how can I programmatically establish data exchange with the sensor through the can controller? It seems that this is somehow done through sockets, but how exactly do I specify where and what to connect to?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
t_q_l, 2015-07-03
@Whiteha

View controller parameters:
Most likely the device will have a name of the form can0
Send a CAN message with the value can_id =0x6B2 and the value of the data field 0x1111111112222222:
Get statistics from the CAN bus:
More details here and there .

D
Dmitry Shapoval, 2015-07-03
@unkier

elinux.org/CAN_Bus
you create a socket, you specify with what interface it works, you send/receive data. everything is easy to google. what could be the problem ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question