Hi~!
I am programming to make OBD2 using CAN in ESP32-WiFi+BT module.
In fact, ESP32-IDF examples are very helpful to use.
Communication using CAN has been successful.
However, I need to send a 'remote frame' to read more than 8 bytes of continuous data, but I do not know what to do.
Can anyone give me an example of this?
Note: sending CAN TX with the RTR setting does not work.
About remote frame sending in CAN (ISO 15785-2)
-
- Posts: 1
- Joined: Fri May 17, 2019 7:30 am
Re: About remote frame sending in CAN (ISO 15785-2)
gigabps@hotmail.com wrote: Note: sending CAN TX with the RTR setting does not work.
- Could you elaborate more on the specifics of the issue you're facing
- Is there any activity on the bus when attempting to send an RTR frame?
- Is the receiving node acknowledging the RTR Frame but does not transmit a Data Frame in response?
- Is your transmit code similar to the following?
Code: Select all
//Configure RTR message
can_message_t rtr_msg;
rtr_msg.identifier = 0x7FF;
rtr_msg.data_length_code = 8;
rtr_msg.flags = CAN_MSG_FLAG_RTR;
//Load RTR message into transmit queue
can_transmit(&rtr_msg, portMAX_DELAY);
... //Assuming the corresponding message responds with a data frame
can_message_t rx_msg;
can_receive(&rx_msg, portMAX_DELAY);
You'll need to split that into two or more RTR Frames , and have the transmitting node respond with two or more Data Frames. CAN2.0 requires that the DLC of an RTR or Data Frame be <= 8. A CAN2.0 compliant node that receives a frame (RTR/DATA) with a DLC > 8 will just treat it as DLC=8 (see addendum No.1 of CAN2.0B specification).gigabps@hotmail.com wrote: However, I need to send a 'remote frame' to read more than 8 bytes of continuous data, but I do not know what to do.
Who is online
Users browsing this forum: Baidu [Spider] and 161 guests