The can package provides controller area network support for Python developers; providing common abstractions to different hardware devices, and a suite of utilities for sending and receiving messages on a can bus.
Questions tagged [python-can]
77 questions
1
vote
1 answer
Python-CAN script receiving half of the expected CAN messages
I have written a Python script utilizing the Python-CAN library which records received CAN messages at a 1 second rate for 5 minutes, before logging all the messages into a file and exiting. The computer has a CAN module which is connecting to the…

PythonIsCool
- 47
- 7
1
vote
0 answers
Python-CAN Remote Request Frames
I am using the python-can library to send and receive CAN messages and learn more about the protocol.
I currently have a system working to transmit and receive messages, and now I want to request CAN data through remote frame messages.
I populate…

PythonIsCool
- 47
- 7
1
vote
1 answer
Communication through CAN-bus interface not working
I have python code running on a linux based device which has the following OS specifications:
NAME=Buildroot
VERSION=2020.11.1
This device is connected to a PLC using a three wire interface (CAN_H,CAN_L,GND).
I have written a code that sends a…

Kian
- 11
- 5
1
vote
1 answer
Python Concurrency - CAN Bus
I'm in the beginning stages of developing a scale-able CAN based hardware test system. The test system's 2 main functions are to log all traffic on the bus AND execute test cases. The test cases will mostly be composed of receiving and transmitting…

Tim51
- 141
- 3
- 13
1
vote
1 answer
Windows-curses install on ubuntu
I am trying to install a package (python-can) by running
pip2 install python-can and I get the following errors:
Collecting windows-curses (from python-can)
ERROR: Could not find a version that satisfies the requirement windows-curses (from…

user2840470
- 919
- 1
- 11
- 23
1
vote
0 answers
Optimize BLF-reader for Python CAN performance
I have a big blf file, blf_file.blf, and an associated dbc file, dbc_file.dbc. I need to read and decode all the messages and store them in a list. For this I use the python-can library:
decoded_mess = []
db =…

StrawberryMint
- 11
- 1
- 3
1
vote
1 answer
How to send and receive CAN message using ISOTP protocol in Python-can which uses CANard library?
I want to send a CAN message which is longer than 8 bytes. I used the CAN-ISOTP protocol in SocketCAN isotpsend and isotprecv to send and receive the CAN message it worked fine. Likewise how to send and receive CAN message in python-can which uses…

annonymous
- 131
- 3
- 14
1
vote
2 answers
Python-can OSError: An address incompatible with the requested protocol was used
I'm working with CAN cable ECOM, and trying to write a python script to process the messages received from the cable. I came across the python library python-can, but I'm having trouble using it.
When I try to run the code:
import can
bus =…

Yuki
- 21
- 5
1
vote
0 answers
import says no module named 'can' but library is installed in site-packages?
First and foremost, I'm on windows.
PyCharm says No module named 'can', but I can clearly see the can module when I open Module Docs and it's listed under site-packages. I'm not sure why PyCharm is saying the can module isn't there.
Why would it…

Randy
- 11
- 1
0
votes
1 answer
No communication possible with CAN vector Device using python-can
Objectif :
Send and receive data with a VN1630A Vector device from python script.
Tools used
python-can
cantools
Details
I am currently trying to send and receive data from a python script on a CAN communication using a VN1630A device. I can see…

paulMMM
- 1
- 1
0
votes
0 answers
python cantools.decode_message() giving data that does not match my Manuel decode
I am receiving a can message over udp in the format (data_length, frame_id, data) and trying to translate it into json. I am using the cantools library to load a dbc file with cantools.database.load_file() and then translating the message with…

jack
- 1
- 1
0
votes
0 answers
Python CANopen Control effort does not update to target velocity
I am trying to control the velocity of an ATV320-motor with CANopen. I have come up with the following piece of code:
import canopen
import logging
import time
import threading
logging.basicConfig(level=logging.CRITICAL)
network =…

Irrelev4nt
- 11
- 1
0
votes
0 answers
Python-can with SLCAN only prints a few can messages, while receiving plenty
Good day,
I am using a slcan adapter to receive can messages. However it won't work properly using the python-can module. It will only receive a handful of messages and then it will hang. While it works great when sending the SLCAN commands myself…

HenkJanSnot
- 38
- 4
0
votes
0 answers
python-can in Raspberry-Pi OSError no19 No such device
I am trying to run the python-can library in my Rpi, the installed version is the 2.1 and I'm trying to run the code from the [Python can API][1]
:
import can
can_interface = 'vcan0'
bus = can.interface.Bus(can_interface,…

Humberto Adhemar
- 116
- 6
0
votes
0 answers
How to transmit data with 64 bytes of frame-size using isotp.stack?
I am transmitting data with Python-can using isotp.stack().
Successfully able to do the same for 8 bytes of frame size but not able to transmit for 64 bytes of frame.
rxid and txid are enabled for 64 bytes of frame size as tested using capl…

Farhat Jahan
- 13
- 6