Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send/receive after starting alone at a bus #8

Open
wellenvogel opened this issue Mar 17, 2022 · 2 comments
Open

Unable to send/receive after starting alone at a bus #8

wellenvogel opened this issue Mar 17, 2022 · 2 comments

Comments

@wellenvogel
Copy link

In my project I use this lib and the NMEA2000 lib for a converter NMEA0183/NMEA2000 on a nodemcu32 or AtomCAN or other ESP32 based boards.
Whenever I start up with some other devices on the bus being already active everything runs fine.
But when starting as the only bus device (and connecting other devices later on) the library will not send or receive any PGNS. Looking at the bus the device is still continously retransmitting.
I tried a couple of changes as proposed e.g. at https://www.esp32.com/viewtopic.php?t=5010 - but still not very successful. At least when powering off the other device and later on powering on again the same issue occured.
So finally I decided to go for a re-initialization of the CAN driver whenever the send queue remains full for 2 seconds (or nothing is send/received within 60s).
Not really a great solution - but seems to solve the problem.
Do you have any suggestions/ideas how to handle this (maybe more inline with the CAN specs)?
My patched Version is at https://github.com/wellenvogel/esp32-nmea2000/tree/master/lib/nmea2000esp32.

@wellenvogel wellenvogel changed the title Unable to send/receive after starting alone at a BUS Unable to send/receive after starting alone at a bus Mar 17, 2022
@ttlappalainen
Copy link
Owner

I did the test, but could not repeat your problem. I started ESP32 alone on the bus and let it run about 3 min. My device status shows then NMEA2000 error. Then I connected other devices and ESP32 started to send data to the bus normally.

I checked also that my Github has same version I have.

@wellenvogel
Copy link
Author

Ok, thanks for testing again.
We have this issues in 2 set ups.
Both consisting of only 2 esp32 on the bus. Normally the second one being switched on works normal whereas the first one runs into this problem.
Maybe we have to cross check if the error does not occur if we use a different device as the second one coming up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants