Hello @Gretchev and thank you for your contribution.
I tested the two projects and they work well.
If I summurize: the first CAN node, the "simulator" (as a car simulator), is diagnosed by the second CAN node, the "application" (simulating the OBD) which simulates the On-Board Diagnostics, diagnosing the car. NUCLEO-C092RC boards were used: one used to simulate a vehicle and the second one to simulate the OBD.
This is the log obtained when sending different commends from the PC to the "application" over USART2 to request data from the vehicle (the simulator) over CAN.
Welcome to STlink PC-to-MCU command interpreter
Starting default task
Starting UART command task
Starting CAN receive task
Starting CAN transmit task
A: toggle green LED
B: toggle blue LED
C: How now brown cow?
D: Same way black bull
R: Retrieve RPM
RX: 11b 0x7E8 41 0C RPM: 1500
S: Retrieve vehicle speed
RX: 11b 0x7E8 41 0D Speed: 60 km/h
T: Retrieve coolant temperature
RX: 11b 0x7E8 41 05 Coolant: 85B0 C
r: to request the current engine RPM
s: to request the current vehicle speed
t: to request the current coolant temperature value
Other commands, like a, b, c, d are miscs and used to toggle leds etc ..
I will mark this comment as solution to give it more visibility for other users to help them to find efficiently this solution.
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.