SocketCAN is a Linux socket based implementation for Controller Area Network (CAN) protocol.
Questions tagged [socketcan]
155 questions
0
votes
0 answers
C++ Read text from Linux terminal and compare with a string
I'm wrote some code which uses socketcan (to make a candump). With this code I initialize socketcan. After it is initialized I create a candump in the terminal. Those values I read into a variable. Now I would like to compare this variable with a…

MertensToon
- 61
- 7
0
votes
1 answer
Unclear as to why first digit of hex value is appearing as a +8 version of itself. SocketCAN
Task
I wanted to write my own smaller version of candump. The aim being that it's similar in nature but with the only feature being that I would like to show only the incoming message from one CAN ID.
Code
#include
#include…

Shmink
- 3
- 3
0
votes
0 answers
Socket Write() fails in custom class but not in main
I am working on a simple project using the SocketCAN library to send some messages over CAN. But now I am stuck with a problem that I can not explain by myself... When I am using the socket command write within a custom class it fails with invalid…

royalTS
- 603
- 4
- 22
0
votes
1 answer
How can I configure SocketCAN to a specific interface?
I'm using a Beaglebone Black with two CAN interfaces as SocketCAN. How can I link i.e the interface can0 to my hardware DCAN0? I need to use both sockets parallel but didn't find to configure the interfaces.

Alex Rabenstein
- 1
- 1
0
votes
0 answers
How to create a virtual CAN network in SocketCAN in Ubuntu
I am planning to create a virtual CAN network in Ubuntu using SocketCAN for my project. So far, I can create multiple can interface using the ip link add dev can1 type vcan command. However, I cannot get them to communicate with each other. Any help…

Verma
- 13
- 1
- 1
- 3
0
votes
0 answers
Show live data from can bus on webpage with visualization
I want to use a linux device like a BananaPi with a socketcan-compatible can-controller to connect to a automotive can-bus and show its data in realtime on a webpage, which should be hosted on the Pi.
The data should be listed as hex-values and…

misterx
- 1
0
votes
1 answer
Tiny-CAN I-XL socketCAN extended format
My Problem is the following. I am using the Tiny-CAN I-XL CAN-USB adapter and socketCAN on Linux.
I configure the CAN adapter by doing:
sudo slcan_attach /dev/ttyUSB0 -w
sudo ip link set can0 type can bitrate 100000 restart-ms 500
sudo ifconfig…

Bant
- 53
- 1
- 7
0
votes
0 answers
CAN bus turns to ERROR PASSIVE state when loopback is turned off
I have connected a PiCAN2 board with raspberry pi running latest Jessie. When I try to send some CAN messages to my PC ( PC is connected via a USB to DB9 CAN interface to the PiCAN2 board) through this PiCAN2 using the can-utils, it runs into…

nj_bubbles
- 78
- 12
0
votes
0 answers
vcan0 causing ip conflict in ubuntu 16.10
I've just created a ubuntu 16.10 machine and tried to create a vcan network:
sudo ip link add dev vcan0 type vcan
As soon as I enter this though I lose my internet connection.
ping www.google.com
Never returns. I'm not even bringing the vcan0…

jbholtz
- 125
- 2
- 10
0
votes
2 answers
Cross-compiling a CAN project using CMAKE and an arm toolchain, but having issues finding AF_CAN PF_CAN
I am cross-compiling using CMAKE for an embedded arm device, and having some issues with it defining PF_CAN and AF_CAN. I have been advised to use
sys/socket.h
but it doesn't contain the defines and can't really tell if it's pointing to it…

wegunterjr
- 141
- 2
- 9
0
votes
2 answers
Linux 2.6 on imx: Can't log sent CAN frames using candump
I have a custom build linux 2.6 running on a imx CPU. CAN communication with external nodes works like a charm, but the frames that I send to the nodes from my app is not printed when using "candump can0" in the terminal (when I run the same app on…

Eric G
- 1
- 4
0
votes
1 answer
How to use multiple ioloop in tornado and share data between the ioloop(s)?
I have a Beaglebone Black connect to a CAN bus devices: Battery.
A tornado web running on Beaglebone Black as GUI.
CAN bus reading loop keep reading data from CAN bus to update the status of Battery instance
But how can I make the two IOLOOP work…

Zhang LongQI
- 494
- 1
- 11
- 25
0
votes
1 answer
CAN-utils and socket can
Am running Ubuntu 15.0 and trying desperately to get can-utils to run with all kinds of (USB) devices but with no luck at all.
When setting up slcan and running candump or cansniffer i would expect at least something but nope, no incoming data at…

Deko
- 1,028
- 2
- 15
- 24
0
votes
1 answer
SocketCAN in node.js
I use ARM board with embedded Linux on it, but it is very limited. Somehow I managed to install node.js and npm. The idea is to send data via CAN bus on button click event from the web page. I have found only one module called "socketcan", but I…

PaulPonomarev
- 355
- 1
- 4
- 20
0
votes
1 answer
SocketCan Can ID Prioritization
I am new to SocketCan. I am using virtual can and I want to know that if SocketCAN does prioritization based of CAN ID's. My question is, since I am using virtual can, I am sending the data and then I receive the sent data immediately. I will try to…

neavyseal
- 53
- 1
- 6