Activating a sleeping Gen 1 Leaf
Quick update, I contorted myself into the driver's foot well of my right hand drive Japanese domestic manufacture 2012 gen 1 Leaf and unplugged the TCU. I can confirm that connecting pin 1 (battery +ve) to pin 11 (EV System Activation Request) causes a beep from the front of the car and a few relay clicks. I didn't try to activate climate control to confirm that it works, I'll try that later this week and if it does, hook it up to the OVMS. Splice into the loom in the cramped conditions under the dashboard won't be fun. I wouldn't be totally surprised if the TCU does the charge timer wakeup, so preserving the existing circuit is a good idea. http://www.mynissanleaf.com/viewtopic.php?p=438109#p438109 says the Gen 2 Leaf doesn't need this circuit, and the same source describes CAN message to do the wakeup. If anyone wants to test that I can add that message to see if it works. Has anyone seen a message on the EV CAN Bus that would distinguish a Gen 1 from a Gen 2?
The Gen2 does wake up based on a CAN message. I have captures that show that message being the very first thing over the wire and then the car wakes up and a ton of messages begin to flow. But, I haven't tried directly injecting that message to see if I can wake the car up via the message. It is, however, supposed to work that way. I'll give it a try when I get a chance. I actually have both a 2012 and 2013 Leaf so I can do tests for differences. I'll get a capture from both and compare to see if there is a good way to distinguish the two over CAN. The CAN data decoded on mynissanleaf shows things that only exist in one or the other so it should be very possible to figure out which one you're in. On Wed, Mar 9, 2016 at 4:35 AM, Tom Parker <tom@carrott.org> wrote:
Quick update,
I contorted myself into the driver's foot well of my right hand drive Japanese domestic manufacture 2012 gen 1 Leaf and unplugged the TCU. I can confirm that connecting pin 1 (battery +ve) to pin 11 (EV System Activation Request) causes a beep from the front of the car and a few relay clicks. I didn't try to activate climate control to confirm that it works, I'll try that later this week and if it does, hook it up to the OVMS. Splice into the loom in the cramped conditions under the dashboard won't be fun. I wouldn't be totally surprised if the TCU does the charge timer wakeup, so preserving the existing circuit is a good idea.
http://www.mynissanleaf.com/viewtopic.php?p=438109#p438109 says the Gen 2 Leaf doesn't need this circuit, and the same source describes CAN message to do the wakeup. If anyone wants to test that I can add that message to see if it works.
Has anyone seen a message on the EV CAN Bus that would distinguish a Gen 1 from a Gen 2? _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Can you share a capture of a Carwings wakeup on a Gen2? https://docs.google.com/spreadsheets/d/1EHa4R85BttuY4JZ-EnssH4YZddpsDVu6rUFm... says you send message 68c and http://www.mynissanleaf.com/viewtopic.php?p=438109#p438109 says you send message 68. I'm guessing the former is correct. Neither say what the gap between the messages should be. What do people use to analyze can bus captures? I've started writing a wireshark dissector for the leaf ev can bus which is making the messages easier to understand and hence the OVMS code easier to write. Of course I had to learn lua to do that, but hopefully it will help others too. I'll push it to a repo shortly. Do you happen to know if there is there a better reference for what the messages mean than https://docs.google.com/spreadsheets/d/1EHa4R85BttuY4JZ-EnssH4YZddpsDVu6rUFm... ? I've looked at various forum threads but the information is spread very thinly through the discussion. Other project's firmware is a little more information dense but harder to extract. On 03/13/2016 02:16 AM, Collin Kidder wrote:
The Gen2 does wake up based on a CAN message. I have captures that show that message being the very first thing over the wire and then the car wakes up and a ton of messages begin to flow. But, I haven't tried directly injecting that message to see if I can wake the car up via the message. It is, however, supposed to work that way. I'll give it a try when I get a chance.
I actually have both a 2012 and 2013 Leaf so I can do tests for differences. I'll get a capture from both and compare to see if there is a good way to distinguish the two over CAN. The CAN data decoded on mynissanleaf shows things that only exist in one or the other so it should be very possible to figure out which one you're in.
On Wed, Mar 9, 2016 at 4:35 AM, Tom Parker <tom@carrott.org> wrote:
Quick update,
I contorted myself into the driver's foot well of my right hand drive Japanese domestic manufacture 2012 gen 1 Leaf and unplugged the TCU. I can confirm that connecting pin 1 (battery +ve) to pin 11 (EV System Activation Request) causes a beep from the front of the car and a few relay clicks. I didn't try to activate climate control to confirm that it works, I'll try that later this week and if it does, hook it up to the OVMS. Splice into the loom in the cramped conditions under the dashboard won't be fun. I wouldn't be totally surprised if the TCU does the charge timer wakeup, so preserving the existing circuit is a good idea.
http://www.mynissanleaf.com/viewtopic.php?p=438109#p438109 says the Gen 2 Leaf doesn't need this circuit, and the same source describes CAN message to do the wakeup. If anyone wants to test that I can add that message to see if it works.
Has anyone seen a message on the EV CAN Bus that would distinguish a Gen 1 from a Gen 2? _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
The proper message is 0x68C. Here is a capture of the car sitting idle, then getting a climate control request over carwings. Then, the carwings system wakes up the car and begins heating. Timestamp is in microseconds. So, there is only a 50ms gap from the time the wakeup message is sent to the time that other devices begin blasting a ton of messages onto the bus. Before the wake up message there are no messages on the bus at all. It's dead quiet. www.savvycan.com/leaf-cc-remotely.zip The URL also answers the question of what am I using for capture analysis. I wrote my own program in QT for that purpose. I've been using the same spreadsheet on google. I think it's reasonably accurate usually but doesn't really cover every message. On Tue, Mar 15, 2016 at 2:59 PM, Tom Parker <tom@carrott.org> wrote:
Can you share a capture of a Carwings wakeup on a Gen2? https://docs.google.com/spreadsheets/d/1EHa4R85BttuY4JZ-EnssH4YZddpsDVu6rUFm... says you send message 68c and http://www.mynissanleaf.com/viewtopic.php?p=438109#p438109 says you send message 68. I'm guessing the former is correct. Neither say what the gap between the messages should be.
What do people use to analyze can bus captures? I've started writing a wireshark dissector for the leaf ev can bus which is making the messages easier to understand and hence the OVMS code easier to write. Of course I had to learn lua to do that, but hopefully it will help others too. I'll push it to a repo shortly.
Do you happen to know if there is there a better reference for what the messages mean than https://docs.google.com/spreadsheets/d/1EHa4R85BttuY4JZ-EnssH4YZddpsDVu6rUFm... ? I've looked at various forum threads but the information is spread very thinly through the discussion. Other project's firmware is a little more information dense but harder to extract.
On 03/13/2016 02:16 AM, Collin Kidder wrote:
The Gen2 does wake up based on a CAN message. I have captures that show that message being the very first thing over the wire and then the car wakes up and a ton of messages begin to flow. But, I haven't tried directly injecting that message to see if I can wake the car up via the message. It is, however, supposed to work that way. I'll give it a try when I get a chance.
I actually have both a 2012 and 2013 Leaf so I can do tests for differences. I'll get a capture from both and compare to see if there is a good way to distinguish the two over CAN. The CAN data decoded on mynissanleaf shows things that only exist in one or the other so it should be very possible to figure out which one you're in.
On Wed, Mar 9, 2016 at 4:35 AM, Tom Parker <tom@carrott.org> wrote:
Quick update,
I contorted myself into the driver's foot well of my right hand drive Japanese domestic manufacture 2012 gen 1 Leaf and unplugged the TCU. I can confirm that connecting pin 1 (battery +ve) to pin 11 (EV System Activation Request) causes a beep from the front of the car and a few relay clicks. I didn't try to activate climate control to confirm that it works, I'll try that later this week and if it does, hook it up to the OVMS. Splice into the loom in the cramped conditions under the dashboard won't be fun. I wouldn't be totally surprised if the TCU does the charge timer wakeup, so preserving the existing circuit is a good idea.
http://www.mynissanleaf.com/viewtopic.php?p=438109#p438109 says the Gen 2 Leaf doesn't need this circuit, and the same source describes CAN message to do the wakeup. If anyone wants to test that I can add that message to see if it works.
Has anyone seen a message on the EV CAN Bus that would distinguish a Gen 1 from a Gen 2? _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
On 03/16/2016 08:46 AM, Collin Kidder wrote:
The proper message is 0x68C. Here is a capture of the car sitting idle, then getting a climate control request over carwings. Then, the carwings system wakes up the car and begins heating. Timestamp is in microseconds. So, there is only a 50ms gap from the time the wakeup message is sent to the time that other devices begin blasting a ton of messages onto the bus. Before the wake up message there are no messages on the bus at all. It's dead quiet.
Your TCU is sending the CC On frame every 100ms for about 2 seconds. I'm only sending it once, which was enough for my car. I added sending the 0x68c frame 50ms before the CC On command. If you do git remote add carrott.org https://carrott.org/git/Open-Vehicle-Monitoring-System.git git fetch carrott.org git checkout carrott.org/nissan-leaf-climate-control and you should have my code. Otherwise a hex file is at https://carrott.org/OVMS.X.production.hex Could someone try it with a Gen 2 Leaf and see if remote climate control works? I'm abusing the homelink command (number 24) which I send with the perl client in Open-Vehicle-Monitoring-System/client : ./cmd.pl 24 It won't do anything if the car is already turned on. To turn off the climate control, turn the car on, or send command 6 ./cmd.pl 6
www.savvycan.com/leaf-cc-remotely.zip
The URL also answers the question of what am I using for capture analysis. I wrote my own program in QT for that purpose.
Savvy CAN looks quite interesting for reverse engineering CAN bus messages. In the past I've used cansniffer from the SocketCAN suite, but your tool looks much more comprehensive. Have you seen Wireshark? I've written a partial dissector for the Gen 1 Leaf messages at https://carrott.org/git/leaf-can-dissector.git/blob/HEAD:/leaf.lua which makes looking at what is happening on the bus quite nice after someone has done the reverse engineering and written the dissector. In the same repo is csv-pcap-converter.py which is a primitive converter from your csv format to pcap format, so you can load some data into Wireshark. It reads stdin and writes stdout. Interestingly there is a disagreement between tcpdump and wireshark's first layer CAN dissector about whether the can id should be big endian or little endian. I wrote pcap-canid-endian-swap.py to swap the byte order. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
participants (2)
-
Collin Kidder -
Tom Parker