SocketCAN is a Linux socket based implementation for Controller Area Network (CAN) protocol.
Questions tagged [socketcan]
155 questions
2
votes
0 answers
Python permission error creating socket in Ubuntu
I am using socketCAN to interface to a CAN bus in Ubuntu 16.04. The interface works fine on my machine. However, when I kick off our CI, it executes on a remote agent (also Ubuntu 16.04) and I am receiving a permission error when the socket is…

sje
- 117
- 1
- 9
2
votes
1 answer
How to drive advantech CAN board in python?
I am using advantech's can board, model AMO-2203E.
I successfully installed the driver(https://support.advantech.com/support/DownloadSRDetail_New.aspx?SR_ID=GF-GRSC&Doc_Source=Download) on ubuntu14.04, kernel 3.13 , and successfully sent and…

hao li
- 367
- 2
- 13
2
votes
1 answer
socketCAN vs manufacturer's drivers
I am slightly confused as to what is the difference between socketCAN and manufacturer's drivers for CAN.
I have a mPCIE CAN card from Kvaser in my Ubuntu machine. It comes with its own drivers that are apparently based on socketCAN. But socketCAN…

Shibalicious
- 288
- 2
- 4
- 14
2
votes
2 answers
Candump showing 29 bit ID's instead of 11 bit - can't replay codes
Trying to replay CAN codes for 2018 Dodge Promaster using can-utils. From what I've read they use an 11 bit CAN ID. However when I use:
candump -L can0 > can.log
The log shows 29 bit ID's
(1519238827.107818) can0…

physiii
- 209
- 3
- 12
2
votes
2 answers
SocketCAN select() and write() don't block
I'm testing the CAN interface on an embedded device (SOC / ARM core / Linux) using SocketCAN, and I want to send data as fast as possible for testing, using efficient code.
I can open the CAN device ("can0") as a BSD socket, and send frames with…

Jeremy
- 1,083
- 3
- 13
- 25
2
votes
1 answer
What is the `flags` field for in canfd_frame in SocketCAN?
A non-FD ("legacy") CAN frame has the following format in SocketCAN:
struct can_frame {
canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
__u8 can_dlc; /* frame payload length in byte (0 .. 8) */
__u8 __pad; /*…

Adam Selker
- 146
- 2
- 10
2
votes
1 answer
How does socketcan handle arbitration?
I pretty much understand how the CAN protocol works -- when two nodes attempt to use the network at the same time, the lower id can frame gets priority and the other node detects this and halts.
This seems to get abstracted away when using socketcan…

can-i-bus
- 43
- 3
2
votes
1 answer
CAN j1939 support in Linux Kernel 4.x
Any one have ported CAN J1939 stack on the kernel 4.x series?
We had ported it into 3.10 kernel based on the link "http://elinux.org/J1939".
Now I want to port it into the kernel version 4.1.15. I understand there was some changes happens in the 4.x…

shabeerb
- 33
- 1
- 3
2
votes
0 answers
QT CAN BUS, SocketCAN cannot read CAN frames
I have troubles reading CAN frames using readFrame() method in QT.
My code for initialization:
#include
#include
#include
CANSend::CANSend(QString interface){
CANdevice =…

lakotamm
- 21
- 1
- 3
2
votes
1 answer
Socketcan register listener isn't called
I am using Meteor with 'socketcan' npm package on a RaspberryPi. To define my CAN network, I am using a kayak file 'canDefinition.kcd'. This is what my startup javascript file in the server folder looks like:
// This code is running OUTSIDE of…

invscien
- 25
- 7
2
votes
3 answers
Socketcan+ Express.js +Node.js get / send Can-Bus messages
I installed socketcan with
npm install socketcan
link without any errors on my Raspberry Pi 2 B. I can use the Pican adapter with candump/cansend on the terminal. So that works fine.
But I don't understand how to use Socketcan. I want to use…

AnnaBanana
- 131
- 2
- 6
1
vote
1 answer
Is it possible to have two tx queues in Linux socketcan with two different priorities?
I am playing around with can on Linux and I can send and receive frames using cansend:
https://github.com/linux-can/can-utils/blob/master/cansend.c
I was wondering if there is a mechanism to prioritize certain Messages on TX using socketcan?
For…

maxbit89
- 748
- 1
- 11
- 31
1
vote
0 answers
Multiple cycle times for can frames on a bcm SocketCan possible?
I would like to send and reveive CAN frames via a BCM SocketCAN in Linux with C/C++. Some frames may be 11bit others are 29bit. Each frame can have an individual cycle time and the data will change each frame.
I've read the documentation but I cant…

Andy Höfler
- 31
- 6
1
vote
1 answer
Socketcan Driver implementation
I am new to creating a driver implementing.
My Application is using socketcan interface and apparently socketcan is not supported by the SOC.
I am planning to write my own driver. The issue I know how simple module for kernel I am not pretty sure…

Kripthe
- 11
- 1
1
vote
0 answers
How to compile custom Linux Kernel on/for AWS EC2 instance
We have this AARCH64 instance that wasn't compiled with SocketCAN module.
CONFIG_CAN_VCAN=m
What is the best way to fix this ?
If it is to rebuild the kernel, where can we find the complete process for downloading the right sources, etc.
Thx

Tuthmosis
- 1,131
- 3
- 15
- 27