can-bus

How socketcan get send failure status?

可紊 提交于 2021-02-11 14:47:00
问题 As we all know, in the CAN bus communication protocol, sender know whether the data was successfully sent. I send socketcan data as follows. ret = write (socket, frame, sizeof (struct can_frame)); However, even if the CAN communication cable is disconnected, the return value of ret is still 16(=sizeof (struct can_frame)).I queried the information and found that the problem was due to the tx_queue of the network stack used by socketcan. When write is called multiple times, the buffer is full

Sending CAN frame via UDP in Python

 ̄綄美尐妖づ 提交于 2021-02-05 08:46:07
问题 I made UDP socket connection between two Linux machines and can send for example b"Hello, World!" easily. But now I need to send the below CAN frame from can import Message send_msg = Message(data=[1, 2, 3, 4, 5]) So if I print send_msg it shows: Timestamp: 0.000000 ID: 00000000 X DLC: 5 01 02 03 04 05 I want to get this printed on the receiving end. The sending and receiving end codes I am using are below: Sending: import socket UDP_IP = "10.140.189.249" UDP_PORT = 5005 from can import

J1939 in Linux Kernel [duplicate]

旧街凉风 提交于 2020-02-26 04:19:25
问题 This question already exists : Installation of j1939 for linux kernel [closed] Closed 11 days ago . Iam working with imx6ull board. Iam developing software stack for CAN J1939 protocol.In the development stage i got to know that we need to add support for J1939 in Kernel. Iam using Linux kernel version 4.1.15.Can anyone suggest a way to install J1939 in Linux kernel? 来源: https://stackoverflow.com/questions/60224434/j1939-in-linux-kernel

Installation of j1939 for linux kernel [closed]

主宰稳场 提交于 2020-02-16 11:34:00
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 days ago . Can anyone provide a way to install J1939 protocol in linux kernel version 4.1.15? 来源: https://stackoverflow.com/questions/60202658/installation-of-j1939-for-linux-kernel

Installation of j1939 for linux kernel [closed]

会有一股神秘感。 提交于 2020-02-16 11:31:51
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 days ago . Can anyone provide a way to install J1939 protocol in linux kernel version 4.1.15? 来源: https://stackoverflow.com/questions/60202658/installation-of-j1939-for-linux-kernel

Is it possible to request all desired ODB II PIDs via a .dbc file?

孤街浪徒 提交于 2020-01-17 07:28:10
问题 What I'm looking to do is request all desired PIDs via a .dbc file made in Vector db Editor++. I understand enough about CAN communication to be able to do this with 1 or 2 PIDs because the DLC allows up to 8 bytes of data per CAN message. I am also familiar with this resource on querying and responses of PID https://en.wikipedia.org/wiki/OBD-II_PIDs#CAN_.2811-bit.29_bus_format What I'm having trouble understanding is how diagnostic tools are able to query every PID the manufacturer of a

STM32F103 microcontroller CAN messages

痞子三分冷 提交于 2020-01-13 20:31:50
问题 I am wondering if anyone is familiar with any STM32f10x micro-controllers? If so, I am having some problems configuring a CAN driver. I can run the demo code, which is set to a loop_Back mode, but I cannot get Normal_Mode to work. I read through all the data sheets, and everything is configured correctly except the INAK in the CAN_MSR register never resets to 0. I can provide more detail if needed, but first I need to know if there is someone who has worked with a STM32F103 microcontroller

Running a Blf file in constant Loop for Emulation using CAPL

拈花ヽ惹草 提交于 2020-01-07 09:03:12
问题 I want to run a .blf file using the Replay Block in CANalyzer . I want to run this file in a constant loop for emulation purpose. Is it possible using CAPL or can some one instruct me how to do this even without CAPL. 回答1: You don't need CAPL to replay a log file in a loop. Right click the Replay block In the "General" tab, enable " Repetitive output sending mode " 来源: https://stackoverflow.com/questions/31925321/running-a-blf-file-in-constant-loop-for-emulation-using-capl