Questions tagged [socketcan]

SocketCAN is a Linux socket based implementation for Controller Area Network (CAN) protocol.

155 questions
1
vote
0 answers

Timestamp for Ethernet frames

I am receiving CAN and Ethernet messages I would like to compare them according to timestamp. i am using socket CAN and "ioctl(s, SIOCGSTAMP, &tv);" function to get timestamp for can frames and it works great;where s is the socket of can but when…
1
vote
0 answers

How to receive CAN data in a linux device driver?

I want to read the CAN bus and get the data from a specific device on the CAN bus. I have implemented this previously using the Socket communication api that is available in the user space (sys/socket). I now have a similar requirement but this…
1
vote
1 answer

Building Raspberry Pi Kernel with IXXAT SocketCAN driver

I want to use the IXXAT USB-to-CAN v2 device with RPI3B+. The problem is in drivers and kernel. I can't make a device to work on RPI. Due to the article this setup should work. In the article, they mentioned that I need to install the SocketCAN…
1
vote
2 answers

Confirmation that the message was sent to the CAN bus using socketCAN

I would like to confirm that my message has been saved on the CAN bus with socketCAN library. The socketCAN documentation describes this possibility when using the recvmsg() function, I have problems with its implementation. The function I want to…
1
vote
1 answer

Custom plugin for qt is not loaded. How to debug?

I wrote a custom plugin for QCanBus, that simply is a copy of the socketcan plugin but has been renamed and the identifiers have been adjusted to that new name. I did that copying to first get the plugin recognised before I alter it. I changed the…
darkmattercoder
  • 325
  • 6
  • 26
1
vote
3 answers

Is ACK mandatory in CAN bus communication

I am making a CAN simulator for GPS trackers, they only record CAN data and doesn't send ACK. Is it possible to send CAN data with raspberry, using mcp2515/tja1050, without any device on bus that would trigger ACK?
1
vote
3 answers

How does candump display send, receive and timestamp

As the title says, I used the command candump can0 can1 to watch frames on the CAN bus, but I can't distinguish which frames are received and which are sent. Sometimes I need the timestamp of received frames to analyze problems. I don`t know if…
YunYanan
  • 478
  • 1
  • 5
  • 12
1
vote
1 answer

SocketCAN linux no buffer space available

I want to send a message periodically using socketCAN with this device I created a small script to achieve this which looks like this: import os import time msg = "1FF#FFFFF00000000000" os.system("sudo slcand -o -c -f -s6…
JRsz
  • 2,891
  • 4
  • 28
  • 44
1
vote
1 answer

Capturing berr-counter tx/rx from ip link show

I would like to be able to capture the berr-counter values in a shell script. I can view the values with: ip -det link show can0 which gives: 2: can0: mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/can …
1
vote
1 answer

SocketCan device stops sending messages after a specific amount of messages have been sent

I'm using a canable CAN-to-USB adapter to communicate with a CAN bus. To initialize the SocketCan device, I'm using the following command: slcand -c -o -f -s6 /dev/ttyACM0 and ifconfig slcan0 up The CAN bus is operating at 500KHz. I can transmit and…
user3103398
  • 143
  • 9
1
vote
2 answers

cangen vcan0 command returns write: Network is Down

Fairly new to this, any help/guidance would be greatly appreciated. Trying to run a virtual CAN network using can-utils, but I keep getting Network down message when I try to do a candump or cangen. Here is some of the general process... $: lsmod…
Ryan Anderson
  • 121
  • 2
  • 11
1
vote
1 answer

Boost asio async_write_some leaking?

I've been messing around with an application that uses boost::asio for both UDP and SocketCAN communication. Today, I noticed something weird - it was leaking memory! So I grabbed my trusty toolkit consisting of echo 0 $(awk '/Private/ {print "+",…
1
vote
0 answers

Dump of BAMs (Broadcast Announcement Message) with canutils

Good morning, I'm a embedded linux developer and I'm trying to dump J1939 CAN sentences on a iMX6 based board. I tried saving RAW canbus messages on a file using the command candump can0 -L > /tmp/fms_canbus and everything works fine with NON…
Giox79
  • 124
  • 11
1
vote
1 answer

Can Bus set bitrate error | RTNETLINK broken pipe

I am trying to set a can connection with one node. I am using IXXAT USB to can adapter http://www.netbiter.com/images/librariesprovider8/product-images/pc-can-interfaces/interfaces-usb-to-can-2-compact-subd.png?sfvrsn=2 and using the following…
Vishal Rawat
  • 325
  • 1
  • 3
  • 19
1
vote
0 answers

c: socketCAN connection: read() not fast enough

socketCAN connection: read() not fast enough Hello, I use the socket() connection for my CAN communication. fd = socket(PF_CAN, SOCK_RAW, CAN_RAW); I'm using 2 threads: one periodic 1ms RT thread to send data and one thread to read the incoming…