can-bus

How to program a simple CANopen layer

可紊 提交于 2019-11-28 23:26:01
问题 We have a robot project where the motor controllers use CANopen for communication. I need to communicate with these motor controllers using a master microcontroller. The problem is that I need to develop a CANopen layer in this microcontroller, but I only know how to send and receive at the low level (CAN). I don't know much about the CANopen (PDO, SDO, Heartbeat, object dictionary, etc.). I tried to read the CiA specifications, but it was very complicated. I would appreciate it if someone

How to create virtual CAN port on linux? (C++)

跟風遠走 提交于 2019-11-28 20:35:11
问题 I want to create program that would emulate CAN port for testing purposes for another big application. Program should send previously recorded data through this virtual CAN. Anyone has any experience with such thing? I'm thinking to establish virtual COM, and send through it data packed in CAN Frames. Could it work? And how could I establish virtual COM on linux? Found this thread Virtual Serial Port for Linux but sadly I don't get how could it be implemented into source code of program

Flow control message while receiving CAN message with ELM327

老子叫甜甜 提交于 2019-11-28 06:36:25
问题 I am trying to make a software, which runs under Windows and communicates with an ELM327 device. I created the first version and I went in my SMART ForTwo (SMART 451) vehicle and I managed to connect with the Instrument Cluster (Transmit CAN ID is 782, Receive CAN ID is 783). However I have a huge problem with Flow Control. Here is the log: TX: ATI RX: ELM327 v1.5a TX: ATE0 RX: ATE0 OK TX: ATSP6 RX: OK TX: ATH1 RX: OK TX: ATL1 RX: OK TX: ATCFC1 RX: OK TX: ATFCSM0 RX: OK TX: ATAL RX: OK TX:

Transmitting data over ISO-TP (transport protocol) in CANoe using CAPL

南笙酒味 提交于 2019-11-28 02:01:12
问题 Using CAPL with CANoe to transmit big amount of data via ISO-TP on CAN. Is there a routine, that provides the handling of data segmentation embedded in CAPL or do I need to write my own interpretation? 回答1: Take a look at the OSEK_TP CANoe demo. It shows how to transmit and receive data over ISO-TP ( Transport Protocol, ISO 15765-2 ). See the nodeA.can file and the OSEL_TP API reference for implementation details. Here is minimal example: Create and configure a connection: long handle; handle