Closed superandrew213 closed 6 months ago
You board has CAN_TD and CAN_RD on other pins than tNMEA2000_esp32 constructor defaults. Set them properly before including NMEA2000_esp32.h as described on documents. E.g.,
#define ESP32_CAN_TX_PIN GPIO_NUM_34
#define ESP32_CAN_RX_PIN GPIO_NUM_35
Also NMEA2000.EnableForward(true); does not do anything, since you have not set forward stream. You would get nearly same output without handler by just setting:
void setup() {
Serial.begin(115200);
NMEA2000.SetForwardType(tNMEA2000::fwdt_Text); // Show in clear text
NMEA2000.SetForwardStream(&Serial);
NMEA2000.EnableForward(true);
NMEA2000.Open();
}
See example ActisenseListener.ino.
Thanks @ttlappalainen. Made those changes. Still nothing.
Tried ActisenseListener
with pins set properly but still nothing.
Those defines were as example. On your board setting should be:
#define ESP32_CAN_TX_PIN GPIO_NUM_25
#define ESP32_CAN_RX_PIN GPIO_NUM_26
Yes, those are the correct pins. Thanks @ttlappalainen! It's working now.
I'm using this board https://www.skpang.co.uk/collections/can-bus-boards/products/esp32-can-bus-board.
I just want to log the messages but
HandleNMEA2000Msg
is not getting called.My NMEA2000 network is setup correctly and I can log messages with CanKing.
There are no errors. Am I missing something?