-
Notifications
You must be signed in to change notification settings - Fork 247
Leaf CAN2 error #1092
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
Comments
Hi, I owned a Leaf from 2013 a couple of days now. Of course I throwed a OVMS into it. The Leaf behaves like a 2012 one, it need the 12V wake up and so on. I connected the CAN from the TCU plug to CAN 1 (EV CAN) and like you CAN2 the CarCAN through the OBD Jack (PIN 6/14) and I have the same problem. I posted in the Nissan Leaf forum, because I dont have time to investigate whats different on my Leaf than others, because I dont heared anything problematic with the OVMS and the Leaf. https://mynissanleaf.com/threads/tcu-replacement-with-ovms-using-its-case.37084/#post-655916 You are the first one with the exact same problem. I hope the Leaf integration dev reads this and have a solution for us. Cheers |
I guess people don't notice since it doesn't use it for anything else than reading VIN and charge counts. But I'm using only the OBDII port, no wiring to original TCU. I've actually completely disconnected it since it was interfering with remote AC. Strangely everything works with OBDLink LX (ELM based BT-adapter) using leafspy. So something is going on with OVMS hardware or firmware. |
Also would be nice to understand the error flags. Went through source code and seems like it's coming from a framework/driver/library? Couldn't find any info or docs about it. |
Yes its coming from the CAN component, the error rises on different situations. I wrote the integration for the Zoe Ph2, on this everything must be polled, because OBD Port is silent (Can Gateway). I get the error if the CAN interface is down and I want to poll. The VIN is not interested by me, but I have no ranges and the SOC from the battery is missing, I switched to manual GID entry, to have some percentage, but because battery is gettinger weaker, I need to set the value lower time to time, so I can reach 100% charge level display by OVMS. |
The error flags are a combination of the status bits of the CAN hardware, in case of can2 that's the MCP2515. You'll find details on the flags in the MCP2515 documentation. You can find some example discussions on error flags in the developer mailing list archive, e.g. this post by Mark: http://lists.openvehicles.com/pipermail/ovmsdev/2021-June/015347.html |
Thanks. Seems like exact errors happen on leaf as shown in that mailing list. Did that error ever get resolved? |
Here is can2 status. Same error flag comes back even when stopping can2 and starting manually.
|
Seems like the buffer 0 gets filled with a flood of messages and something happens with buffer 1 and messages don't get through? |
Which model year leaf is it? I think older models without SOC display do not send SOC info on EVCan. There is a SOC xnl.v.b.soc.nominal from BMS, but left unused because of its inaccuracy (?) Instrument SOC afaik is supported on AZE0 and up leafs |
While charging, getting error:
|
Hi, my Leaf got first license plate in Germany mid 2013, but this is definitively a Gen1 (ZE0? Or AZE0? Cant tell the difference) because it has the bar in the trunk which houses the charger. In Dashboard I have only bars no percent value. Nominal SOC is the real soc of battery I think, so is never getting 100% or 0% and I drive the Leaf unti BMS stopped discharging for testing. I get these CAN errors on CAN2 as well from time to time, have no VIN and locking/unlock is not possible (because it needs to send to CAN2 or its not working with this Gen). I just scrolled through the code, some data from CAN2 is working, like odometer, throttle, soh, footbrake and gear for example. No range no time remaining and the current is negative If I charge it, so the App never shows the kW while charging. |
Seems like Can2 errors occur when polling, aka transmitting data. Time remaining doesn't show even when adding manual battery capacity in settings. I've fixed quite few issues in my repo: https://github.com/developerfromjokela/Open-Vehicle-Monitoring-System-3/. I can share a compiled firmware if you want for test |
Yes I read the paper from dexter with the MC2515 problems, but I I understood correctly only a few messages are lost, which is not a big problem, because of high refresh rates of most messages. Transmit seems to fail every time, because I get no VIN and the uptime is a few days. The soc from dashboard stays at 0, I dont add manual battery capacity in settings. Here is the full metrics list, if it will help. |
Hi developerfromjokela, thanks for your reverse engineering work on the old Leaf TCUs, really nice! I had the TCU still laying around and if we have still 3G network here in Germany, I would test it. So I was very busy with the Zoe Ph2 Integration, now I looked closer to the Leaf one. I flashed the latest master from this repo and nothing changed. The errors from CAN2 interface in this scope is negligible, polls are getting through and response is coming in. I understand that old leafs has no SOC on Instrument, but somewhere the "User SOC" must be. I dont know the original Carwings App, but if the Leaf for example is fully charged, I think it says 100% or? Fully charged SoC nominal says 93%, this is also not very useful. Range from instrument is filled, but not used in the OVMS metric, to show on app. Because of all these missing or wrong important metrics, using OVMS with this is a bit annoying. So first thing is to gather informations, I found some service manuals which is good for hardware issues. OE Software seems like Consult III is the key here, but it requires a special interface which I dont have. My cheap Renault VCI doesnt seem to be recognized. There are some DDT files but only for newer models I think. The DBC files from dalathegrate is somewhat useful, I need to check against dumps. |
ZE0 2012 I did some modifications to OVMS code to get for example charging info etc working. Have a look at my fork: https://github.com/developerfromjokela/Open-Vehicle-Monitoring-System-3/. It's not up-to-date but there is some modifications made to leaf, ie. detecting AC state, charging plug status, etc. that are broken on master for ZE0 vehicles. Hope it helps! |
From the stock TCU I also learned one thing, to query latest battery status, aka. "Wake up", you need to pull EV activation signal to VCM. I'm not sure if TCU issues a special command on canbus to not start charging the vehicle but only refresh latest data. Also for ZE0 vehicles I cleared a little bit the activation part, using proper canbus command and pulling on EV activation signal. |
Thanks for your answer, if you have fixes why dont do a PR? Sync your fork to latest master and check against incompatibilities and then Go :-) I made a small change on the Leaf code to get range calcuation at least working. Without that it was nearly useless. I think the origin developer of the integration has no old Leaf or it may have dependencies on firmware versions of various ECUs? In my fork I added a simple trip calculation too, I store odometer value in a temporary var and subtract it from actial odo. I dont see any trip distance metric filled, is this probably unwanted? |
Hi.
I noticed on my 2011/2012 LEAF, that it doesn't get VIN and charging count from CAN2. Tried investigating logs, shows errors for can2:
These errors are present when OVMS is polling from CAN, when car is on or it is charging. And data that's supposed to come from CAN2 is not present. Using LeafSpy the data is readable.
How could I try to resolve the issue? Seems like there is something wrong in CAN2 with OVMS. As a control test, Leafspy works fine, no problems with it. Same OBD port, different results.
Version is latest compiled from master. Same error logs are present in #975
For anyone who wants to check if this issue is present on your OVMS, check if these metrics are present or not: VIN, xnl.v.c.count.qc, xnl.v.c.count.l0l1l2
The text was updated successfully, but these errors were encountered: