'python can sending message, receiving empty message
I want to send am message with python can over a vector interface, after that i want to receive the message but no matter what i do the received message is always empty.
NEWS: When there is a test running in the background in CANoe everything works fine. Is there a need of a configuration file?
The code is pretty simple:
import can
bus = can.Bus(interface='vector',
app_name='CANoe',
channel=[0],
receive_own_messages=True)
message = can.Message(arbitration_id=123,data=[0x11, 0x22, 0x33])
print("send msg:")
print(message)
bus.send(message, timeout=0.2)
print("received msg:")
print(bus.recv())
bus.shutdown()
output:
send msg:
Timestamp: 0.000000 ID: 0000007b X Rx DL: 3 11 22 33
received msg:
Timestamp: 1647263400.094132 ID: 0000 S Rx E DL: 0 Channel: 0
Hardware: Vector VN1630A driverversion: 10.9.12.0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
