goldbrick
Posts: 916
Joined: Tue Aug 01, 2017 3:33 pm
Delivery Date: 01 Aug 2017
Leaf Number: 311806
Location: Boulder, CO

Re: LEAF CANbus decoding. (Open discussion)

Sat Jun 27, 2020 9:00 pm

Thanks for sharing that. I have to say, as a firmware professional that I'm very impressed with the tools available today for this sort of thing. I started with BASIC in the 1960's when I was just a kid and my uncle let me play on the local college's PDP-8. My times have changed! :D

User avatar
Dala
Forum Supporter
Posts: 235
Joined: Sun Oct 28, 2018 11:24 am
Delivery Date: 01 Jan 2015
Leaf Number: 316851
Location: Finland
Contact: Website

Re: LEAF CANbus decoding. (Open discussion)

Tue Jun 30, 2020 11:45 pm

goldbrick wrote:
Sat Jun 27, 2020 9:00 pm
Thanks for sharing that. I have to say, as a firmware professional that I'm very impressed with the tools available today for this sort of thing. I started with BASIC in the 1960's when I was just a kid and my uncle let me play on the local college's PDP-8. My times have changed! :D
You should see the paid tools then! They are even better, but my budget don't allow for these yet..

Along with some friends, we completed a quick sideproject. We did a nag-screen delete, with a permanent box mounted behind the OBD2 port. This box sends CAN messages onto the AV-CAN on every startup, so you don't have to see the nag-screen. Here it is in action:
https://www.youtube.com/watch?v=Rptz6ULKjXU

If anyone wants to replicate this at home, send these commands with 100ms inbetween
To get it to Status:

0x681 0x04 30 40 0d b1 ff ff ff

0x681 0x04 40 40 0d b1 ff ff ff

0x681 0x04 50 40 0d 31 ff ff ff

To get it to FM:

0x681 0x04 20 40 0d a3 ff ff ff

0x681 0x04 30 40 0d a3 ff ff ff

0x681 0x04 40 40 0d 23 ff ff ff

Maybe it would be worthwile to create a plug'n'play solution for the OBD2 port? Something you just set and forget there?

virol
Posts: 26
Joined: Sun Sep 23, 2018 9:38 am
Delivery Date: 17 Sep 2018
Leaf Number: 2018
Location: Belgium

Re: LEAF CANbus decoding. (Open discussion)

Wed Jul 01, 2020 1:14 am

Dala wrote:
Tue Jun 30, 2020 11:45 pm
goldbrick wrote:
Sat Jun 27, 2020 9:00 pm
Thanks for sharing that. I have to say, as a firmware professional that I'm very impressed with the tools available today for this sort of thing. I started with BASIC in the 1960's when I was just a kid and my uncle let me play on the local college's PDP-8. My times have changed! :D
You should see the paid tools then! They are even better, but my budget don't allow for these yet..

Along with some friends, we completed a quick sideproject. We did a nag-screen delete, with a permanent box mounted behind the OBD2 port. This box sends CAN messages onto the AV-CAN on every startup, so you don't have to see the nag-screen. Here it is in action:
https://www.youtube.com/watch?v=Rptz6ULKjXU

If anyone wants to replicate this at home, send these commands with 100ms inbetween
To get it to Status:

0x681 0x04 30 40 0d b1 ff ff ff

0x681 0x04 40 40 0d b1 ff ff ff

0x681 0x04 50 40 0d 31 ff ff ff

To get it to FM:

0x681 0x04 20 40 0d a3 ff ff ff

0x681 0x04 30 40 0d a3 ff ff ff

0x681 0x04 40 40 0d 23 ff ff ff

Maybe it would be worthwile to create a plug'n'play solution for the OBD2 port? Something you just set and forget there?
can you share more info about this hardware"box" and also tell us where exactly you connect it after the odb2

thx

Daklein
Posts: 79
Joined: Fri Sep 06, 2019 7:58 pm
Delivery Date: 02 Sep 2019
Location: Hartland, MI

Re: LEAF CANbus decoding. (Open discussion)

Wed Jul 01, 2020 4:14 am

From the reaction on the video, that's a _really_ good box behind the OBD port! Nice job, congrats!
2014 Leaf S Plus :o (12/2019 62kWh swap!)

User avatar
Dala
Forum Supporter
Posts: 235
Joined: Sun Oct 28, 2018 11:24 am
Delivery Date: 01 Jan 2015
Leaf Number: 316851
Location: Finland
Contact: Website

Re: LEAF CANbus decoding. (Open discussion)

Wed Jul 01, 2020 5:40 am

Thanks :)

The hardware is not important, you can use anything for this project. We just used what we happened to have lying around the workshop.
We used a ESP32-WROOM Devkit, coupled with a MCP2551-IP CAN transceiver. Oh, and a 12V->5V DC/DC converter. But you could use any microcontroller for this, as long as you make it possible to send CAN messages with it. Maybe an arduino, raspberry, devbords, etc.

Implementation: Powered with OBD2 Pin8 (switched 12V), then connected to AV-CAN (OBD2 pin 11 = H, pin 3 = L). Start sending the messages roughly 9 seconds after the car is started. You can get it to go straight to FM, Nav or Status this way.

If I were to design a proper one, I would make a really small thing that would fit inside an OBD2 plug. That way it would be easy to remove aswell.

prensel
Posts: 2
Joined: Wed Jul 01, 2020 3:07 pm
Delivery Date: 01 Jul 2020

Re: LEAF CANbus decoding. (Open discussion)

Thu Jul 02, 2020 2:56 pm

I'm currently working on using the LBC and batteries without any other components of the Leaf.

I have noticed that the CANbus datagram 0x5C0 contains a DTC errorcode. This is however is a code within the range of 000-255 and doesnt 'match' the DTC or P-codes as mentioned in the EVB manual or used in the Leaf Spy app.

Can someone enlight me on how these codes relate to each other ?
Is it some sort of hash or are the codes from 0x5C0 just ordered messages from a prefined list of P-codes ?
For example the errorcode 0x03 in 0x5C0 appears as DTC U1000 in the Leaf Spy app.

Drc38
Posts: 1
Joined: Sun Jul 05, 2020 12:28 pm
Delivery Date: 05 Jul 2020
Leaf Number: 202746

Re: LEAF CANbus decoding. (Open discussion)

Sun Jul 05, 2020 1:49 pm

I've just bought a 30kWh Nismo Leaf JDM. A couple of features would be good to tweak via CAN query of the eeprom content extract/modify/reload. Eg turn off the dash internal reverse buzzer (as opposed to external VPS) and reduce the power steering assist level. Appreciate there are other ways to hack these.

Are there tools similar to those for BMW (BMWTools32/NCSExpert) for Nissan to do this other than Consult plus?

The Nismo has different coding for the VCM so it would be interesting to compare to stock one too.

mux
Posts: 299
Joined: Sat Jan 13, 2018 3:52 am
Delivery Date: 13 Oct 2011
Leaf Number: 6177

Re: LEAF CANbus decoding. (Open discussion)

Sun Jul 05, 2020 10:33 pm

DTCs are not communicated via 'normal' CAN messages, they are generated on OBDII PIDs (https://en.wikipedia.org/wiki/OBD-II_PIDs). You cannot read a DTC via the general EV-CAN datastream, just like you can't read any other service parameters on plain CAN data.

goldbrick
Posts: 916
Joined: Tue Aug 01, 2017 3:33 pm
Delivery Date: 01 Aug 2017
Leaf Number: 311806
Location: Boulder, CO

Re: LEAF CANbus decoding. (Open discussion)

Mon Jul 06, 2020 9:32 am

mux wrote:
Sun Jul 05, 2020 10:33 pm
you can't read any other service parameters on plain CAN data.
Is registering a new TPMS sensor included in the things not possible using the CAN bus? So this requires CONSULT or equivalent?

By new, I mean never installed in the car. I know LSP will allow rotations, etc and I'm not talking about 'cloning' existing TPMS sensors, even though I think that is the route I should have taken...

lorenfb
Posts: 2464
Joined: Tue Dec 17, 2013 10:53 pm
Delivery Date: 22 Nov 2013
Leaf Number: 416635
Location: SoCal

Re: LEAF CANbus decoding. (Open discussion)

Mon Jul 06, 2020 5:27 pm

goldbrick wrote:
Mon Jul 06, 2020 9:32 am
Is registering a new TPMS sensor included in the things not possible using the CAN bus? So this requires CONSULT or equivalent?

By new, I mean never installed in the car. I know LSP will allow rotations, etc and I'm not talking about 'cloning' existing TPMS sensors, even though I think that is the route I should have taken...
Do a MNL search referencing use of LeafSpy to re-learn newly installed TPMS sensors. Typically most TPMS ECUs require that
the ECU be placed in its learn mode or the sensor I.D. be loaded with its location loaded into the ECU's flash memory.
Accessing the TPMS ECU, as for any Leaf ECU, is via one of the two Leaf CAN buses, e.g. pins 6 & 14 of the OBDII connector.
Some on MNL have replaced their TPMS sensors without the use of the Nissan Consult tool. Some later vehicles don't require
any accessing of the TPMS ECU, i.e. the ECU just re-learns the newly installed sensor.
#1 Leaf SL MY 9/13: 76K miles, 47 Ahrs, 5.0 miles/kWh (average), Hx=70, SOH=73, L2 - 100% > 1000, temp < 95F, (DOD) > 20 Ahrs
#2 Leaf SL MY 12/18: 10.3K miles, SOH 109Ahrs/115Ahrs, 5.2 miles/kWh (average), DOD > 20%, temp < 105F

Return to “LEAF CANBus”