Questions tagged [python-can]

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.

References:

77 questions
0
votes
1 answer

How to properly read J1939 messages from .asc file with cantools?

I'm trying to create a CAN logs converter from .asc files to .csv files (in human readable form). I'm somewhat successful. My code works fine with almost any database but j1939.dbc. The thing is, that if I print out the messages read from the dbc…
0
votes
0 answers

python script to automate transferring data into CAN messages for CANblue V2 from IXAAT using python-can module

I have a question like ... we have some data files with messages for microcontroller . We use Blue CAN v2 [IXXAT]…
0
votes
1 answer

Why is the frequency of this Python-CAN script is shifted?

In the script below, I am sending the data [0x01, 0x0a] to the address 0x0050000b and then search for an answer "01 0a" at the address 0x0790000b. The mesage needs to be sent every 100ms. The problem is that for some reason the message I am sending…
0
votes
1 answer

linux CAN protocol maximum rate

I am writing a program that has to handle 20000 CAN messages per second. When writing the code with python under linux using socketcan, it seems that I start to lose messages when msg_per_second is over 200. What could be the limiting factor and how…
0
votes
1 answer

CAN socket - handle not ACK

I'm trying to test getting the ACK bit from a CAN network. My system has an RPI 4, PICAN DUO and transceivers to other CAN nodes. When the RPI and the other node are both connected, all is well and I'm getting 2 way communication. When the RPI is by…
0
votes
1 answer

Simple consumer producer example for sending and receiving CAN messages does not receive messages

I was just trying to use a virtual can device vcan0 under linux and the python-can module to get acquainted with programming and debugging over the CAN bus. I devised a simple looking program with two threads, where one thread should produce can…
Aleph0
  • 5,816
  • 4
  • 29
  • 80
0
votes
1 answer

Live waveform with python-can

I'm trying to plot can-data using the python-can and matplotlib library. I have a basic example on how to plot live data with matplotlib: import numpy as np import matplotlib.pyplot as plt plt.axis([0, 10, 0, 1]) for i in range(10): y =…
Julian
  • 915
  • 8
  • 24
0
votes
1 answer

Python-can - can.Logger Listener Issue

The can.Logger Listener in the Python-can package does not seem to be logging data to a file. I know there is CAN bus data because the can.Printer() Listener is functioning, it is printing the CAN traffic to the output terminal. The can.Logger…
Tim51
  • 141
  • 3
  • 13
0
votes
1 answer

Python-can Logging File Time

I just got started with Python-can and I need to edit the reporting format of the built in Logging feature. Below is a snippet of the code that I am referring too. logger = can.Logger('log3.asc') This is the resulting header from the log…
Tim51
  • 141
  • 3
  • 13
0
votes
0 answers

Updating library in Raspberry

i need your help. I got Raspberry PI 3, I'm programming in Python to get CAN messages via PiCAN duo. Program is working perfectly fine, but to get reasonable informations from the source i need to send every 100mS messages to the source. I used…
0
votes
0 answers

How to send and receive a canfd isotp message using PYTHON-CAN through VECTOR DEVICE VN5610A?

I am getting the following error when executing the below code: File "D:/evs_framework/tests/Integration/testcases/can_vec.py", line 7, in receive_own_messages=True) File "C:\LegacyApp\Python36\lib\site-packages\can\interface.py",…
0
votes
0 answers

Converting Vector *.blf data to normal readable data for spreadsheet use with python-can or cantools

I have a few files that were created by exporting CAN-Bus data in CANalyzer or Vector. The problem is the mainly interesting data in the file are encoded and look like this: "40c1 bf1b 490d 34b0 46c5 6ed0 a853 d856". Is there a way to "convert" this…
Julian Jantz
  • 1
  • 1
  • 1
0
votes
1 answer

How to convert CAN message TimeStamp in python Time to System time?

import time import can def ReceiveMsg(): bus = can.interface.Bus(channel= '1', bustype='vector',app_name = 'python-can') while True: a_listener = can.Listener() Message = bus.recv() …
0
votes
1 answer

Sending messages with different ID on a pcan can bus, using python can

My program sends almost 50 messages, all with different ID's, on a pcan can-bus. And then loops again continuously, starting with a new data for 1st ID. I have been able to initialize and send the single ID message, but I'm not able to send any…
Inc0gnito
  • 21
  • 6
0
votes
0 answers

Why Python-can is not working with Py2exe?

I'm working on a project to read data from CAN bus ( Controller Area Network ). It's working well when I use the terminal, but when I try to create an application with pyinstaller it's not working anymore. I am using the Python-Can library, and my…
Romain
  • 1
  • 1