ESP32 CAN TWAI issue, not sending data

I'm trying to make a CAN sniffer but for some reason getting nowhere. Tried several libraries to no avail.

This is what I'm doing now...followed all instructions and copied code without modification

But the sender will give the message "Sending Packet..." and then stops. Nothing goes out on pin 5 of the ESP.

Using two ESP-WROOM-32 board (dev kit) and Sn65hvd230 boards.

strange the program should loop printing the message

with ESP32 TWAI I used the ESP32-TWAI-CAN library
have you tried any examples, e.g. File>Examples>ESP32-TWAI-CAN>OBD2-querry

is there anything else connected to the CANBUS?
looking at the Waveshare CAN Board SN65HVD230 schematic it looks like the 120ohm bus terminaters are soldered in place on the PCB

it is not looping there...it stops there...

I tried the ESP32-TWAI-CAN library as well...never made it to work for the sending side...
Don't know if receiving works but first want to try to make it work local, on my desk

how have you connected the various modules
I used a cjmcu-1051 CAN transceiver connected to the ESP32 so

// ESP32 GND    cjmcu-1051 GND
// ESP32 5V     cjmcu-1051 VCC powers transceiver
// ESP32 3.3V   cjmcu-1051 VIO powers logic
// ESP32 GPIO5  cjmcu-1051 CTX
// ESP32 GPIO4  cjmcu-1051 CRX
// ESP32 GND    cjmcu-1051 S   HIGH = TRX off, LOW = TRX on

I do niot use the 051, I use the SN65HVD230...but that shouldn't make any difference in the execution of the code...I see no data comming out of pin 5

I rebuild everything on a breadboard and now it seems to be working.
the only thing that is difference is that on the breadboard I used ESP32-WROOM-32D, while in the original set-up I used and ESP-WROOM-32

No clue if that made the difference

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.